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 September 22nd, 2003, 05:02 PM
kerrih1164 kerrih1164 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 kerrih1164 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
else if not working

on my movie I have buttons that move when clicked and then move again when clicked and so on. I have used the if command which is working but for some reason the else if is not. What should I be looking for to fix the mistake? if you think you can help i will send the swf. Thank you!

Reply With Quote
  #2  
Old September 24th, 2003, 01:17 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
why not post some code or pseudo code that is not working?

Code:
var bret="dork";
if(bret == "dork"){
     trace("bret is a dork");
} else if(bret == "dorkus"){
     trace("bret is a big dorkus");
} else {
     trace("bret is not a dork");
}


-bret

Reply With Quote
  #3  
Old September 25th, 2003, 09:32 PM
kerrih1164 kerrih1164 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 kerrih1164 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The code looks something like this:

on (release){
if (_root.movPH._currentframe=1){
_root.movPH.gotoAndPlay("original");
_root.movGD.gotoAndPlay("original");
_root.movCT.gotoAndPlay("original");
_root.movNM.gotoAndPlay("original");

} else if(_root.movPH._currentframe=42){
_root.movPH.gotoAndPlay("blank");
_root.movGD.gotoAndPlay("static");
_root.movCT.gotoAndPlay("blank");
_root.movNM.gotoAndPlay("static");

} else if(_root.movPH._currentframe=50){
_root.movPH.gotoAndPlay("original");
_root.movGD.gotoAndPlay("original");
_root.movCT.gotoAndPlay("original");
_root.movNM.gotoAndPlay("original");
}


Each movie clip has a button embedded in it and the action is on the button. So when a button is clicked they each do soemthing different. Lemme know if you can help. Thanks!

Reply With Quote
  #4  
Old September 25th, 2003, 11:25 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
when you are comparing two results, you need to use the double equals notation, otherwise, you are just setting the variable in each if statement (which always returns true).

Notice in my if statements, i have "==". Chance yours to that and it should work as planned.

-bret

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > else if not working


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 3 hosted by Hostway