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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

referencing movie clips

Status
Not open for further replies.

ckennerdale

Programmer
Dec 23, 2000
158
GB
I am jiust coming back to a bit of flash after 8 moths of director, so I am a little rusty, but I am either having a very strange prob or i am doing somwthing really silly

I am trying to refernence a movie clip in order to control it.

my movie is called mymovie and it is in the first layer.

I should be able to refernce the _x property from a button in layer 5 via
_root._mymovie._x = 400

but no joy if I do _x =400 the burtoons x moves as you would expect- so I know the button works.

Looking at the debugger I found that I could refence mymovie via
_level0.instance3._x=400;

This is where it starts to get strange as mymovie is in layer 1. the movie in layer 2 can be refenced as instance2 and layer 3 as instance 1. Whoch is the reverse

Does this make sense?

cheers Caspar Kennerdale
Senior Media Developer
 
When you say "layer" do you mean "level". Layers should not constitute any reason for targetting problems. Levels on the other hand require you to target firstly the level and then the movie-clip.

So your main movie is _level0 (always, unless you load another movie into _level0). It takes YOU to specify any other levels used, so if you have loaded a movie into level3 then you target an mc on the main timeline of that level using _level3.yourmovieclip

Does this help? If you want to post me a zipped FLA to have a look my email address is below.

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
no probs Caspar
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top