Flashadvisor logo
:: Desktop Shortcut
:: Flash Help
Advices from Experts

 Submit Here! · Link to Us · Newsletter · Tell a Friend ·

      Add Tutorial |

 

Advertise here








 

Google

Search WWW   
FlashAdvisor.com

 Home > Tutorials  > ActionScript

If ElseIf Condition

Author: FlashAdvisor | Email


Advertisement

The If statement if very important as it has the ability
to decide on courses of action. At is simplest it will
perform an action if something is true. For example.
If the value=1 then gole is right side . Alternatively
you can make it the if statement perform an action if
the value=2 gole is left side. In the last, you will
see the Else If statement used. This allow for a second
(third, forth etc.) condition to be tested and the appropriate
actions to be executed.



If
(value = 1)

Go to and Play ("rightside")

End If




If
(value = 1)

Go to and Play ("rightside")

Else

Go to and Play ("leftside")

End If



If
(value = 1)

Go to and Play ("rightside")

Else If (value = 2)

Go to and Play ("leftside")

Else

Go to and Play ("centre")

End If

 



| 1 |

Rate This Tutorial :
We hope the information helped you. If you have any questions or comments, please don't hesitate to post them on the Forums section
Submit your Tutorial at Click Here
  

Home | About Us | Contact Us | Feedback | Advertise with us

Best viewed in 800x600 resolution with Internet Explorer.

Site Developed and Hosted by  ethicsolutions.com
All rights reserved with FlashAdvisor

Flash is a registered trademark of Adobe Systems, Inc.

1 user online