Solved

Global createEmptyMovieClip?

Posted on 2009-05-03
3
324 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

821 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