Solved

Global createEmptyMovieClip?

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adobe Flash Install via GPO - Remove Prior Versions From GPO? 1 161
blocked plugin flash 5 119
High Internet Explorer CPU on Flash site in Citrix 2 808
flash in chrome 4 101
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

832 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