Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 11th, 2011, 05:39 PM
ahillecke ahillecke is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Posts: 27 ahillecke User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 7 m 14 sec
Reputation Power: 0
ActionScript 3 - Restart?

I'm working on making a concentration/memory-type game, and at the end, I want to make it so that when the user clicks anywhere on the screen after winning, they will return to the menu, and be able to start a new game. I got the click to return to menu part working, but clicking on the menu doesn't do anything but activate the "down" frame of the button clicked.

Is there a method I should be using to return to the menu and restart it (in particular get the eventlistener for the click to be restarted, but also reset all the variables that get changed from their default value through the game) other than gotoAndStop or gotoAndPlay? Neither seems to work. I've even tried making the click at the end of the game direct the playhead to a frame that is totally blank except for a simple action to loop back to the beginning (gotoAndPlay), but that's not working either. Should I insert an extra frame at the beginning so I can get prepareFrame events?

I'm not really sure why it's not redeclaring the variables, listeners.

EDIT: Figured it out. Needed to remove the stage eventListener at the end of the game in the restart function.

Last edited by ahillecke : May 12th, 2011 at 10:30 AM. Reason: RESOLVED

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > ActionScript 3 - Restart?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap