PDA

View Full Version : quick preloader help please.....


Halabar
09-01-2004, 05:07 AM
Howdy,

I've got a MC with buttons in a scrollpane. That works fine.

I'm using:

on (release) {
_root.gotoAndStop("command");
}

to activate the buttons. That works fine.

BUT......

When I load that swf with a preloader, those actions no longer work.

How do I mod the script above to make it work with the preloader?.....

thanks!!!!

farafiro
09-01-2004, 02:03 PM
just work your paths right, if u r loading it to another fla, the u call the holder's _root by this script not its _root

Halabar
09-03-2004, 05:02 AM
just work your paths right, if u r loading it to another fla, the u call the holder's _root by this script not its _root


How do I refer from one swf to another in the path?... never done it before.... what's the syntax?....

I've got....

Preloader --> main flash file ---> scrollpane ----> buttons on MC in scrollpane


I'm using _root to get the buttons to work with the main file, but they worn't work with the preloader, and _global doesn't work either.

farafiro
09-05-2004, 05:16 AM
I don't get the hierarchy of your file

Halabar
09-05-2004, 05:27 AM
I've got two files.

A preloader file, that pulls in the main file.

In the main file, there is a scrollpane containing a MC. In that MC are various buttons to go to different frames of the main file.

These buttons work fine, but the action is not passed on when then preloader is used.

What do I add to the path to get them to work with the preloader?....

farafiro
09-05-2004, 05:37 AM
1) how do you preload them??
2) do u preload the component or the whole movie??

Halabar
09-05-2004, 05:50 AM
I'm preloading the whole movie....

preloader script is:

var pbListener:Object = new Object();
pbListener.complete = function(evt) {

evt.target._visible = false;
};

myBar.addEventListener("complete", pbListener);


the movie does load, and the button do show (their rollover state works), and the other functions work, it just that the buttons action doesn't work.

maxremix
12-23-2004, 09:49 PM
ok, here is a possible cause and solution (i hope)..

the components are being exported before the classes were available.
you may hav forgotten to uncheck Export in First Frame for the components.
Uncheck that option [by right-click on component in library and select linkage]
and put them on the stage after unchecking.