Solved

Accessing a child movie in Flash

Posted on 2002-06-18
5
251 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
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…
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…
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.

635 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