Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








How Do I Use Variables In The Javascript String


Hello again everyone,

I'm once again hit with a stumbling block. I have two variables that read into flash from HTML:

linkout - this variable holds the url that I want to send to

_linkout_window_properties - this variable holds the size and other values I want for the window

below is the code snippet that I was trying to use to get those variables to work. I'm not having much luck. Anyone have any hints for how I can get the correct syntax for this?


getURL("javascript: openWindow('"+linkout+", 'game',"+linkout_window_properties+")");




FlashKit > Flash Help > Flash ActionScript
Posted on: 07-22-2004, 10:33 PM


View Complete Forum Thread with Replies

Sponsored Links:

URL String, Variables, Etc...
What I need to do is simple...

I am just using the

loadVariablesNum("message.txt", 0);

method to put text into a dynamic text window. The above script works perfectly fine.

I need to do one more thing though,

"message.txt" is going to change depending upon the url...

As in, of someone comes to the site via the url movie.swf?txt=132678

then I need loadVariablesNum("message.txt",0); to be replaced with...

loadVariablesNum("132678.txt",0);

Im guessing it will be something like this...



loadVariablesNum(messageVariable,0)

where message variable employs some method of picking up the txt=132678 from the url and spitting it out as 132678.txt

any ideas? desparate.

View Replies !    View Related
Using Variables Ina String
Hi everyone,

Simple question I'm sure, but I can't seem to find the right syntax for this. Here's my code:

var c = 0;
for (var i=1; i<=5; i++) {
_root.head1.gotoAndPlay(2);
c = c + i;
}

Basically I have a group of five buttons, I want each one to play frame 2 one after the other. Hence, a loop that goes from head1 to head5 (the names of the buttons).

What I'm wondering is - How do I make it so that I can replace the number in _root.head1 to be the variable i?

example: _root.head"i".gotoAndPlay(2);

I know that's incorrect, but that's why I'm asking how to do it

Also, is there a timer function in flash? For example, I'd like it to wait a half second to go onto the next loop. Is there a function like a 'wait' or 'time' function that I could use for that?

Thanks everyone!

View Replies !    View Related
String Variables
I have an input box where the user types in a number say "48673" for example. How to I make it so the first two numbers (48) apply to variable A where as the last three numbers (673) apply to variable B.

Like if 48673 was a password for a game and the player would start with 48 lives and 673 health, without making them type the numbers in separte boxes.

Can this be done?

View Replies !    View Related
Variables From String.
Doing some deeplinking and just need to know how to grab a few variables from a string.

for example

ActionScript Code:
function importString(stringVars)
myString = stringVars;


myString would look like "section=news & section2=events"
How would I parce that into the variables "section" and "section2"?

View Replies !    View Related
Parsing Variables In A String
hi,

i have a string like "returnPath=keys&score=1" this string comes from a server through a xmlsocket and is an attribute of a certain element.

now i have the following problem:
i want to parse the variables in this string.
so that returnpath = "keys" and score = 1

at first i did it this way:
str = new String(unescape(e[i].attributes.actionString));
//str is "returnPath=keys&score=1"
varArray = str.split("&");
for (j=0; j<varArray.length; j++) {
tmpArray = varArray[j].split("=");
if (tmpArray[0] == "score") {
score = parseInt(tmpArray[1]);
}
else if (tmpArray[0] == "returnPath") {
returnPath = tmpArray[1];
}
}

this worked very good. but i want to make this parsing code more general, so i changed this into the following:

str = new String(unescape(e[i].attributes.actionString));
//str is "returnPath=keys&score=1"
varArray = str.split("&");
for (j=0; j<varArray.length; j++) {
tmpArray = varArray[j].split("=");
set(eval("_root" + tmpArray[0]),eval(tmpArray[1]));
//also tried: eval("_root."+tmpArray[0]+"="+tmpArray[1]+";");
trace ("score: "+_root.score);
}

the problem is that these variables score and returnpath are never created & filled...

View Replies !    View Related
Variables As String - For Experts
HI!

How can I import variables from a text file as strings? I think when I just write variable=test then it is not a string.

