Article View: adobe.livemotion
Article #32Re: gotoAndPlay won't play??
From: Roberta_Stone
Date: Wed, 01 Sep 2004 05:39
Date: Wed, 01 Sep 2004 05:39
29 lines
2797 bytes
2797 bytes
Got it. There's a few problems. First, you have a gotoAndPlay():
_root.myMovieClip.gotoAndPlay("huh");
But there is no movie clip in your composition named "myMovieClip," so the script dies.
I find the label "huh" on the timeline of the movie clip "Group of 4 objects. That is the clip you need to be addressing - but the further problem is that "Group of 4 objects" is not a legal movie clip name. Rename that clip "Huh," and then make your script:
_root.Huh.gotoAndPlay("huh");
The button is named "Medium Orange Geometric," and this also is not a legal movie clip name. Change that to "button" or something legal.
Next, the way that the movie clip containing the "huh" label is set up can cause problems. You have a long timeline containing the "huh" movie clip, and then two more images of the head turned named "Clipboard Image". If the user rolls the mouse over the button while the timeline is on either the movie clip or one of the "Clipboard Images" objects, the rollover effect is lost, because the dog's head is already turned.
Also, when the user rolls over the button and the head turns, the timeline continues playing, and the head stays turned when the user rolls off, and until the timeline of the movie clip "huh" finishes.
It would be better to have the clip gotoAndStop() at the start of the "huh" clip on rollover, and then gotoAndPlay() at the end of the "huh" clip on rollout.
Also, you really don't need to have those extra "Clipboard Image" objects in the timeline - it can loop over the one "huh" clip with the same effect.
You don't need to have a main timeline as long as your longest movie clip or movie clip group. On this animation the maintimeline can be closed up to the single frame 00.
I've seen problems using both the timeline "loop" buttons and scripts - better to script your loop by putting a "home" label on frame 00, and a gotoAndPlay("home") keyframe script on the last frame.
Check this and see if it's doing what you want:
<http://www.goldiris.com/test/tongue2.html>
Link to fixed liv on page.
Technical Details
Message-ID:
<3bb5b650.2@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<3bb5b650.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f6a55,b8b4eabde03e7469 X-Google-Attributes: gidf6a55,public X-Google-Language: ENGLISH,ASCII-7-bit From: Roberta_Stone@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.livemotion Subject: Re: gotoAndPlay won't play?? Message-ID: <3bb5b650.2@webx.la2eafNXanI> Date: Tue, 31 Aug 2004 22:39:08 -0700 References: <3bb5b650.-1@webx.la2eafNXanI> Lines: 49 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit