Welcome to Dream.In.Code
Click Here
Getting Help is Easy!

Join 118,589 Programmers for FREE! Ask your question and get quick answers from experts. There are 820 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Moving button link to frame 1

 
Reply to this topicStart new topic

Moving button link to frame 1

cadeownz
post 17 Jul, 2008 - 02:48 AM
Post #1


New D.I.C Head

*
Joined: 12 Jul, 2008
Posts: 31

Hey,
I have a moving button and when I put my mouse over it it should go back to frame one but instead restarts the animation. Any Help?
CODE
on(rollOver){
    gotoAndstop(1)}

see the "gotoAndstop(1)}" should make it go to frame one right? wrong. iv tryed it with changing the name of the frame 1 and doing "gotoAndstop(FrameOne)}" but still no luck i think it has to do with the button frames. since it goes to frame 1. im thinking that it goes to frame 1 of the button therefor restarting the animation. so yeah anyway of it going to frame one of the actual game??
thanks in advance..
EDIT:
yep it goes back to frame 1 of animation. so i need it to go back out of the button/movie frames and back into the real frames of the game. the first frames and then go frame 1 from there...

This post has been edited by cadeownz: 17 Jul, 2008 - 02:59 AM
User is offlineProfile CardPM

Go to the top of the page


Trogdor
post 17 Jul, 2008 - 05:16 AM
Post #2


D.I.C Regular

Group Icon
Joined: 6 Oct, 2006
Posts: 487



Thanked 2 times

Dream Kudos: 125
My Contributions


You are posting this in the wrong forum.
Find a flash/actionscript forum somewhere, you might actually get help there.
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 17 Jul, 2008 - 12:00 PM
Post #3


T3H R0XX0R!

Group Icon
Joined: 6 Feb, 2008
Posts: 3,553



Thanked 73 times

Dream Kudos: 2400

Expert In: (X)HTML, CSS, Batch Scripting, C, C++

My Contributions


Moved to flash and actionscript smile.gif
User is offlineProfile CardPM

Go to the top of the page

BetaWar
post 17 Jul, 2008 - 12:52 PM
Post #4


#include <soul.h>

Group Icon
Joined: 7 Sep, 2006
Posts: 1,669



Thanked 64 times

Dream Kudos: 1075
My Contributions


try:

CODE

on(rollOver){
    _root.gotoAndstop(1);
}


Hope that helps.
User is online!Profile CardPM

Go to the top of the page

cadeownz
post 17 Jul, 2008 - 09:02 PM
Post #5


New D.I.C Head

*
Joined: 12 Jul, 2008
Posts: 31

Hey, i have a button that is moving and it has a code so that when ur mouse goes over it should go back to frame one of the game. but it goes back to frame one of the animation. any way of making it got to frame one of the actual game? heres the code...
CODE
on(rollOver){
    _root.gotoAndstop(1);
}

Thanks in Advance
User is offlineProfile CardPM

Go to the top of the page

BetaWar
post 17 Jul, 2008 - 10:27 PM
Post #6


#include <soul.h>

Group Icon
Joined: 7 Sep, 2006
Posts: 1,669



Thanked 64 times

Dream Kudos: 1075
My Contributions


You know that Flash/Actionscript has its own forum right? (I think so since you posted this topic: http://www.dreamincode.net/forums/showtopic57801.htm )

Try placing the exact path to the movieclip that is holding the game after the _root. postion (the movieclips that are holding it need to have instance names, and you need to point at them.

So, if I had a movieclip in _root with the instance name of game and wanted it to go to frame 1 it would look like this:

CODE

_root.game.gotoAndStop(1);


For more help, please post in the other thread you made on this exact same problen, or better yet [Mod Merge].

Hope that helps.
User is online!Profile CardPM

Go to the top of the page

gabehabe
post 18 Jul, 2008 - 02:07 PM
Post #7


T3H R0XX0R!

Group Icon
Joined: 6 Feb, 2008
Posts: 3,553



Thanked 73 times

Dream Kudos: 2400

Expert In: (X)HTML, CSS, Batch Scripting, C, C++

My Contributions


Merged smile.gif

Oh, and it was me who moved it here, they didn't already find it wink2.gif
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/11/08 07:42PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month