I have the following situation:
A text file (1234.txt) with content: test=player

loadVariablesNum ("1234.txt", 0);
location = test +".swf";
loadMovie (location, 1);

This should load the movie player.swf...but it doesn't, because player is not a string. But how can I make it a string??

Maybe someone has an idea.
Thx
Florian

View Replies !    View Related
Variables In Hierarchy String
Can I use a variable in a hierarchy string?

I have a MC I'd like to use in different spots in my movie, and currently I
have this script attached to one of the MC's buttons. "intro" is the name of
the parent MC where I am using it.

tellTarget (_root.intro.scrollUP)

Now, can I create a variable called ScrollVar for example, set the value
somewhere in the movie, and then use the variable in the above code like
this:

tellTarget (_root.ScrollVar.scrollUP)

I tried this, but it did not work. Here are my files:

http://home.uleth.ca/man/temp/vision/

I've made the changes to the "principles" MC.

There are actions on the two scroll arrows, and the two white dots in the
lower left hand corner are MC with three action frames.

Thanks.

View Replies !    View Related
Variables In A URL String - What's The Difference?
Hi there,
I've got a funky one here, so bear with me. From Flash 5, I've got a button that calls and html page and passes parameters to include the contents of a .cab file. The string that works on my web server (http environment):

on (release) {getURL ("http://demos.myserver.com/siebel/callcenter/odweb_kp.htm#Mode=D&TpcFile=Logging%20On,%20Loggin g%20Off.CAB", "_blank")
}

Believe it or not, the above works. Now my client wants to run this site from a CD. My thinking is, just remove the part http://demos.myserver.com/siebel/callcenter/ with an ending result of:

on (release) {getURL ("odweb_kp.htm#Mode=D&TpcFile=Logging%20On,%20Logg ing%20Off.CAB", "_blank")
}

But I keep getting an Internet Explorer error saying:

Invalid Arguments. The arguments must be formatted as 'Mode=???&TpcFile=???[&Opt=???][&Back]'

I've tried inserting every type of character to get the URL to see the rest of the string, but no dice. I'm sure its pretty simple, but damned if I know what's wrong. And remember - this is out of the http realm, so I know that has something to do with it. I've tried adding file:///c:// and all kinds of other things - but it still doesn't work. Anybody have any ideas?

Thanks in advance for any help you can offer!
Regards,
Mike

View Replies !    View Related
Spliting A String Into Variables?
I have created the string below from arrays:

&FlashString=test1=16711680,16711680,16711680,1671 1680,255,255,255,255,&test2=184,437.95,607.95,588. 95,150,383,574.95,602.95,&test3=175,213,244,408,20 8,233,278,397

This string will be stored by Director in a database. When Flash recieves this string back from Director I need to split it up again so it sees them as separate strings.

eg
test1=16711680,16711680,16711680,16711680,255,255, 255,255
test2=184,437.95,607.95,588.95,150,383,574.95,602. 95
test3=175,213,244,408,208,233,278,397

Once I have them in this format I can use the split(',') to recreate my arrays!

Cheers
Ol

View Replies !    View Related
Getting String Names To Be Variables
This is easy for all you gurus' out there, but it would sure help a novice if someone could give me some insight. I need to take a string name and evaluate it as a variable:

For example, if I was in a loop and wanted to make all the movie clips in the loop turn invisible I would think I would write the following if my mc's were content1, content2, content3..etc:

for(k = 0; k<= 5; k++){

"content"+k._visible = false;
}

but that doesn't work. Why does it work to evaluate the name with the count in a loadMovie command like:

for(k = 1; k<6; k++){
loadMovie("tester"+rarray[k]+".swf", "content"+k);
content+k._visible = false;
}

but not in the statement I used. Thanks for helping me.

View Replies !    View Related
Load Variables From Swf's Url String
I want to load variables into a flash document from its string, such as suppose I have a file called wee.swf, but in the adddress i type wee.swf?name=wee&last=wee

Is there a way I can get the variables first and last in my flash movie? Does it have something to do with getURL()?

