Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Targeting variables in movie clip

Status
Not open for further replies.

Kijori

Technical User
Jan 22, 2002
67
0
0
SG
The scenario:

Main timeline has 2 Movie Clips; mcA and mcB. In mcA, I've created variable x and in mcB, variable x in their respective timelines.

In each Movie Clip, I've also created a function each, function A and function B. Now, how do I address the variable x in mcA for function A?

The _root thingy is for variables in the root/main timeline right? And this won't work for my problem correct?
 
Pass the variable into the function when you call it.

Code:
functionName(x);

or refer to it within the function (assuming the function and the x variable are on the same timeline)

Code:
this._parent.x;

Or address it from the _root.
Code:
_root.clipName.x

Also you could used _global variables.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top