Solved

Flash LoadVars - need to load in a string that contains an ampersand

Posted on 2009-05-17
4
394 Views
Last Modified: 2013-11-11
I've got loadvars working fine in flash, but I need to load in a string that contains URLS which contain the ampersand character (&). Problem is flash sees these as separators for the name=value pairs and is loading stuff into all kinds of different variables.

Is there some way I can excape these in the source file? I tried backslashes before them which didnt work. Or if I swapped them for something else - say | - is it possible to replace these with the & character with acxtionscript once I have the variable loaded somewhow? Or any other ideas how I can do this?

Thanks,
Matt
0
Comment
Question by:MatthewP
  • 3
4 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
ID: 24407541
Those are the ones Flash expects special action on, so you cannot use them...  The & or any other special characters need to be coming in as a urlescaped format where & should be %26 or = should be %3D...  

     http://community.contractwebdevelopment.com/url-escape-characters

CyanBlue
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 24634947
Did that answer help???  It'd be nice if you could close this topic if you resolved the problem...  ;)

CyanBlue
0
 
LVL 6

Author Closing Comment

by:MatthewP
ID: 31582364
Yes it did, I had to do a string replace in the PHP script that generated the source but fixed it up nicely, many thanks!

Matt
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 24931978
Cool...  :)

CyanBlue
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question