Results 1 to 3 of 3
  1. #1
    Palace Guard
    Join Date
    Aug 2008
    Location
    Location,Location
    Posts
    3,720

    Default If statement operators in flash

    Hello,

    Is there a way to check from a a range of a number is true, for example i have an event in actionscript that triggers when Score >= 9500 however it keeps triggering that if statement because my score keeps increasing above 9500, how can i either stop it from triggering or check withing a range of numbers for example.
    Code:
    if ( Score == 9500-10100 ) 
    {
    
    //do something cool
    
    }
    I know what i did is probably wrong but its how i can explain it

    Thanks
    Last edited by TheAgent; 11-16-2010 at 12:28 PM.

  2. #2
    MSgt. Shooter Person
    Join Date
    Mar 2007
    Posts
    456

    Default

    if ( Score => 9500 && Score =< 10100 )

    my => might be backwards i prefer the faces
    Project Lead and Lead Programmer
    Critical Point: Incursion Project Site & Studio Site
    CP:I are recruiting: link here
    Check our our Showcase thread here: link here
    Check our our Facebook page here: link here

  3. #3
    Palace Guard
    Join Date
    Aug 2008
    Location
    Location,Location
    Posts
    3,720

    Default

    thanks that helped : ]


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.