Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-04-2009, 12:59 PM   #1
nfcj
Registered User
 
Join Date: Feb 2009
Posts: 4
Default [AS2] spot the difference game Help

Hello to all, I am new to this forum. I am actually doing a spot the difference game, but somehow i got stuck. My problem is that upon finding all the errors(3 in my case), the game will be complete. But however i do not really catch the logic so how do I go about doing this? thanks in advance.
nfcj is offline   Reply With Quote
Old 02-04-2009, 01:00 PM   #2
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Attach your .fla to this forum.
atomic is offline   Reply With Quote
Old 02-04-2009, 01:41 PM   #3
nfcj
Registered User
 
Join Date: Feb 2009
Posts: 4
Default

I can't seem to upload my fla since it is very big but i think will post my codes

ActionScript Code:
//to make the buttons invisible btn1._alpha = 0; btn2._alpha = 0; btn3._alpha = 0; btn4._alpha = 0; btn5._alpha = 0; btn6._alpha = 0 //to make the circles invisible also cir1._alpha=0; cir2._alpha=0; cir3._alpha=0; cir4._alpha=0; cir5._alpha=0; cir6._alpha=0; //to prevent the hand cursor from showing up to reveal the answer btn1.useHandCursor = false; btn2.useHandCursor = false; btn3.useHandCursor = false; btn4.useHandCursor = false; btn5.useHandCursor = false; btn6.useHandCursor = false; //to show the circle when the error have been identified btn1.onRelease = function() {     cir1._alpha = 100;     cir4._alpha = 100; } btn2.onRelease = function() {     cir2._alpha = 100;     cir5._alpha = 100; } btn3.onRelease = function() {     cir3._alpha = 100;     cir6._alpha = 100; }

I can't really find the logic to end the game upon the 3 errors being identified.
I have thought of using the If else statement.
nfcj is offline   Reply With Quote
Old 02-04-2009, 01:47 PM   #4
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Use a file sharing site as www.rapidshare.com to upload your .fla, and provide here the link to download it from there...
atomic is offline   Reply With Quote
Old 02-04-2009, 02:05 PM   #5
nfcj
Registered User
 
Join Date: Feb 2009
Posts: 4
Default

http://rapidshare.com/files/19383119...rface.fla.html

here's the link to the file. thanks
nfcj is offline   Reply With Quote
Old 02-04-2009, 02:44 PM   #6
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Try this...

ActionScript Code:
//to make the buttons invisible btn1._alpha = 0; btn2._alpha = 0; btn3._alpha = 0; btn4._alpha = 0; btn5._alpha = 0; btn6._alpha = 0 //to make the circles invisible also cir1._alpha=0; cir2._alpha=0; cir3._alpha=0; cir4._alpha=0; cir5._alpha=0; cir6._alpha=0; //to prevent the hand cursor from showing up to reveal the answer btn1.useHandCursor = false; btn2.useHandCursor = false; btn3.useHandCursor = false; btn4.useHandCursor = false; btn5.useHandCursor = false; btn6.useHandCursor = false; //to show the circle when the error have been identified btn1.onRelease = function() {     this._parent.spotted++;     cir1._alpha = 100;     cir4._alpha = 100; } btn2.onRelease = function() {     this._parent.spotted++;     cir2._alpha = 100;     cir5._alpha = 100; } btn3.onRelease = function() {     this._parent.spotted++;     cir3._alpha = 100;     cir6._alpha = 100; } var spotted:Number = 0; this.onEnterFrame = function(){     if(spotted >= 3){         trace("Congratulations!");         // Some other actions here...         // goto another page or whatever else...         delete this.onEnterFrame;     } }; stop();
atomic is offline   Reply With Quote
Old 02-04-2009, 03:16 PM   #7
nfcj
Registered User
 
Join Date: Feb 2009
Posts: 4
Default

thanks appreciate it
nfcj is offline   Reply With Quote
Old 02-04-2009, 03:20 PM   #8
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Grrrrrreat!
atomic is offline   Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS2] Making it so that when your score gets to ten, you win the game changeofseasons71 Gaming and Game Development 2 12-17-2008 01:33 PM
[AS2] Help with drag and drop game suziqnyc Gaming and Game Development 3 08-17-2008 05:23 PM
[AS2] flash game and audio un sync ultraman Gaming and Game Development 0 08-05-2008 06:35 PM
[AS2] hitTest problem, Game Bomb VVV Gaming and Game Development 1 09-02-2004 01:55 PM
Spot the difference - using collisions funksallbrother ActionScript 1.0 (and below) 0 11-04-2003 09:18 AM


All times are GMT. The time now is 05:20 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.