Solved

Global createEmptyMovieClip?

Posted on 2009-05-03
3
313 Views
Last Modified: 2013-11-11
I am creating a nested movieclip in frame 1 of my movie.  See attached code.

This works only once.  When I move around the flash file, the movie I made goes away.  My guess is that since _root.s_master_mc.outer is made at runtime, once I leave that frame / movieclip it is gone.  Is there a way to createEmptyMovieClip globally so that it will always play?  Or is there another way to achieve this?
_root.createEmptyMovieClip("s_master_mc", _root.getNextHighestDepth());

_root.s_master_mc.createEmptyMovieClip("outer", _root.s_master_mc.getNextHighestDepth());

var ss_outer = _root.s_master_mc.outer;

Open in new window

0
Comment
Question by:el_suavo
  • 2
3 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 24298133
i could be misunderstanding what you are wanting to do, but could you just load that new movieclip into one that is already on the stage and on a layer that is across the frames you want it to display thru?



rp / ZA
0
 

Author Comment

by:el_suavo
ID: 24298662
That is what I did.  Both s_master_mc and outer are existing movieclips (outer nested in s_master_mc nested in _root).  And it works, but only once.  When I move away from the frames that outer is on and then come back, it is no longer there.

I ended up loading the moving in the _root and just using a mask to show it when needed.  I am sure there is a better way but I was under the gun to finish.


0
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24299483

again... the layer that is holding s_master_mc needs to be in ALL frames that need to reference the object... or it will not work.

just an FYI...


glad you got something worked out...  please close up the question if you can.


rp / ZA
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now