PDA

View Full Version : scrollbar won't show up once .swf is online


calrockx
07-09-2005, 06:23 PM
i have a UIScrollBar set to a dynamic text field that loads an external .htm file.
in test movie mode, everything works fine. even when i publish it and open the .swf file offline, the scrollbar appears and works as it should.

but i just uploaded it to my site, and everything is there, except for the scrollbar. i still see the silver streak that looks like the scollbar background, but the arrows and track and well, the scrollbar ingredients don't show up. it didn't show up at all yesterday, then today the scrollbar appears, but only sometimes. when it doesn't, if i refresh the page a few times, then it'll usually appear.

here's a link directly to the page in question:
http://www.calrockx.com/etc/temp/pismo4rj3/
it's the "trip info" page that's the shows the problem.

also, i uploaded it here just to see how it'd work on another site, and for some reason the scrollbar has better luck here -
http://www.8-18colonialway.com/other/temp/pismo4rj3/
but it still won't show up everytime.

i'm using flash mx 2004.

help please!

badlorry
07-11-2005, 01:05 PM
sounds to me like the scrollbar component is not being preloaded properly. The fact that it appears locally (where the connection is fast), but not over an online connection would seem to suggest that it's trying to run code on a movieclip that doesn't exist yet.

calrockx
07-11-2005, 03:50 PM
hm...is there some actionscript i could use to resolve this? would i just put it in the first frame of an actiona layer for each page that that has this problem?

or maybe another way of going about it? i thought maybe it has to do with the external text factor, but if i put the text straight into flash, i can't use html links and css, so forget that.

sleekdigital
07-11-2005, 04:26 PM
Once you know the content is loaded, call the component's invalidate() method.

calrockx
07-11-2005, 11:57 PM
Once you know the content is loaded, call the component's invalidate() method.


do you have the code for this that i'd add, or know where i can find it?

it's just so weird that it does work, but only sometimes or after a few refreshed.

sleekdigital
07-12-2005, 12:07 AM
It's not that complicated. You just call instanceName.invalidate()
AFTER your exteranl data is finished loading.

The reason it always works locally, is because the text loads instantly, and therefore it is always loaded before the component is initialized.

The reason it works sometimes and sometimes not when online is because sometimes the text is loaded before the component is initialized and sometimes it takes longer to load. So you wait until you know the content is loaded, then call invalidate() which tells the component to redraw itself.