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 14th, 2004, 01:10 AM
squeelia squeelia is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Melbourne, Australia
Posts: 3 squeelia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Else if statement not working! PLEASE HELP!

Hi All,

I have a menu system that animates as you roll over the button and resets itself when you roll off. The buttons change as to where your mouse has been (for want of a better solution, I have made a movie clip with all the different combinations of animations and labelled them so I can play them when needed).

So this code is on the keyframe of the movie clip that holds the buttons and the movie clip with the animation(menubg):

Code:
qualbtn.onRollOver = function () {
	if (menubg._currentframe == 105 or 120 or 165){
			menubg.gotoAndPlay("serv2qual");
	} else if (menubg._currentframe == 15 or 60){
			menubg.gotoAndPlay("tech2qual");
	} else menubg.gotoAndPlay("qualrollover"); 
}


The code is working for the first line on each button but stops working for the second and third line.

Can anyone tell me what might be wrong with this???

Thankyou!!

Reply With Quote
  #2  
Old January 14th, 2004, 02:06 AM
Red|5 Red|5 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Gdansk
Posts: 10 Red|5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 49 sec
Reputation Power: 0
try this:


qualbtn.onRollOver = function() {
if (menubg._currentframe == 105 or 120 or 165) {
menubg.gotoAndPlay("serv2qual");
} else if (menubg._currentframe == 15 || menubg._currentframe == 60) {
menubg.gotoAndPlay("tech2qual");
} else {
menubg.gotoAndPlay("qualrollover");
}
};

Reply With Quote
  #3  
Old January 14th, 2004, 05:15 PM
squeelia squeelia is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Melbourne, Australia
Posts: 3 squeelia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your help but that didn't work either!

It still doesn't play any of the animations after the IF statement.



I've tried so many different combinations and none work - I tried swapping the code around and no matter what, the first animation is the only one that ever gets to play.

Reply With Quote
  #4  
Old January 14th, 2004, 05:48 PM
Red|5 Red|5 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Gdansk
Posts: 10 Red|5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 49 sec
Reputation Power: 0
Code:
qualbtn.onRollOver = function () {
     with(_root){
          if (menubg._currentframe == 105 || menubg._currentframe == 120 || menubg._currentframe == 165){  
               menubg.gotoAndPlay("serv2qual");  
          } else if (menubg._currentframe == 15 || menubg._currentframe == 60){  
               menubg.gotoAndPlay("tech2qual");  
          } else menubg.gotoAndPlay("qualrollover");
     }
}


try this. it's alittle bit longer, of course, but it might work. I'm just guessing, but it's probably not working because the script might not be finding the target in the if statement (ie. instead of menubg, use a direct address to the movie clip, _root.menubg, or wherever it is.

If this don't work either, email me the file you're working on and I'll have a look. It might just be a matter of structure and location of the movie clips, like I said.

Reply With Quote
  #5  
Old January 14th, 2004, 06:24 PM
squeelia squeelia is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Melbourne, Australia
Posts: 3 squeelia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I tried that and it didn't work either - I have attached the file so you can have a look.

Thanks!!!
Attached Files
File Type: zip grey menu.fla.zip (6.6 KB, 98 views)

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Else if statement not working! PLEASE HELP!


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