ActionScript 2.0 :: Variable Names Sent Via POST?

Nov 14, 2009

I'm working on a simple form in AS2 that will send some variables via POST. These are being sent to a CMS in the background. Unfortunately, the CMS mandates that the variables must be named a certain way. They must be named fields[thefieldname] which really messes up the Actionscript involved. Does anyone have any thoughts about how I could escape these [ ] characters so they don't get interpreted wrongly as an Array by actionscript?

Code:
on (release) {
var msg:LoadVars = new LoadVars();

[code]......

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Instance Names And Variable Names: It Goes Deeper

Mar 20, 2011

I started a thread about a reference to a symbol House, in the output window, which was: House_1. A lot of people said some useful things about that. All day I've been thinking about it, and I came to the conclusion that I don't understand things, at a very basic level.

Consider:I make a movieclip which I give the Symbol name Drawer. (I don't export it for AcitonScript.)On the stage I manually place two instances of this Symbol. The first one I give the Instance Name drawer (in the properties panel). The second one I leave nameless.Now if I trace the names of both these clips, by

trace(this.getChildAt(0).name);
trace(this.getChildAt(1).name);

the output window gives me

drawer
instance2

Now I know that the so-called "instance name" which I gave in the Properties Panel (drawer) is, in reality, a variable name which Flash gives my first instance behind the scenes. And instance2 is a name that Flash gives my second instance. What exactly the nature of that name is, I do not know.My point is: both names (drawer and instance2) are the .name property of these movieclips. Otherwise I could not have traced them through asking for the .name property, in the above. Yet only the first of these two can be manipulated:

drawer.x can be set;
instance2.x can (as we know) not be set.

But...why? What is the real difference between these two kinds of names? How can they both be the .name property of their underlying movieclip, yet be of such a different nature? What IS the nature of the instance2 name? If it's a String, how come the .name property of one movieclip can be a variable name, while the .name property of another (but identical) movieclip is a String?

I've searched every bit of web page on the net I could find. But it looks as if nobody addresses this issue. We all just work with it - but it makes no bloody sense. A name property = a name property, you'd think. Whether Flash set it or I set it should not make a difference. The x property of a clip, for example, does not change in nature according to who set it - me or Flash.So, again, just to emphasize the problem: how can a property (the name property) of a movieclip change in NATURE depending on who set it? After it's been set, shouldn't the name property of a clip be of exactly the same nature as the name property of another clip?

View 8 Replies

ActionScript 3.0 :: Combine Multiple Variable Names Together To Target New Variable?

Jan 31, 2012

I'm still learning flash and actionscript 3 and i am having trouble with variable and object names. I need to be able to combine variable names together (in the same way as php can combine by doing var1.var2).

My swf contains 4 loaders (image1_loader, image2_loader etc..) which are a child of (image1_content, image2_content etc.....)

I then have 4 buttons which load an image into the loader and while doing so they define the currently active loader.

Finally i have 4 control buttons - scale up/down and rotate clockwise/anticlockwise which should only control the currently active loader (as set by the buttons above)[code]...

View 2 Replies

Actionscript 3 :: Combine Multiple Variable Names Together To Target New Variable

Jan 31, 2012

I'm still learning flash and actionscript 3 and i am having trouble with variable and object names. I need to be able to combine variable names together (in the same way as php can combine by doing var1.var2).

My swf contains 4 loaders (image1_loader, image2_loader etc..) which are a child of (image1_content, image2_content etc.....)
I then have 4 buttons which load an image into the loader and while doing so they define the currently active loader.
Finally i have 4 control buttons - scale up/down and rotate clockwise/anticlockwise which should only control the currently active loader (as set by the buttons above)

So my buttons as well as loading the image have the event listener:

image1_btn.addEventListener(MouseEvent.CLICK, setCurrentSelection);
image2_btn.addEventListener(MouseEvent.CLICK, setCurrentSelection);
(and so on..)
function setCurrentSelection(e:MouseEvent):void {

[Code]...

So within the rotateClockwise and rotateAntiClockwise functions i need to be able to recognise which is the currently active loader and have that number instead of the X - so if it is image1_loader - it needs to be image1_content, if 4 - image4_content... I had tried to do it as this but it doesn't like it being a string:

rotateAroundCenter((activeLoader+'_content'), 10, ptR);

View 3 Replies

ActionScript 3.0 :: Combine Multiple Variable Names Together To Target New Variable

Jan 31, 2012

I'm still learning flash and actionscript 3 and i am having trouble with variable and object names. I need to be able to combine variable names together (in the same way as php can combine by doing var1.var2).My swf contains 4 loaders (image1_loader, image2_loader etc..) which are a child of (image1_content, image2_content etc.)I then have 4 buttons which load an image into the loader and while doing so they define the currently active loader.Finally i have 4 control buttons - scale up/down and rotate clockwise/anticlockwise which should only control the currently active loader (as set by the buttons above)So my buttons as well as loading the image have the event listener:[code]So within the rotateClockwise and rotate Anti Clockwise functions i need to be able to recognise which is the currently active loader and have that number instead of the X - so if it is image1_ loader - it needs to be image1_content, if 4 - image4_content.I had tried to do it as this but it doesn't like it being a string:[code]

View 3 Replies

ActionScript 2.0 :: Create Variable Names Using My Percentage Variable?

Dec 4, 2005

I'm currently working on an advanced preloader and i'm creating loads of different variables etc. based on the percentage loaded. I need the variables to be named Number + percentage, so in the end I will have Number1, Number2, Number3, Number4 etc. How can I create variable names using my percentage variable? Can't seem to find anything that answers my question.

View 2 Replies

Asp.net Mvc :: Use "." In POST Parameter Names, Generated By Flash?

Mar 8, 2012

I'm trying to find out if a Flash application can create a POST request, where some of the names of the posted items include the "." character?

The background: I'm working with someone who is writing a Flash application that has to POST data to the server. I'm working on the web application which receives and saves the data. As such, I know little about the inner workings of Flash myself.

To allow automated data-binding at the server (within Microsoft MVC), I want the names of the POST items to use a particular naming convention. So if I want to receive the results of two tests, I would like the POST items to use the names:

[Code]...

However, the developer says that when constructing a POST request within Flash, any items with a "." in the name are ignored, and not included in the POST request. Is this a known limitation of Flash, or should it be possible to include a "." in the POST item names, as I would like?

View 1 Replies

ActionScript 2.0 :: How To Post Variable Using GetURL

Aug 11, 2007

Why am I not able to pass variable to PHP using getURL?I have this actionscript ...

Code:
var bb_debugcount:String = "4";
getURL("myserverpage.php", "_self", "POST");

[code]....

View 1 Replies

ActionScript 2.0 :: POST Array Variable To Webpage?

Sep 15, 2009

I have a webpage that accepts POST variables, I can post normal variables to it from flash like this:

Code:
lv = new LoadVars ();
lv.myvar1= "test1";

[code]........

View 1 Replies

ActionScript 2.0 :: Post Variable To Php Page From Flash

Jul 30, 2008

I am trying to set up a form in a flash movie that will post the users entry to a php page. I then need the php page to re-direct the user to a page to show a result.

I have the following AS in the flash form. It seems to post to the php page but from within the flash movie. Rather than taking them to the php page, as a non-flash form post would.

on (release) {
loadVariablesNum("search.php", 0, "POST");
}

Is there a way I can get the flash form to post to the php page in the same way a non-flash form would post.

Hope this makes sense! Basically, when the user clicks the submit button, I need the browser to load another php page that gets the user's input via post.

View 1 Replies

ActionScript 2.0 :: Pass A Post Variable Into Flash?

Aug 21, 2003

How can I pass a Form post variable into Flash?

View 3 Replies

Php :: Send An Actionscript ByteArray As A POST Variable (within Facebook)

Dec 18, 2010

I would like to use Flash to send a ByteArray (of a PNG image) to a php file, in a facebook application. Is there a way to do this by sending the ByteArray as just one POST variable instead of as the entirety of the POST data?

There was a nearly identical question here: How can I send a ByteArray (from Flash) and some form data to php? but the problem is different; instead of smuggling other variables in other parts of the request, the image itself has to be sent as just a variable because Facebook commandeers the post data and puts in its own junk.

If not, can I send the image in some form other than a byteArray?

View 2 Replies

ActionScript 2.0 :: Use LoadVars To Send POST Without Attached Variable Name?

Jan 12, 2009

Let's say I'd like to post some data to a server side script. If my data is

var data:String = "<data><tag1>hi</tag1></data>";

and I'd like to send it with LoadVars, I can do:

var lv:LoadVars = new LoadVars()
lv.data = data;
lv.sendAndLoad("http://thescript/", lv, "POST");

However, this results in the POST looking like this:

data=<data><tag1>hi</tag1></data>

if I want to send it without the variable name (no "data=", just the actual data), how is this possible? In AS3 I can just use the .data property of a URLRequest and it will work, however I can't find a way to do this in AS2.

View 1 Replies

ActionScript 2.0 :: Using XML For Variable Names?

Jun 19, 2007

I'm attempting to build a menu using a XML. I have read the tutorial on the site and I am attempt to do it in a slightly different manner. Anyways, I am trying to make dynamic variable names for my text fields. And because of the way I am doing this I found it easier to try to use XML to hold the field name. But when I try to use the name from the XML file it won't work. I can trace it and get the proper word but when used in the script it breaks.Below I want to replace 'popMenu' with the fieldName variable.

Code:
mainMenu.menu1.onRollOver = function(){
listLength = menu_xml.childNodes[0].childNodes;

[code].....

View 1 Replies

AS3 :: IDE - How To Concatenate Variable Names

Nov 24, 2007

How do I concatenate variable names in AS3?Something like this:

for(var i:int=0 ; i<5 ; i++) {
var "myVar"+i:Array = new Array();
}

View 5 Replies

ActionScript 2.0 :: Html Post Setting A Flash Variable In The Next Page?

Feb 18, 2007

Is it possible that I go to an html page , (which contains a flash movie) and let the movie start playing in a certain behaviour according to a parameter passed in the URL?

View 3 Replies

ActionScript 3.0 :: MySQL, Php: Post A Variable, And Retrieve Info From Db In Flash?

Aug 2, 2009

Currently I'm setting up a webservice, which includes a login to access the member area.I'm testing all components seperately, and I've ran into a problem. When the user logs in I want flash to retrieve the user_id as a variable, so that I can use this user_id for member related database access. However, I'm having problems with retrieving the user_id.The login is done by inputting the email and password of the user. If these variables match the data in the database the user is send to the member area. I want to get the user_id by posting the email variable to a php file. In the php file the following code is responsible for this:

PHP Code:
$email = mysql_real_escape_string($_POST["email"]);

View 2 Replies

CS3 : Automatically Assign Variable Names?

Jan 27, 2010

I'm working on a project using google maps. For part of it the user must enter coordinates and click a button in order to add a marker to a map. The code I have written so far allows this to be done once:

play_btn2.addEventListener(MouseEvent.MOUSE_DOWN, submitdata);
function submitdata(e:Event){
var marker9:Marker = new Marker(

[code]....

As it is the only one marker can be added as it keeps getting replaced. I want to make it so that the variable name changes each time a marker is to be added.

View 2 Replies

Flash :: Use Variable Names In Actionscript 2?

Feb 19, 2011

I'm looping over an array named shopData and need to use values within that array to create new variables. Inside the loop, I'm trying something like this: shop_(shopData[i].shopName).keyword = shopData[i].keyword; but I'm having trouble with the portion in () and can't seem to find the right syntax for this. Assuming shopData[i].shopName = "foo" I need to create a variable named:

[Code]...

View 1 Replies

Flash :: How To Concatinate Variable Names In AS2

Jan 27, 2012

I'm trying to loop through a set of textFields that I created in the Flash IDE, and named them through the property panel with name called "dot_text1, dot_text2, etc...). These textfield elements are nested in another movieclip called "bouquet".

My issue is that I'm trying to loop through all of them and store them into an Array for later use, but I keep getting undefined when I trace it out. I'm writing the script in the root of the file.

[Code]...

View 1 Replies

ActionScript 2.0 :: LoadVars Variable Names?

Jun 18, 2009

I am using loadVars to get strings from a text file and then I loop it to put them all in an array. But as indicated in the code, I want to check the variable name so a certain named variable will be put into a different variable, not the array. I have not been able to find how to check this...everything I try gives me undefined.

ActionScript Code:
myVars.onLoad = function(success) {
if (success) {

[code].....

View 0 Replies

ActionScript 2.0 :: Using The # Sign In Variable Names?

Apr 11, 2011

Can I use the # sign in AS2 variable names?

like ->> var item_#_productName = "test"

I must use a list of preset varilable names but I am getting a syntax error when I use the # sign.

View 2 Replies

ActionScript 3.0 :: Arrays And Variable Names?

Jun 15, 2009

How/can you pass a array into a variables name?

var urlRequestArray:Array = ["home.txt", "contact.txt", "about.txt"]
var reqNameArray:Array = new Array("homeReq","contactReq", "aboutReq")
for (var i:uint; i < buttons.length; i++){

[code].....

View 3 Replies

ActionScript 2.0 :: Incremental Variable Names?

Jul 20, 2011

I'm having a few issues with incrementing numbers in variable names, was wondering if I could getThe below code is what I'm trying to implement, but I keep getting errors.

Code:
for( var i = 0; i < __values.length-1; i++)
{

[code]......

View 6 Replies

ActionScript 3.0 :: Incrementin Variable Names And FlashVars?

May 28, 2009

I send flashvars to flash. Those variables are one user id variable and unknown number of corresponding friend and relation vars (friend1, friend2, relation1, relation and so on, all the items from DB).I get the of course from an object:Code:var flashVars=this.root.loaderInfo.parameters;and check how many friends did the php send to me . There is one user id variable and an even number of friends and relations so the way i check how many mates do i have is:

View 1 Replies

ActionScript 3.0 :: Dynamic Names For Class And Variable?

Sep 20, 2009

How do you make a new instance of a class with a dynamic name.

var dynamicname = new dynamicname()

i try something

var this["test"]:Class = new ["Test"]()
 
but offcourse its not this...

I need this couse i have a librairy with SWC fonts they are only reference.. I get the font name from a CSS file and after i need to make a instance of the SWC file so the font is embedded.

View 3 Replies

ActionScript 3.0 :: Dynamically Created Variable Names?

Jan 22, 2009

After some further testing, I found out that under Actionscript 3 XML (E4X) I'm unable to use dynamicaly created variable names...

The famous:

Code:
var i:number = 111
this["someVarName" + i] = "actual_value"
trace(someVarName111) // = actual_value

does not work for me with E4X lingo...

Code:
var myXML:XML
myXML = "...." //asume valid XML content here
trace(myXML.XMLData.@Memo_EN)

[code]....

View 0 Replies

ActionScript 2.0 :: Dynamic Variable Names When Out Of Root?

Jan 11, 2010

This is an example of the kind of issue I'm trying to solve. Say I'm looking to set 10 text fields (text_field_1 to text_field_10) within my movie clip 'myMovieClip' to the value of i. Now if the for loop and the text fields are in the place (_root) all I would have to do is:

ActionScript Code:
for (i=1; i<10; i++)
{

[code]....

View 3 Replies

ActionScript 2.0 :: Variable Name Be To Get To Start Of Image Names?

Feb 18, 2005

I want to parse the image names in the following XML into an array:[code]What would the variable name be to get to the start of the image names?[code]

View 1 Replies

ActionScript 2.0 :: ASP And Dynamic Variable Text Box Names

Nov 23, 2005

Having a problem with a Flash/ASP/Database project.I've seen tutorials that pulls address book listings dynamically from the DB. When you hit "next" button it just populates dynamic text fields with variable names like "name" "address" with the appropriate info. Problem I'm having is.. what if you want to display all the entries on the same screen.If the variable names on the dynamic text fields are hard coded named "name" "address" "phone number" etc. , how can the second set of info display underneath the first one properly and not just pull the same text from the first record into the text fields? (name2, address2, etc.)

Is there a way to dynamically change the variable name of a dynamic text field? I'm thinking you should be able to have it note how many records there are, then loop until it reaches the end of the record set. So, can the variable names be dynamic so it will populate the text fields with the appropriate info?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved