PDA

View Full Version : please help!! attach movie


oddsocks
06-30-2004, 08:45 AM
Hi I have a problem and need that I need to solve quickly if anyone can help me.

In my movie I want to keep all my code on frame 1.
I attach all elements from the library and remove them when I need to.

I do not want to export any elements in frame one because it messes with my preloader, so I uncheck that option, but leave the export option checked.

I have placed ALL items from the library on to a keyframe (frame 10). I then use my preloader to load everything in _root.

Even though the Flash movie is preloading all those elements I can not attach them to the stage.

Can some one help me please. If possible I want to keep all my code on frame one like I mentioned. I thought this was something that was possible with Flash.

Thanks
OS

Tink
06-30-2004, 12:53 PM
you will not be able to attach them until they have been export, and if you untick 'export of frame 1' and place them all on frame 10 they are being exported on frame 10. therefore you will only be able to attach them on frame 10 or afterwards

oddsocks
06-30-2004, 02:41 PM
okay thank you. It is sad that I cannot keep on my code on one frame and still use attach movie!

Tink
06-30-2004, 02:50 PM
i would usually build my preloader into the first frame using setInterval or onEnterFrame.

frame 2 i would have a stop action, and frame 3, gotoAndStop (2). i use these so the user cannot force the movie to play. i.e. if they tried it would just keep looping between frame 2 and 3.

frame 4 is where i would have my clips, that are exported for actionscript

frame 5 is where i put all the code

frame 6 a stop action and frame 7 a gotoAndStop (6) again so the user cannot force the movie to play.

once the preloader has finished i tell it to gotoAndPlay frame 5.

hope that helps

deadbeat
06-30-2004, 05:44 PM
Tink-

You mentioned a couple of times using a frame loop so the user acan't force the movie to play - I assume you mean by right clicking and choosing play from the context menu? In AS 2 there's an easier way to lock out the context menu:

var cm=new ContextMenu();
cm.hideBuiltInItems();
_root.menu=cm;

K.

Tink
06-30-2004, 08:21 PM
nice

although i don't like to muck around with the contect menu too much

oddsocks
07-01-2004, 06:52 AM
thanks this has helped me a lot