Caitlin-havener Posted April 13, 2010 Share Posted April 13, 2010 Newb here. Makin buttons but the one for the code below won't roll out! It also doesn't respond quickly when I click the button. Please help!stop();lingerie_btn.addEventListener(MouseEvent.MOUSE_OVER, onOver);lingerie_btn.addEventListener(MouseEvent.MOUSE_DOWN, onClick);lingerie_btn.addEventListener(MouseEvent.MOUSE_UP, onUp);function onOver(e:MouseEvent):void{lingerie_btn.gotoAndStop("over");}function onClick(e:MouseEvent):void{lingerie_btn.gotoAndPlay("down");}function onUp(e:MouseEvent):void{lingerie_btn.gotoAndStop("up");} Link to comment Share on other sites More sharing options...
BlackBullet Posted April 17, 2010 Share Posted April 17, 2010 The reason it won't roll out is you need to add an event listener and function for the mouse going out (or rolling off). Otherwise it will just stay in the roll over state.lingerie_btn.addEventListener(MouseEvent.MOUSE_OUT, onOut);function onOut(e:MouseEvent):void{lingerie_btn.gotoAndStop("up"); // Or whatever frame you want}I can't quite work out why it wouldn't be doing anything when you click. Perhaps it has something to do with the fact that you're using the gotoAndPlay method? Link to comment Share on other sites More sharing options...
tinmat Posted May 6, 2010 Share Posted May 6, 2010 why dont you simplify your buttons to:MC_Button.onRollOver = function () {//code}MC_Button.onRollOut = function () {//code}MC_Button.onPress = function () {//code}etc.. Link to comment Share on other sites More sharing options...
hansolo Posted August 23, 2010 Share Posted August 23, 2010 i belive he has coded in actionscript3 and youve used actionscript 2 . He could actualy switch to actionscript two as there doesnt seem a reason to use actionscript 3 in this example. it is correct Link to comment Share on other sites More sharing options...
Synook Posted August 24, 2010 Share Posted August 24, 2010 Please try not to resurrect old topics... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.