View Replies !    View Related
Loading Variables Via URL String
Hello,

I have the following code attached to a button in my flash file:

loadVariablesNum("http://mmedia.glos.ac.uk/students/mu305/soe/andalucia/content/accomodationInfo.asp", 0, "GET");


As you probably know, this loads the URL and concatonates the variables in the string for the ASP page to collect. (E.G. "http://mmedia.glos.ac.uk/students/mu305/soe/Andalucia/content/tripInfo.asp?width=undefined&height=undefined&focu sManager=%5Flevel0%2EfocusManager&tabChildren=true &tabEnabled=false&%5FchildCounter=1&textAreaUpload =In+the+first+" [with textAreaUpload being the variable needed by the ASP page]).

When running the SWF, the upload always works the first time with a maximum of 850 characters. However, after then, the SWF is less predictable and doesn't allways all more updating to the ASP page via the URL string.

Does anyone know why this may be? Are there any know problems with sending too many variables in a string?

Here's the SWF: http://mmedia.glos.ac.uk/students/mu...eVersion16.swf

See attached for the FLA.

Regards
Rob

View Replies !    View Related
Extracting Variables From A String
I searched for this method, but I'm not sure what keywords to use. I realize this is probably a simple question, but I don't know where to start.

If I had a variable

RGB = 223,134,52;

and from this I wanted to create the numeric variable values

R = 222;
G = 134;
B = 52;

Can anyone tell me a simple way to extract these numbers from the original string?

Thank you in advance

View Replies !    View Related
Urgent: How To CSS A String With Variables?
Hi, everybody, my problem is like this:

I want to apply CSS to a string, the CSS might be:

var diffCss=new TextField.StyleSheet();
diffCss.setStyle("body",{fontFamily:'Impact,',font Size:'50px',color:'#00CC33'});
this.diffText.styleSheet=diffCss;

however, the string is an XML variable "strDiff". so when I wrote like this:

var txtDiff:String = "<p class='body'>strDiff</p>";
_root.diffTextField.text = txtDiff;

the textField will show "strDiff", not the value of it.

Please help me out. Thanks a lot!

View Replies !    View Related
Problems With String Variables
I have a simple movie clip with two layers, actions and text.
On the text layer there is a dynamic text box with variable name article.
On the first frame of actions layer I have this code
loadVariablesNum("article.txt", 0);
article = title + content;
trace(article)

I have text file with article.txt in the same directory as the fla and swf. Its got this in it
title=Something here&content=some stuff here

when I test the movie a 0(zero) is displayed in the text field and the output window.

What am I doing wrong here.

View Replies !    View Related
Variables And String Manipulation
I've been pulling my hair out at this very simple problem.

I want to load a variable from an external text file and use that variable in a sound class, here's my code:

Text data file:

Quote:





&toPlay=http://domain.com/Some Song.mp3&






Actionscript:

Quote:





//load variables from external text file
_root.loadVariables("http://domain.com/temp.txt");

//stick the variable from that text file into the sound class
//what am I doing wrong? it makes complete sense in my head
soundContainer = new Sound(this);
soundContainer.loadSound(toPlay, true);

View Replies !    View Related
Query String Variables
I know I've done this before, but I can't find the file that had it.

I'm trying to simply load a variable from the URL into flash as a variable.

eg.
"http://www.mywebsite.com/index.html?page=home"
Would send Flash a variable "page" with value "home"

I remember only having to change the embed code to get this to work.

I've seen countless examples of this, but where the variable is in the source code of the page, which is not what I need. The variable must be dynamic, and therefore in the URL.

View Replies !    View Related
Need Sending Variables With URL String
How can I use a URL string that contains the variables with SendAndLoad?

The code doesn't seem to work. Do I need to encode it differently?
Thanks, Attila









Attach Code

function sendData() {

var Form_receiver:LoadVars = new LoadVars();
var Form_SendObj:LoadVars = new LoadVars();

Form_SendObj.name = nameInput.text;
Form_SendObj.phone = phoneInput.text;
Form_SendObj.email = emailInput.text;
Form_SendObj.company = companyInput.text;

Form_SendObj.sendAndLoad("index.html?name=Form_SendObj.name&phone=Form_SendObj.phone&email=From_SendObj.email&company=From_SendObj.company", Form_receiver, "POST");
}

























