Basic Actionscript

J03

~~~~~~~~
Messages
5,558
Location
Wales
This is a bit of a Basic Referance guide, just some simple actionscript.
Basic Actionscript.





1. Goto button


Place the Following Code on a Button, and change the number “2” to whatever frame you want to change to, when the button is clicked.



Code:
  on(release){ 
   gotoAndStop(2); 
}









2. Animated Cursor



Place the Following Actionscript on a Movieclip (Makes the chosen MovieClip follow Cursor)



Code:
onClipEvent (enterFrame) { 
   this._y = Math.round(_root._ymouse); 
   this._x = Math.round(_root._xmouse); 
}



Place the Following Actionscript the frame that has the Animated Cursor On.: (Makes the default Cursor become Hidden)



Code:
Mouse.hide();





by joseph redfern
 
Back
Top Bottom