Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-08-2010, 10:35 PM   #21
johnnybien
Registered User
 
Join Date: Nov 2010
Posts: 34
Default

Quote:
Originally Posted by orange gold View Post
That's what my code does... well they are all clickable but you have to click the 8 for it to work.
Yeah it's only 8, but when I clicked the square, it will go to "You Lose" page, is it possible that 24 circles in all, and when I click any of those as long 8 circles then it will go to "You Win" page? I mean no square so there's also no "You Lose" page.
johnnybien is offline   Reply With Quote
Old 11-09-2010, 12:42 AM   #22
orange gold
got as?
 
Join Date: May 2007
Posts: 628
Default

Yes, get rid of the end code making it go to the youloose page... now whenever a circle is pressed have a variable called "numPressed" and every time a circle is pressed say
"numPressed ++;"

then

if (numPressed == 8) {
gotoAndStop(2)
}

also, if you want it to not allow the user to click a circle more than once you can use more variables to keep track or just add this code to the onPress events

this._x += +99999;

to send it way of screen, it will seem like you press it and it dissapears.
__________________
Feel free to PM me if you have a question
orange gold is offline   Reply With Quote
Old 11-09-2010, 02:14 AM   #23
johnnybien
Registered User
 
Join Date: Nov 2010
Posts: 34
Default

Quote:
Originally Posted by orange gold View Post
Yes, get rid of the end code making it go to the youloose page... now whenever a circle is pressed have a variable called "numPressed" and every time a circle is pressed say
"numPressed ++;"

then

if (numPressed == 8) {
gotoAndStop(2)
}

also, if you want it to not allow the user to click a circle more than once you can use more variables to keep track or just add this code to the onPress events

this._x += +99999;

to send it way of screen, it will seem like you press it and it dissapears.
What I mean is, example there are 24 circles all in all, if the user already clicked 8 circles, then he will win. He can click any of those (random) 24 circles as long as he meets the required number which is 8 per level. Is that possible?
johnnybien is offline   Reply With Quote
Old 11-09-2010, 09:49 AM   #24
orange gold
got as?
 
Join Date: May 2007
Posts: 628
Default

I know that's what you mean... I told you exactly how to do it in the post below aha, then you just quoted me and asked me how to do the very same thing? did you even read the code? Or did you mean to ask, "is it possible for you to do it for me?"
hhahaha
__________________
Feel free to PM me if you have a question
orange gold is offline   Reply With Quote
Old 11-10-2010, 01:18 PM   #25
johnnybien
Registered User
 
Join Date: Nov 2010
Posts: 34
Default

Quote:
Originally Posted by orange gold View Post
I know that's what you mean... I told you exactly how to do it in the post below aha, then you just quoted me and asked me how to do the very same thing? did you even read the code? Or did you mean to ask, "is it possible for you to do it for me?"
hhahaha
I got it! So if put:

if (numPressed == 10) {
gotoAndStop(2)
}

It will go to another page which is "You Win" page when the user clicked 10
circles? Am I right?

Can I upload here the file of the game?

Actually I have a LOT of problems right now because what I said before, I'm just new in AS 2.0 and it's really hard for me now to study the all the basic because the deadline is near (actually the deadline was moved). My problem right now is, just like what I said before, I have 24 objects already displayed in the scene and it's only 8 are clickable. By the way, 24 objects that with different pictures. And it's matched with a text. The game is just like the Mystery Case, almost the same here:

h**p://screenshots.en.softonic.com/en/scrn/56000/56107/3_547Thumb3.jpg

It was randomized (activation) and it's matched with the text when the user clicked the text, the text will be hided together with the object clicked. Do you have a file where I can use as my reference with this one?
johnnybien is offline   Reply With Quote
Old 11-10-2010, 11:56 PM   #26
orange gold
got as?
 
Join Date: May 2007
Posts: 628
Default

Yeah, upload it here and I'll take a look...
and yes, that would send you there once 10 are clicked, but you have to remember to make that variable go up by 1 everytime one is clicked otherwise it will never reach 10

this is the code to make it go up one:

ActionScript Code:
numPressed ++;

and you put that inside an onPress event.
__________________
Feel free to PM me if you have a question
orange gold is offline   Reply With Quote
Old 11-11-2010, 12:22 PM   #27
johnnybien
Registered User
 
Join Date: Nov 2010
Posts: 34
Default

Here's the file:

sendspace.com/file/434g5x
johnnybien is offline   Reply With Quote
Old 11-11-2010, 08:28 PM   #28
orange gold
got as?
 
Join Date: May 2007
Posts: 628
Default

To randomize the location of everything add this to you "AS-Main" layer

ActionScript Code:
object1._x = Math.random()*((Stage.width)-120); object1._y = Math.random()((Stage.height)-10) object2._x = Math.random()*((Stage.width)-120); object2._y = Math.random()((Stage.height)-10) object3._x = Math.random()*((Stage.width)-120); object3._y = Math.random()((Stage.height)-10) object4._x = Math.random()*((Stage.width)-120); object4._y = Math.random()((Stage.height)-10) object5._x = Math.random()*((Stage.width)-120); object5._y = Math.random()((Stage.height)-10) object6._x = Math.random()*((Stage.width)-120); object6._y = Math.random()((Stage.height)-10) object7._x = Math.random()*((Stage.width)-120); object7._y = Math.random()((Stage.height)-10) object8._x = Math.random()*((Stage.width)-120); object8._y = Math.random()((Stage.height)-10) object9._x = Math.random()*((Stage.width)-120); object9._y = Math.random()((Stage.height)-10) object10._x = Math.random()*((Stage.width)-120); object10._y = Math.random()((Stage.height)-10) object11._x = Math.random()*((Stage.width)-120); object11._y = Math.random()((Stage.height)-10) object12._x = Math.random()*((Stage.width)-120); object12._y = Math.random()((Stage.height)-10)
__________________
Feel free to PM me if you have a question
orange gold is offline   Reply With Quote
Old 11-14-2010, 03:23 PM   #29
johnnybien
Registered User
 
Join Date: Nov 2010
Posts: 34
Default

Hey, do you think another solution for the random activation is to make a lot of frames with different objects to find? And the frames will be called randomly.
johnnybien is offline   Reply With Quote
Old 11-17-2010, 02:00 PM   #30
johnnybien
Registered User
 
Join Date: Nov 2010
Posts: 34
Default

Hey! I almost done. Can you help me with the hint button and the description / things to find?
johnnybien 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


All times are GMT. The time now is 07:10 AM.

///
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.