Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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 January 13th, 2004, 03:13 PM
timothye timothye is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Sweden/Sverige/USA
Posts: 134 timothye User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
[help]flash game and level up ?

ok i cannot figure this out ..
what i want is when the player get a certain ammount of points then it goes up a level ..
this is whta i have
Code:
onClipEvent (load) {
	if (_root.score=30) {
		_root.youwin_mc.gotoAndPlay(2);
	}
}

but this doesnt work ..i cannot findout what should go here>>>>> score=30
thanks for any help
cheers

Reply With Quote
  #2  
Old January 13th, 2004, 04:53 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
I've attached an .fla and some code. This code goes in a keyframe instead of a clip.

Code:
_root.createTextField("score", 0, 0, 0, 0, 0);
score.type = "dynamic";
// ===========================================
this.onEnterFrame = function() {
	if (score.text == 30) {
		youwin_mc.gotoAndStop(2);
	}
};
button.onRelease = function() {
	score.text = score.text+30;
};
Attached Files
File Type: zip game.zip (4.0 KB, 179 views)

Last edited by jmichels : January 13th, 2004 at 05:03 PM.

Reply With Quote
  #3  
Old January 13th, 2004, 05:03 PM
timothye timothye is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Sweden/Sverige/USA
Posts: 134 timothye User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
this is how it worked for me ..
Code:
onClipEvent (enterFrame) {
	if (_root.score == 30) {
		_root.youwin_mc.gotoAndStop(2);
	}
}

thanks so much for the help ..

CHEERS !

___________________________________

1 more thing ..i cannot for the life of me dulicate a mc ..
what i want is when they are shot they will randomly appear ..
or to make it super easy ..
just re appear in the same spot ..
can you help on that as well ..


shot =goto empty frame ..and wait x ammount of time ,,then appear again .
setTimer()
set interval ?
i have been working on these 2 things for 30 hours ..
cheers

Last edited by timothye : January 13th, 2004 at 05:06 PM.

Reply With Quote
  #4  
Old January 13th, 2004, 05:05 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
My pleasure.

Reply With Quote
  #5  
Old January 13th, 2004, 06:42 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
You would have to script a hitTest and when it finds that the two clips have intersected, you would need this code for the keyframe:

Code:
timer = setInterval(delay, 2000);
function delay() {
    clearInterval(timer);
    i = i+1;
    duplicateMovieClip(clip, "clip"+i, i);
}


In the movie clip's actions panel, you would need:

Code:
onClipEvent (load) {
    this._x = random(250);
    this._y = random(150);
}

Last edited by jmichels : January 13th, 2004 at 06:45 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > [help]flash game and level up ?


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway