Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Global createEmptyMovieClip?

Posted on 2009-05-03
3
Medium Priority
?
328 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

971 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