Solved

Accessing a child movie in Flash

Posted on 2002-06-18
5
250 Views
Last Modified: 2010-04-03
Hi,

I have a Flash movie built using Flash MX (Windows version) that contains a blank movie clip called movStage.
When the parent movie is run it loads an SWF into this blank movie using the line:

loadMovie("myStage.swf", "movStage");

Inside the SWF I have a dynamic textfield called lblText. I want to be able to set the text on this textfield from the parent movie but I haven't been able to work out how this is done.
I tried using the following code:

movStage.lblText.text = "My text";

When I run a trace(movStage.lblText); I get 'undefined' as a result.

To further complicate the issue the child movie (movStage) has full access to the parent.
Knowing this I leave the child running in a loop constantly checking a variable in the parent movie and updating accordingly, but this option uses more processor time than is necessary.

If anyone has any ideas I'll be most grateful.

PyroMyst
0
Comment
Question by:pyromyst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 6

Expert Comment

by:rootdir
ID: 7090024
use following code

_parent.movStage.lblText.text = "My text";

or

_root.movStage.lblText.text = "My text";

or

_level0.movStage.lblText.text = "My text";

Give complete path from main movie. You will get what you are looking for. Still if you find diffculty send me your fla files and txt file, I will fix it for you. My email is rotdir@hotmail.com

Cheers
RootDir
0
 
LVL 1

Author Comment

by:pyromyst
ID: 7685949
I have requested that this question been deleted.

RootDir gave me a number of suggestions both here and via email.
However none of the suggestions helped me around my particular problem. I have yet to find the solution.

PyroMyst
0
 
LVL 6

Expert Comment

by:rootdir
ID: 7686449
Send me your fla files in zip format I will solve.

rotdir@hotmail.com

RootDir
0
 
LVL 6

Expert Comment

by:rootdir
ID: 7686455
Or post your email I will send example created for you.

RootDir
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7737593
PAQ'd and 100 points refunded

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWAY 3d Using BitMapCubeTexture 1 435
Can't find all of the preferences on Flash Pro 2 501
Failed download 57 593
How to block online streaming via TMG2010 ? 2 153
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

739 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