Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Component Classes need a preloader?


Jooky One
4/13/2004 8:59:37 PM
PROBLEM: Dropdown component won't work when viewed over the web. Do Component
classes need to be preloaded somehow when working with _levels ?

I am doing a project that contains a dropdown component and some medium
quality audio voice over (making the file weight in at about 333k). It loads
into _level1 and then plays automatically. I have no problems with any of the
functionality of this EXCEPT when viewed [b]over the web [/b]in an IE Browser,
at which point the dropdown menus just "highlight" rather than function. This
media isn't meant for the web at this point (deliverable is CD) but while
demo-ing it over the web has been easy for the client and I, I cannot get the
dropdown menu to work immediately... so far the only work around is to load the
page, and then click "Back" (which unloads _level1 and reloads the previous
file) and then click "Next" (which then unloads _level1 and reloads the file
again from cache or temp internet files). I've only experienced this problem
in Internet Explorer and not Mozilla Firefox, and it works perfectly fine in IE
on the local machine and from the CD, but since this is a govt project, it is
pertinent that it function over the web in the future.

To view this glitch in progress (IE Browser) go to: http://jookyworld.com/DHS/

Just Press the LOGIN button (no need to enter anything as this demo merely
stores a Shared Object used for bookmarking) and it will bring you to the
screen that is right before the one that is having the problems.. then press
Next to view the actual problem screen... Pressing back reloads the previous
screen and then NExt again will reload the problem screen from cache and will
be fully functional.

Be patient as there are no preloaders and it may take a min or so (depending
on your connection) to download even after pressing next or back.

Any thoughts here would help.

Jimbalya
4/14/2004 12:58:47 PM
I have this problem also: A Flash 7 swf with ComboBoxes that drop down
correctly, does not work after loading into _level1 by way of a preloader; the
ComboBoxes don't drop down and can only be selected. I haven't noticed any
difference with IE or Mozilla. If I make a preloader that loads the file into
_root or _level0 the ComboBoxes work fine... of course the preloader doesn't
show anything then.
Jooky One
4/14/2004 10:35:40 PM
Actually Jimbalya, the workaround for the problem you are experiencing is to
drag an instance of the combobox component onto your _level0 movie (somewhere
off frame or out of the viewable area). You dont have to give it an instance
name or anything, nor do you have to populate it. Just having a combobox
somewhere off frame but on the main timeline of your _level0 movie should allow
your _level1 dropbox to work when it loads. It's an ugly fix but seems to
work, and if you put it 100 pixels below the viewable area of your main
timeline stage (so it doesnt interrupt any tab order you have), then the viewer
will never know it is there.

Hope this helps you.
Hero Protagonist
4/14/2004 10:49:05 PM
A TechNote on this topic should be published soon.

For most of the components you need to have a copy of them in the library of
the Parent movie for them to function correctly. This is due to the way the
components share assets and at the moment is an inconvenient fact of life. (It
does not matter how you load the child SWF, and the component does not have to
be on the timeline in the Parent movie.)

The biggest issue with this workaround is that it will increase the download
time of your application. (Users end up download all of your components twice.)
To fix that, use shared libraries for all of the components in your library..
(Shared libraries make the user download one copy of the library that may be
shared with all of your other SWFs. This will improve the download performance
of everything on your web server that uses the library.)

Hope that helps,

-Ken

Jimbalya
4/15/2004 1:09:40 PM
Jooky One, thanks. It works, but the preloader is now 54k.

Hero Protagonist, is there anyway to avoid a large (>4k) first frame using the
new components? Even if I change everything in the library to not export on the
first frame my swf is too big... and now it looks like I can't use a seperate
swf preloader ('cause it would need the same library,) so whats a fellow to do?
(I tried a seperate scene also -- still exports to much.)

AddThis Social Bookmark Button