Edited: 08/06/2008 at 09:21:36 AM by reinhat

View Replies !    View Related
Can I Pass Variables In The URL String?
I am trying to get some variables into a loaded swf at runtime. The variables will carry information so the swf can load the correct xml file. I thought we could pass them through the URL string like so:

new URLRequest("testing.swf?myVar=varOne

but it just throws an URL cannot be found error. How can I get variables into my swf at runtime?

View Replies !    View Related
Parse String Into Two Variables?
How would I take the string: "8, 9" and make it two different variables(x and y), leaving out the comma and space?

there's a catch tho as well. because this is coming from a huge database, some of the entries are off. some of the strings would be like "8,9" with no space or even "8, 9, 10" with three numbers.

View Replies !    View Related
Reading Variables From The Query String?
Does anyone know how to write the code to get a Dynamic Text Box to display variables that have been passed through the query string?

View Replies !    View Related
Pulling Variables From The Query String
Does any one know how I would go about pulling variables from the query string (URL) and post them in a dynamic text box? My overall goal is to have an animated Flash 5 card that will display the name of the person who sent the card and the name of the person recieving the card.

Thanks

View Replies !    View Related
Pulling Variables From A Query String?
alright I've fidgured some things out and this is what I am currently doing.

I am attempting to load variables placed into the query sting (url) into a dynamic text field with the same variable name. Currently it is effecting the variable but it is not putting the values into the text field
Here is my code:

loadVariablesNum ("void", 0, "POST");
to = "0";
from = "0";

I have attempted sending the variables using "GET" as well as "Don't send" with the same results

the page is
http://www.familyties.com/dogDaystes...=josh&from=bob

If you remove the "to" and "from" on the query string the default value of "0" appears in each variable

What am I doing wrong?

View Replies !    View Related
How Do I Pass Variables Into String Object?
Hi,

Im trying to count the number of characters in a string using the string object. I can do this OK when I count the number of chars in a form field but I need to count the number of chars in a variable. Someone told me to use the code "+test+" below to count the variable named 'test', but all this does is return "6". This seems to be just counting the string +test+ (i.e. 6 chars.) rather than a variable

on (release) {
test = "ThisShouldDisplay19";
result = "+test+".length;
}

Can anyone help?

Cheers...John

View Replies !    View Related
Passing String Variables To Flash
I am passing variables in a url string from an asp page to my .swf file and reading the variables into text boxes within flash.

eg.
http://www.mywebpage/pageFlash.asp?...ameVar=François

As you can see, the variable I am using contains a special french character.

Now here is the problem. On some computers the variable is passed to flash with no problem at all and on other computers the same flash file is unable to read the variable. I have tried url encoding the variable to read %E7 and also have placed System.useCodePage=true; on my first line of actionscript, but neither works.

Does anyone know why the special character works on some computers and not on others? All the computers have IE 6 and are running Windows 2000.

View Replies !    View Related
Using The String Command To Build Variables.
Howdy, I'm using Flash 5.

I'm trying to use the string command to identify the variable I want to set the value of. For example I have the following variables defined on frame one:

var vnumber1 = 0;
var vnumber2 = 0;
var vnumber3 = 0;
var whichv = 0;

on frame two there is a stop command and a button with the following script:

on (release) {
_root.whichv = 2;
}

on another layer I have a movieclip loping that has the following script:

String("_root.vnumber" + _root.whichv) = 1;

The String function should return the value: _root.vnumber2

However Flash doesn't seem to like this statement. Is there anyway (without a mountain of if/else statements) to set the value of a variable without "hard coding" the variable. By hard coding in refrence to the above problem I mean:

if (_root.whichv == 2){
_root.vnumber2 = 1;
}

With this method I would need 3 if/else statements to be able to determine which variable to set, vnumber1, 2 or 3 instead of just the single String statement.

Any clues? Does ActionScript 2.0 support this method? Is there another way to build a variable and then set it's value without a bunch of if/else statements?

Any input would be great.

View Replies !    View Related
Unload & Load Variables In Same String..?
ok ive got a button that has the following code

on (release) {
unloadMovie("TEXT");
}
on (release) {
_root.mtClip.loadMovie("MOVIE.swf");
}
on (release) {
loadVariables("presentation.txt", "TEXT");
}

but it only ends up loading the MOVIE file...the Text file doesnt show....

Ive also got this on the final frame of my timeline (its a website)

loadMovie("reel.swf", "mtClip");
loadVariables("PRESENTATION.txt", "TEXT");

there must be something conflicting with the loading of the text file when u click the button but im not sure...new to actionscript...
BTW I'm using Flash MX

Thanks in advance!

*and thanks to the people of the forums for helpin me understand actionscript*

View Replies !    View Related
[CS3] Passing Variables From Query String
Hi there,

i'm trying to pass a variable from a web page to a flash file. The flash file has a dynamic text box with the var value set to formError.

In the webpage i have the following code:

<script type="text/javascript">
var so = new SWFObject("flash/index_030308.swf?t=150", "mymovie", "938", "305", "8", "#FFFFFF");
so.addParam("allowScriptAccess", "sameDomain");
so.addParam("quality", "high");
so.addVariable("formError", "<%=request.QueryString("formError")%>");
</script>

to test i am typing in the address bar default.asp?formError=woteva, hoping to see "woteva" displayed in my dynamic text box in the flash file, but this isn't the case. Where am i going wrong?

View Replies !    View Related
Joining Three String Variables Into Forming A URL
I am very new. I am working with actionscript in Flash MX Professional.

Here is what I am trying to accomplish. In the middle of a web address is a six digit number. When that number changes - the address changes into another valid location on the web.

Is there a way to make that six digit number a named variable that would be entered into a dynamic text box?

I have tried creating three strings, with the middle being the six digit variable, and joining them together to create a new url.

View Replies !    View Related
Loading Variables From Current URL String
How do I load variables from the current URL string being viewed by a user?

Let's say the user is visiting: index.php?id=4

How do I load that ID #4 into the flash movie on the same page?

View Replies !    View Related
Getting Variables From The Query String, SWFObject
I need to pass my swf a value through the query string. I can't seem to figure this out with AS3.

More specifically I need to pass a value from the HTML that embeds the swf to the movie.

Below is sampling of the HTML code. The example code below wants to create a variable named test and assign it a value of 12. How do access this variable from inside my SWF with AS3? In AS2 and earlier this variable would have been accessible from the main timeline. I can't seem to Access this from my document class, what am I missing?

PHP Code:



<param name="movie" value="MOMA_Box_Motion.swf?test=12" /> 




I'd also like to do this with SWFObject. The SWFObject docs show this exmaple. But again I can't seem to access these variables from the document class.


PHP Code:



<script type="text/javascript">
   var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
   so.addVariable("variable1", "value1");
   so.addVariable("variable2", "value2");
   so.addVariable("variable3", "value3");
   so.write("flashcontent");
</script> 

View Replies !    View Related
MX : Passing Variables To Command String
I'm trying to design an interface that to simplify the construction of a string. Here's an example: My output (using the getURL command) needs to be in the form of:

http://fakesite.com:8080/java/submit...ng2=y&thing3=z

I'm able to define variables for x, y, and z, however I am unable to figure out how to substitute the defined values for those variables into the string when it is time to send it.


I may not be being very clear here, but does anyone have any ideas?


Thanks

Jeff Kirsch

View Replies !    View Related
Some Variables In HTML String Not Getting To Flash.
Hi. I'm building a map that pulls in a location destination via the HTML string. Like this:

<object type="application/x-shockwave-flash" data="loader.swf?path=admin_map.swf?xCoords=324&yC oords=197">

the variables xCoord and yCoord are pulled in by the admin_map.swf and assigned to a dot representing a city on a map.

xCoord works fine. The variable gets into the swf, the dot adjusts its position, everything works great. yCoord does not. I have no idea why. I used a dynamic text box to see what was getting to flash and all it spat out was _level0.

I've tried changing the variable name, adding extra variables to the end of the string, changing where the dot_mc is in the swf, everything I can think of. I'm out of ideas. Does anybody know what could be wrong?

The full flash code:

function initialize () {
_root.mapMotherMC.attachMovie("worldmap", map, 1);
_root.mapMotherMC._x=-175;
_root.mapMotherMC._y=-50;

//if (xCoords>0 && yCoords>0) {
_root.placerDot._x=xCoords;
_root.placerDot._y=yCoords;
//}
};
initialize();

and the full HTML string:
<object type="application/x-shockwave-flash" data="loader.swf?path=admin_map.swf?xCoords=324&yC oords=197" width="500" height="250">
<param name="movie" value="loader.swf?path=admin_map.swf?xCoords=324&y Coords=197" />

Thanks

View Replies !    View Related
Passing Variables Via Query String
i am trying to load different xml that get generated through .net when I am trying to pass varibels i am getting undefined. Can someone give me a heads up on what i might be doing wrong. from what I have read and learned I can pull via-

Code:
xmlData.load("/family/galleryimage.xml.aspx?pid=" + _root.loaderInfo.parameters.pid.toString());

Then I am defining pid in within the object class.

Code:
<param name="pid" value='<% =Request.QueryString["pid"] %>'>
However I am getting undefined. Any help is much appreciated, thanks.
MT

View Replies !    View Related
MX : Passing Variables To Command String
I'm trying to design an interface that to simplify the construction of a string. Here's an example: My output (using the getURL command) needs to be in the form of:

http://fakesite.com:8080/java/submit...ng2=y&thing3=z

I'm able to define variables for x, y, and z, however I am unable to figure out how to substitute the defined values for those variables into the string when it is time to send it.


I may not be being very clear here, but does anyone have any ideas?


Thanks

Jeff Kirsch

View Replies !    View Related
Some Variables In HTML String Not Getting To Flash.
Hi. I'm building a map that pulls in a location destination via the HTML string. Like this:

<object type="application/x-shockwave-flash" data="loader.swf?path=admin_map.swf?xCoords=324&yC oords=197">

the variables xCoord and yCoord are pulled in by the admin_map.swf and assigned to a dot representing a city on a map.

xCoord works fine. The variable gets into the swf, the dot adjusts its position, everything works great. yCoord does not. I have no idea why. I used a dynamic text box to see what was getting to flash and all it spat out was _level0.

I've tried changing the variable name, adding extra variables to the end of the string, changing where the dot_mc is in the swf, everything I can think of. I'm out of ideas. Does anybody know what could be wrong?

The full flash code:

function initialize () {
_root.mapMotherMC.attachMovie("worldmap", map, 1);
_root.mapMotherMC._x=-175;
_root.mapMotherMC._y=-50;

//if (xCoords>0 && yCoords>0) {
_root.placerDot._x=xCoords;
_root.placerDot._y=yCoords;
//}
};
initialize();

and the full HTML string:
<object type="application/x-shockwave-flash" data="loader.swf?path=admin_map.swf?xCoords=324&yC oords=197" width="500" height="250">
<param name="movie" value="loader.swf?path=admin_map.swf?xCoords=324&y Coords=197" />

Thanks

View Replies !    View Related
String Variables From A Text File...HowTo?
Hello Script Gurus,

I am designing a flash movie...will be seen on the web inside an html page.

The base movie does not chnage at all...and uses the Load Movie command to load different sections. So Far no problems.

In one corner of the base movie, I have a MC, which displays ramdom messages and this clip is always visible.

The MC has 20 different messages, written as variables in one frame.
In the next frame the variables are evaluated and in the last frame a random message is displayed in a dynamic text field.

No problems so far....the entire thing works beautifully.

What I need to know, can the messages be stored in a text file and then the script in the MC pick up one random message from the text file and displays it in the dynamic text box?

This arrangement would be infinitely easier for my client, as then, all she'll have to do is change the text file, when ever she feels like it, instead of reloading the entire swf file.

If possible please let me know, as I have no clue about such things.

Thanks a ton.

Cheerio

View Replies !    View Related
HELP Saving String Variables To A Text File
Okay, here's my problem:

I'm fairly new to Flash MX--about a month or so, I'd say. I'm very fluent with Flash 5, so I've still got deprecated syntax stuck in my head...so I'm hoping there's a solution for this!

I'm writing a Flash movie that would NOT web-based. It would sit on my company's computers, and it would never leave the office. I need this program to save string variables to a text file. I'm familiar with the fscommand(save) function, but in past experience with Flash 5, the fscommand(save) function only saves numeric values to a text file, and doesn't save string values.

Any of you FlashMonkey's out there able to help me with this one? Much appreciated!

View Replies !    View Related
Loading Variables Into Flash From A Query String....
Is it possible?

Basicaly im making an e-Card type thing. so far, what happens is a person is emailed telling them theyve got a card and to click a link. this link contains ?id=4723473218947312 where the id number is a big random one, that corrrresponds to an id number in a txt file, which contains the message to be shown. I need to tell flash what id number to look up, from that link in the email, if you see what im getting at... how can i pass this data into flash?

View Replies !    View Related
Carriage Returns In String Or Variables To POST?
I'm sending one long string of variables to an ASP page to be put into one text field in a form, and was wondering how do I insert carriage returns?
Here's the 1st part of what I'm sending:
code:
_global.FullCardData = "CARD SIZE = "+vizcrdszlbl+"FRONT IMAGE = "+FrontImage;

What I'm wanting to do is have the form read new lines after each variable. What do I insert in there?

Thanks!!
Liam

View Replies !    View Related
Carriage Returns In String Or Variables To POST?
I'm sending one long string of variables to an ASP page to be put into one text field in a form, and was wondering how do I insert carriage returns?
Here's the 1st part of what I'm sending:
code:
_global.FullCardData = "CARD SIZE = "+vizcrdszlbl+"FRONT IMAGE = "+FrontImage;

What I'm wanting to do is have the form read new lines after each variable. What do I insert in there?

Thanks!!
Liam

View Replies !    View Related
Carriage Returns In String Or Variables To POST?
I'm sending one long string of variables to an ASP page to be put into one text field in a form, and was wondering how do I insert carriage returns?
Here's the 1st part of what I'm sending:
code:
_global.FullCardData = "CARD SIZE = "+vizcrdszlbl+"FRONT IMAGE = "+FrontImage;

What I'm wanting to do is have the form read new lines after each variable. What do I insert in there?

Thanks!!
Liam

View Replies !    View Related
How To Send Variables (string) To External Textfiles?
text from external .txt file via variable - help!
i want to load text from an external textfile into a dynamic textfield using variables inside the textfield (&example = text).
i already have the code for that

_root.bgtext.textfeld.htmlText = this.example;

which works.

but instead of "example" i want to use a variable from my flash movie

>> inside .txt file:<<
&text01 = text

>> in action script: <<
myvariable = "text01";

_root.bgtext.textfeld.htmlText = this.myvariable;

... which doesn't work. does anyone know how to send variables (string) to external textfiles?

thx!
eve

View Replies !    View Related
Variables & Button Action Via URL Query String
Hi,
I have 2 variable textbox named 'box1' and 'box2' and a button named 'enter' in Flash. When the enter button is clicked, it calls up an file. Here is my problem:

I need the user to go to a URL:
http://www.something.com/form.swf?box1=john&box2=smith ...?

How do i write the query string so that the Enter button will perform it's onClick action with the loaded variables?
Can anyone help me please? Thanks.

View Replies !    View Related
Passing Multiple Variables In GetURL String
Is it possible to pass multiple variables in a getURL string?

I can do this getURL("javascript:doLMSSetValue('cmi.interactions .0.student_response','"+group1.getValue()+"')

where group1.getValue()is the variable. But what what I want to do is pass something like this

var qadata = doLMSSetValue('cmi.interactions.0.id', '1');
doLMSSetValue('cmi.interactions.0.type', 'choice');


and have tried

getURL("javascript:"+qadata+); and other varieties but can't quite get that to work.

Thanks.

View Replies !    View Related
Concatinating/inserting Multiple Variables Into An Xml String
I've reached a block or limit in my actionscript knowledge again???

I've arrived at this, which works fine;

Code:
onClipEvent (load) {
thisStationAtts = _root.line0Stations[0].attributes;
}


But I need to make all the zero values in the above string dynamic and I'm trying this;

Code:
onClipEvent (load) {
thisStationAtts = _root["line"+_parent.thisLineNodex+"Stations"][_parent.thisStatNodex].attributes;
}


Which doesn't work. The first piece of code works, but I need to pull in the variables dynamically, as demonstrated in the second code example. Do I need to think about this from another angle.

View Replies !    View Related
Calling Variables From Query String Into Flash
Hi, any help given is much appreciated

Ive got multiple html pages with the same flash file embedded, with a different query string on the end for each page

eg.
home.html, myflash.swf?flashid=home
contact.html, myflash.swf?flashid=contact
support.html, myflash.swf?flashid=support

I want my flash to listen to the query string upon loading the page, and depending on the flashid, gotoAndPlay(frame)

Ive tried numerous methods to get it to work, but its just not reading my query string...

Any thoughts?
thanks!

View Replies !    View Related
[F8] Dynamic Query String & Pass Variables To And Fro Php
Hi!

I have a webpage that needs to load a variable from query string and then the swf sends this variable to php to search it in databse and return respective entries.

My trouble is the page where the swf is placed in an HTML page whose URL is something like this : http://www.mysite.com/variableName=dynamicValue

Actually this is a link thats sent in an email. When clicked it loads this page. Here http://www.mysite.com/variableName= is static, but dynamicValue is a 15 letter randomly generated code.

I wanted to know is it possible to pass this dynamic value of the variable into my swf. If so, how to do that.

My second query is I wanted to send this variable from flash to a php file which will search it in a database and return related entries to flash. Now, I've done this seperately, that is, send variables to php by post method and get variables from php by get method. But I dont know how to do these two operations in one single call.

I am using Flash 8, though i'm exporting the movie to flash 6 player compatible and actionscript 2. Any help is welcome. Please let me have the feedback.

thanks

ashwin.

View Replies !    View Related
How Can I Parse A String Or Send Variables Through Xml Socket?
Ok I am sending data via xml sockets using flash 9 pro.

I have no idea how to build and send variables in an xml packet, but I can send one variable through my xml socket fine. So, I was thinking of using a special charter between my variables.

How, then, can I parse out my data?

Say I have 3 variables always and in the same order. If I use say * to seperate my data how would I get 3 variables from my one variables?

i.e. var myVar = "This is the first string*This is The second string* This is the third"

Place data into:
variables 1 2 and 3.

Second, is there a better way to pass variables through a xml socket? If so how?

View Replies !    View Related
Ghost Writing When Importing String Variables
http://www.proactiveit.com.au/hollie/clc2.html

In this version I have the Bank Names declared inside the flash. and the copmarison message at the bottom "Other Bank will cost you $2,298.48 less than My Bank" works perfectly.

In this version: http://www.proactiveit.com.au/hollie/clc.html
I have the bank names loaded from FlashVars in the html file ( i have also tried loading from a text file too). and the compariosn message at the bottom appears only to have the name of one of the banks..
BUT! if you click your mouse over the text area a few times you'll see the rerst of the text message appear and the bank name disapear.

WTF! ??

so its obviously loading the bank names but scrws up the Comparison message.

View Replies !    View Related
Flashvars/sending Variables To SWF In AC_FL_RunContent String
Hi,

Does anyone know if it's possble to send variables from the html page from within the AC_FL_RunContent string to the SWF? It's possible to do it in the object / embed tags using FlashVars. It's also possible using SWFObject using so.addVariable("varName", "varValue").

I don't want to use embed or object becuase of the Active X problems, and am having problems getting SWFObject to work in one browser. Thanks for your help...

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved