Results 1 to 6 of 6
-
February 24th, 2012, 12:22 AM #13Registered User
postsButton's script, target not found?
Hey everyone. I'm using cs5.5 with as2 and i'm facing this strange problem:
i have a movieclip (test_main) on root with 2 movieclips (test_mc & test_btn) inside.
At frame 1 of test_main i'm writing:
..and i getCode:stop(); test_btn.onRollOver = function() { tellTarget (_parent.test_mc) { gotoAndPlay(2); } }; test_btn.onRollOut = function() { tellTarget (_parent.test_mc) { gotoAndPlay(11); } };
Same with _parent.test_mc.gotoAndPlay ..no movement.Code:Target not found: Target="undefined" Base="_level0.test_main"
I've been using this hundred of times back in Flash8 without a tiny problem.. but this one is driving me crazy now..
Thanks in advance!
-
February 24th, 2012, 12:45 AM #2Have you tried _root.test_main.test_mc?i have a movieclip (test_main) on root with 2 movieclips (test_mc & test_btn) inside.
-
February 24th, 2012, 12:52 AM #3
Or just test_mc?
Proud Montanadian
We tolerate living and breathing. And niches.
Name Brand Watches
Maybe getTimer() or TweenMax is the answer to your problem . . .
-
February 24th, 2012, 01:31 AM #43Registered User
postsYeah.. test_mc, _root.test_main.test_mc, _parent.test_mc, _level0.test_main.test_mc even with _lockroot ... everything fails.
-
February 24th, 2012, 04:24 AM #588Registered User
postsWhy you need to use tellTarget? It is deprecated.
Remove tellTarget code line and simply use gotoAndPlay(2) for same movieclip
and _parent.gotoAndPlay(2) / _root.gotoAndPlay(2) for root
-
February 24th, 2012, 06:27 PM #63Registered User
postsBah, i figured it out..
Code:stop(); function rOver(mc:MovieClip) { // _root.test_main.mc.gotoAndPlay : is what i was trying to pass... which was failing mc.gotoAndPlay(2); } function rOut(mc:MovieClip) { mc.gotoAndPlay(11); } test_btn.onRollOver = function() { rOver(test_mc); // this actually returns "_level0.test_main.test_mc" instead of just "test_mc" }; test_btn.onRollOut = function() { rOut(test_mc); };

Reply With Quote

Bookmarks