A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: if then statements

  1. #1
    I've got some script that checks the url of the file and sets a variable. I'd like the file to work on my hard drive and online. The problem is that online the slashes are forward and local they are backwards.

    Do I have to write two if statements for every variable or can I write one that goes:

    If url = 05/file.swf or 05\file.swf,

    Nowatamean?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    263
    It would be written like so:


    If (GetProperty ( target,_url ) eq "05/file.swf" or GetProperty ( target,_url ) eq "05\file.swf")
    do something
    End If

    The or,and,not need the complete string before they will
    test properly.


    Hope this helps.

    MA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center