Hi all. I just created a level selection screen based loosely around Tessa Lee's Flash/Scaleform menu tutorial. I have everything functioning correctly, except that when I press the buttons that take me back to the main screen of the menu, the cursor places a stamped images of itself on the background. I have tried everything I could possibly think of and nothing has fixed it. Any help would be appreciated.
MainMenu
Level1
Each consecutive level is coded exactly the same, except for the different level calls, of course.
Once again, thanks for any help.
MainMenu
Code:
import flash.events.MouseEvent; import flash.system.fscommand; import flash.display.MovieClip; level1_btn.addEventListener(MouseEvent.CLICK, level1Screen); level2_btn.addEventListener(MouseEvent.CLICK, level2Screen); level3_btn.addEventListener(MouseEvent.CLICK, level3Screen); level4_btn.addEventListener(MouseEvent.CLICK, level4Screen); exit_btn.addEventListener(MouseEvent.CLICK, exitGame); var cursor:cursor_mc = new cursor_mc(); drawCursor(); stop(); function level1Screen(event:MouseEvent):void { gotoAndStop('Level1'); } function level2Screen(event:MouseEvent):void { gotoAndStop('Level2'); } function level3Screen(event:MouseEvent):void { gotoAndStop('Level3'); } function level4Screen(event:MouseEvent):void { gotoAndStop('Level4'); } function exitGame(event:MouseEvent):void { fscommand ('ExitGame'); } function fixCursor() { removeChild(cursor); addChild(cursor); cursor.x=mouseX; cursor.y=mouseY; cursor.startDrag(); } function drawCursor() { addChild(cursor); cursor.x = mouseX; cursor.y = mouseY; cursor.startDrag(); }
Code:
back_btn.addEventListener(MouseEvent.CLICK, goBack); confirm_btn.addEventListener(MouseEvent.CLICK, selectLevel1); fixCursor(); function goBack(event:MouseEvent):void { gotoAndStop('MainMenu'); } function selectLevel1(event:MouseEvent):void { fscommand('SelectLevel1'); }
Once again, thanks for any help.
Comment