PDA

View Full Version : component - export in first frame problem


Mortimer Jazz
10-21-2003, 05:56 AM
I've tried this with both the comboBox and the checkBox...
I want to use a preloader (therefore I don't want my components to load in on the first frame), but I can't get this to work. I've tried two methods. Can someone help?

Method1:
Put this code on frame 10 of a new movie

cb = {x:10, y:10};
_root.attachMovie("CheckBox", "myCB", 10, cb);
myCB.label = " Here I am!"
stop();

Now drag an instance of the checkbox component onto the stage and delete it again. When you test the movie, the component will load as expected, but it loads in on the first frame.

Now in the linkage properties for the component uncheck the "export in first frame" option. Test it again and it doesn't load at all.
-------------------------------------------------------------------------
Method2:
Drag an instance of the component on to frame 10 of a new movie and uncheck the "export in first frame" option. Test how the movie preloads. The component still loads in on frame one.

Does anyone have an idea why this isn't working?

farafiro
10-21-2003, 06:26 AM
hey Mort
it worked very right as is
I've added this to check it, and it did attached the component in frame 20this.onEnterFrame = function(){
trace(_currentframe)
if(_currentframe>=20) delete this.onEnterFrame
}
have u got your coffee yet ;) :p

Mortimer Jazz
10-21-2003, 06:33 AM
Faffy, yes I know that(!!!), but did you then try unchecking the "export in first frame" optoin as I instructed? It then no longer loads at all

What I forgot to clarify is that when you untick that option you should then drag a copy of the component onto frame 10/20 or whatever, because it's not getting loaded from the library, but despite putting this on frame 20 it still loads in on frame 1 (check the bandwidth profiler) so I can't find a way to get my preloader to display before the damn component loads in.

farafiro
10-21-2003, 06:37 AM
hmmmmm
so, I guess I will go back to the MM components reference

Mortimer Jazz
10-22-2003, 02:23 AM
Solution!!!

The components are pulling in classes in MX2004, and so you have to go into publish settings and change the frame on which the classes export as well as unchecking the components export option box.
Many thanks to http://www.brajeshwar.com/archives/000120.php for this info

farafiro
10-22-2003, 04:09 AM
hmmmmmmmmm
I should study and read a lot more than I do

thx for the link Mort

uncleunvoid
02-18-2009, 12:51 PM
see my post:
http://www.resonancedesign.co.uk/blogs/resonancedesign/?p=83