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 November 11th, 2003, 11:17 AM
petermaz petermaz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 4 petermaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Flash If staement problem! Easy one!

I am trying to test the value of a text box (insatnce name = postcode) when a Button is pressed using the following script:


function OK() {
if (postcode.text == "PO1 4AH") {
gotoAndPlay(28);
} else {
alert = "Not Found!";
}
}


The OK button is calling the script OK, and this works. What i need to know is how to move to frame 28 if the textbox contains the postcode.

Thanks

Pete

Reply With Quote
  #2  
Old November 11th, 2003, 03:26 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
Here is an fla to give you an idea of how it works. You needed to insert a call function to call the OK function and make sure that the button's instance name does not contain the same name as the function that you are calling if the button is used as a method.
Attached Files
File Type: zip function.zip (3.8 KB, 218 views)

Last edited by jmichels : November 11th, 2003 at 04:06 PM.

Reply With Quote
  #3  
Old November 12th, 2003, 03:26 AM
petermaz petermaz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 4 petermaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for that, it still didn't work until i put the script on a different layer! Is this the way it has to be done?

Reply With Quote
  #4  
Old November 12th, 2003, 04:51 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
Everything can function from the same layer. Most developers prefer to use multiple layers to keep order.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Flash If staement problem! Easy one!


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