This is a blog about Flash & AS by betaruce :-)



Calendar

August 2007
M T W T F S S
« Jul    
  1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31  

May 13, 2007

AS3 tips: “/” but not “\”

Filed under: Using Flash — betaruce @ 11:56 am

In AS3, if you want to type a link to a website or load in something, make sure you use “/” but not “\”. For example:

http://……
C:/program files/….

This is because if you use Windows, the links shown in the file browers will use “\”, and if you simply copy that into your AS, you will fail to load in that thing and then you will keep searching for bugs without a clue.

• • •

2 Comments »

  1. What about “file:///C:/…”?

    Comment by Anonymous — May 13, 2007 @ 6:04 pm
  2. you could use a little Regular Expression to check:
    // notice in local links on Windows you have to escape the backslash
    var link:String = “C:\\myDir\\config.xml”;
    var regexp:RegExp = /\\/gi;

    link = link.replace(regexp, ‘/’);

    // returns c:/myDir/config.xml

    Comment by Brandon Ellis — May 13, 2007 @ 7:53 pm

Comments RSS • TrackBack URI

Leave a comment

Powered by: WordPress • Template by: Priss

cheap phentermine phentermine site phentermine effects online phentermine phentermine prescription buy phentermine online phentermine alternatives phentermine deit pill cheap generic phentermine order phentermine online Clenbuterol Phentermine online pharmacy phentermine buy phentermine weight loss pill Cialis Comparison Viagra Cheap Viagra Online Prescription generic viagra sale viagra online viagra viagra pill discount sale viagra Generico Impotencia Viagra viagra sildenafil citrate Xanax Online xanax order xanax valium versus xanax