|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
go to action script
Here's what I'm trying to do. I've got a litle movie that shows a kid swing a hammer. At the end of the movie I want users to be able to click some text that says "click me" to make him swing the hammer again. I type the text, then turn it into a symbol (or a button?) - right? Then add the script - but how? Help!!
Thanks.. |
|
#2
|
|||
|
|||
|
Code:
//on a button-instancename myBtn
myBtn.onRelease=function(){
_root.yourmovieclinamehere.gotoAndPlay("the 1st frame in the clip");
};
//this "as" doesnt go on the button
//it goes on a layer called actions
you make a buttonout of it ofcourse.. three symbol choices ..movieClip,Button,graphic..let me know if you need more help ! cheers |
|
#3
|
|||
|
|||
|
Thanks, I'll try that. Is "myBtn" the name I assign to the button? And what about "yourmovieclinamehere" ? BTW - I'm using Flash MX.
Marc - from Texas |
|
#4
|
|||
|
|||
|
yes .instance names..you can use the same btn over and over again if your using instancenames and using the action script i just showed you.. and for the movie clip ..create your object on the stage in the first frame afte your finshed select all the object press key board f8 convert to a movie clip ..now inside that "MC"<_movie clip you have another time line work on that time line for you animation ....then go back out to the stage ,that is the _root time line ..and then you can make your button to control the mc animation ..
also look at this site for resources http:..www.flashkit.com//good tutorials for beginners http://www.kirupa.com//good site as well s with these 2 sites i think you will have a much better time learning flash ... than coming to the forums ..download some examples and look at how they are made and loo at the "AS"=actionscript .. also this will explain alot for you > http://www.macromedia.com/support/f...ipt_dictionary/ and dont forget the help files in flash which are god-sent .. cheers |
|
#5
|
|||
|
|||
|
also see the attached file i made a very easy tutorial for you to follow ..
a Btn& a MC animation . cheers
__________________
please see my site http://www.f-web.net also tutorials coming soon.. I am for hire .timo@f-web.net |
|
#6
|
|||
|
|||
|
Wow, thanks for your help - however - the Flash project file contained in the ZIP gave me an error - "unexpected file format". I really wanted to look at how it was set up. Its just what I need! Do you know why I'm getting the error??
Marc |
|
#7
|
|||
|
|||
|
because your using a mac or you dont have mx 2004 ..
let me know |
|
#8
|
|||
|
|||
|
No Mac - Windows XP. Flash MX 6.0 r25. Is that the problem? Do You have a more recent version? Can we make it work?
-cheers to ya too |
|
#9
|
|||
|
|||
|
Quote:
yes you are not using mx 2004 ..sorry m8 cheers |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > go to action script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|