A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Handling Strings

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    32
    With a URL command in Flash i request his current URL in the form of

    http://mywebspace/newmap/myflash.swf

    i would like to cut off the swf at the end and replace it by
    asp.

    Can anybody give me a clear or understandeble tutorial about this?

    many thx

    Regards~Sjekke~


  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    215
    Hi,

    you have to use substring function, for example you have

    SetVariable "url" ="http://mywebspace/newmap/myflash.swf "

    SetVariable"tokeep"=substring ("url",0,24)

    /*you keep the letters from the first one which is 0 (!) here it is the 'h' of http... to the 24th (included !) here it is the p of ...newmap.
    */

    Then your variable 'keep' is http://mywebspace/newmap
    so you can add whatever you want to it

    for instance
    SetVariable "newaddress"= tokeep & "/myflash2.swf"



    Hope that helps



  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    32

    Sure!

    I was trying myself and got some solutions already.
    But now with this i know enough to deal with it completly.

    Many thx!

    Regards

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