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!

problem with gotoandplay in as !!!

Status
Not open for further replies.

fabiovise

Technical User
Jul 19, 2001
9
IT
hello, i'm fabio from italy,
i have a problem with action script, infact i can't pass to another scene from clip event.
the movie is composed by 3 scene,
1 - "urlo"
2 - "scritte"
3 - "logo"
the code that i have implemented that point in the 3rd scene, always pass me through first scene !!!

this is the code...
the problem is in the gotoandplay command ---->

onClipEvent (enterFrame) {
x = 0;
y = 0;
ciclo = 0;
_level0.displaybox = eval("_level0.string"+(Math.floor(Math.random()*8)+1));
_level0.displaybox1 = eval("_level0.string"+(Math.floor(Math.random()*8)+1));
displaybox2 = eval("_level0.string"+(Math.floor(Math.random()*8)+1));
while (x<1000) {
x++;
}
z++;
if (z == 40) {
cuoresuono = new Sound(this);
cuoresuono.attachSound(&quot;disco&quot;);
cuoresuono.setVolume(250);
cuoresuono.start(0, 1);
s++;
while (y<25000) {
y++;
}
z = 0;
if (s == 1) {
h = &quot;ciao&quot;;
--------> _root.gotoAndPlay (&quot;logo&quot;, 1);
}
}
}
thanks in advance for help me !!!!

ps. i have try to make a label in the first frame of the scene calling &quot;logo&quot; but it's the same thing.


thanks

fabio visentin





 
hi fabio, this script works fine for me with:

Code:
   _root.gotoAndPlay(&quot;logo&quot;);

and label &quot;logo&quot; on the frame you want to go to.

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
sorry, but this script does not work fine for me...
infact if you _root.gotoandplay(&quot;logo&quot;);
you can go through a frame in the scene, not in other scene.

1° scene

2° scene
--------> mc
--------> _root.gotoAndPlay(&quot;logo&quot;);

3° scene (logo)
label logo

 
well fabio, post a link to your fla or emil it and I'll have a look, can't offer better than that.

The above script on a movie-clip in scene 2 works for me and sends the movie to frame1 (label=&quot;logo&quot;) of scene 3.

Also, does the movie-clip have enough time to activate in your movie, or can the movie go past (or stop short of) this movieclip, rendering the script useless?

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
thanks a lot for your advice :)))

infact theproblem persist, but i have resolved pointing a label in the same scene, that point to 3rd scene.
a round trip !!!

but maybe i think the problem it's just the time activation that wasn't so much...

thanks :)

fabio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top