View Full Version : Referencing the root timeline
theonlycarmire
July 7th, 2007, 12:06 AM
Ok, so my problem stems from my dependence on the _root object in AS2.0
If I have a movieclip that I want to call a function that is on the main timeline, which reference would I use? I tried root.testFunc() to call said function, but got no play.
Any ideas?
lightscience
July 8th, 2007, 01:41 AM
oh i was having the same question, and i actually looked at an as3 template that comes with flash cs3... the slideshow, and it looks like it's still _root with the underscore! i haven't tried it yet, but it seems that's what they used in that template. i guess take a look at it if you like.
Aquilonian
July 8th, 2007, 07:21 AM
myStuff.rt = myStuff.root as Sprite;
I think there is a tip of the day for that...
senocular
July 8th, 2007, 08:35 AM
MovieClip(root).testFunc() should be it. You may need to make sure root is not null too. It will be unless your movie clip is visible on the screen.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.