A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: prolly an easy question [variables]

  1. #1
    Member
    Join Date
    May 2003
    Posts
    40

    prolly an easy question [variables]

    Hi,

    When i have a variable that i want to have flash read in through html,
    e.g. "*.swf?variable=whats up doc" and i want that variable printed in a dynamic textfield but with quotes added (so that it prints "whats up doc"). What is the easiest way to do this?

    I am asking this because FireFox doesn't understand when i am using quotes in my variables. So i want flash to add them to my variable.

    Regards,

    Marcus

  2. #2
    All 1s and 0s dmonkey's Avatar
    Join Date
    Nov 2005
    Location
    Leeds, UK
    Posts
    606
    Hi,

    Try it like this:

    Code:
    var myString = "What's up Doc?";
    
    myString = "\"" + myString + "\"";
    
    trace(myString);
    
    //Output: "What's up Doc?"
    Hope this helps.

  3. #3
    Member
    Join Date
    May 2003
    Posts
    40
    thanks so much!

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