Flash Code Q
- Started
- Last post
- 3 Responses
- springbok
Hi All,
I am trying to have a staement in AS where I want a btn to become visible if an image is loaded to 100%.
I have this so far;
if (preloader.loadBar_mc._width=100... {
_root.btn1._visible = true;
}Can anyone help with a better way as the load bar doesnt seem to work with this method?
D
- springbok0
All i basically want to know is how do I, in AS, get flash to...If something has done do something else...Is it an IF statement?
- enjine0
no, you need to use either an interval to keep checking the loading movieclip until just after it loads, or use the moviecliploader class so you have access to the onLoadInit function.
the if statement, by itself, will run once, before the loading begins, if it is not run at an interval or called after the load is complete.
- blaw0
create an onEnterFrame event that checks to see if something is loaded.
when it finally is, do something, then delete the onEnterFrame event.