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




Pass Variable From Flash To Html Form Field



Just curious...Anyone know if it is possible to pass a variable from flash to an html form field on the same page and have it update automatically?

For examply, I'm making a color picker in flash for my CMS, I want the user to be able to scub around and pick a color. Once they get the color they want, they can push a button and the RGB hex would be passed to an html form field below the flash file and automatically show up in the field (no need for page refresh).

I assume this can be done (I assume JS would be needed), but I'm not sure.



Ultrashock Forums > Flash > ActionScript
Posted on: 2005-02-05


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Pass Variable Form HTML Form To Flash
Hi,

I'm trying to figure out how to send what the user selects from a HTML drop-down menu to the Flash movie.

In this scenario, the user picks an email address from a drop-down list and this is sent to flash as a variable called 'eaddress' which is eventually used in the flash movie to send a message to this address.

Any help is much appreciated!

Glenn

How To Pass A Flash Variable To HTML?
Could someone please tell me the syntax to pass a flash variable to an html page? Thanks.

Pass Flash Variable To Html
i have a map i'd like someone to click on
a couple locations and have those show up
as html. any ideas? i just need a kick in the head here?

How To Pass A Variable From HTML To Flash
I have built my flash ad banner in Flash 9 and now want the HTML code to pass the url over to the flash movie that it should jump to when clicked.

The info in the help file seems out of date for the latest HTML template as it uses mainly JavaScript to get round IE's dreadful embeding issue. So my problem is, how do I pass a variable from the HTML to the actionScript specified int he Help file (running on a full screen button) as shown below?

myButton_btn.onRelease = function() {
if (clickTAG.substr(0, 5) == "http:") {
getURL(clickTAG);
}
};

via the html code now used by Flash 9 which is like this:

<!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Advert_long</title>
<script language="javascript"> AC_FL_RunContent = 0; </script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 115;
// -----------------------------------------------------------------------------
// -->
</script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
Coping
with
Growing
Audio
Series
Theraputic stories
for children aged
4 to 9
-->
<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable version
// embed the flash movie
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
'width', '120',
'height', '600',
'src', 'Advert_long',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'Advert_long',
'bgcolor', '#ffffff',
'name', 'Advert_long',
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', 'Advert_long',
'salign', ''
); //end AC code
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.'
+ 'This content requires the Adobe Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
}
// -->
</script>
<noscript>
// Provide alternate content for browsers that do not support scripting
// or for those that have scripting disabled.
Alternate HTML content should be placed here. This content requires the Adobe Flash Player.
<a href="

Pass Variable From Flash To HTML And Back?
OK I have a HTML page with a swf(created in Flash MX) on it. The user can choose between 2 buttons (basically to show text or to hide text). I need to somehow keep their option (hidden or shown text) the same on the next HTML page which has a different swf. I'm thinking I need to set a variable (ie 1 for turn on text, 2 for turn off text) and then send that variable to the HTML page where it somehow sends it to the next HTML page that is opened where the new swf reads the variable (1 or 2) and responds accordingly....

Can anyone help me work this issue out???? I'll probably need help in setting up both the swfs and the HTML code to make it all happen. I have limited experience in javascript for the HTML and more, but not much, experience with actionscript.
I'd greatly appreciate any help I can get on this. Thanks in advance.

Pass Variable From Flash To HTML Password?
Hello, i need to be pointed in the right direction for this. I am trying to make a client login page.

What i currently have:

An swf is embedded into 'login.html'. The user inputs their user and pass into the input text fields. The result of this username and password will trigger the approprate 'getURL' command to jump to 'clientPage1.html' etc.

This is just fine, however it is not truly password protected as anyone can just go to 'clientPage1.html' and view the content.

What i need to do:

I need to have the 'clientPage1.html' password protected, but have the variables from the swf on 'login.html' passed to 'clientPage1.html' so that they user doesn't have to enter the information twice. I am somewhat proficient in action script, but not as familiar with how this would work in combination with the html. thanks alot for any help. I am hoping one of you out there have seen a similar problem before
Thanks!
q

Trying To Pass Text From Form Text Field To A Flash Dynamic Text Field
Hi, I was hoping someone might enlighten me as to how/if I can do this...

Currently I'm using javascript which works fine to pass text from textfield A to textfield B:


Code:
window.onload=function()
{
document.forms.form1.shirtText.value=document.forms.form1.KitGroupID_16_TextOption_38.value
}
Is there a way to pass the textfield A text to a dynamic text input (flash) as I'd like to use the font embedding flash offers. I can make it work when loading a value from a txt file but I'm not sure how to access the value identified above as KitGroupID_16_TextOption_38 and make it appear in a dynamic input box. Eventually I might want to have 3 font choices for the user but I'd like to just see if I can get this working properly first.

Your help/advice would be greatly appreciated,

-Scott

Pass A Variable From Flash With Java To Html Page?
I know this is possible without ASP or anything.

Basically I want the user to enter their name into a text field in a flash movie, click a button and this opens up an html page with the message "hello [NAME]". Thats basically it, I can do it with ASP but this needs to work locally so I guess Java is the way to go.

Ta.

How To Pass Variable From Flash Movie To Html Browser
How to pass variable from flash movie to html browser Can any body guide me to do :
1. How can we pass variable from flash movie to html browser.
2. Between two flash movies or SWF files.

Pass Variable From Text Field To Url
I am trying to generate a url from a variable set in a dynamic text box. The problem I am having is the variable is being inserted along with html text formating. Why is this happening?

Here is my AS2 code

ActionScript Code:
var offerCode:String = "Type Offer Code";

submitBtn.onRelease = function() {
    getURL ("http://www."+ offerCode +".com", "_blank");
};

and I have attached the flash file as well

Passing Variable From Html Tag To Flash Txt Field
hi
i have a counter on my site that gives the number of visitors s a text using this html tag
<ISML TYPE="counter"> that i paste in my page.
i want to make a flash counter that retreives that number on load and display it in a dynamic txt field.
what changes/codes should i put in my html page
and how flash movie should receive it?
thanx

Pass Variable From HTML
I want to pass a variable from an HTML page to an SWF file that lives in a different HTML page.

Can anyone help me with this?

Thanks.

Linking A Flash Username & Password Field To An Html Variable
Hi everyone....i am working on a website in flash and would like to have a username and password field on it for logging into my webmail feature. Now, i dont know if this is possible, but i would really appreciate any info on how i could possibly do this! thanks in advance!

Pass Variable From 1 Swf To Another Swf On The Same Html Page? Help
I have 2 swf. I do not want B.swf to load until A.swf get the the certain point. They both are on the same html page.

Is there a way I could pass the variable (say if I send a _global in A.swf) from one swf to another if they are on the same html page?

thank you so much!

Pass Html Variable Without AC_RunActiveContent.js
Well I have had no luck trying to pass a variable from an html page to my swf.

Here is what I have tried
html code

Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="compass" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="compass.swf?mX=90" />
<param name="flashvars" value="something=somethingelse&apples=oranges" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="compass.swf?mX=90" quality="high" bgcolor="#ffffff" width="550" height="400" flashvars="something=somethingelse&apples=oranges" name="compass" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


And here is what I have in the document class

PHP Code:




var tf:TextField = new TextField();
            addChild(tf);
            tf.autoSize = TextFieldAutoSize.LEFT;
            tf.border = true;

            tf.appendText("params:" + "
");
            try {
                var keyStr:String;
                var valueStr:String;
                var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
                for (keyStr in paramObj) {
                    valueStr = String(paramObj[keyStr]);
                    tf.appendText(" " + keyStr + ": " + valueStr + "
");
                }
            } catch (error:Error) {
                tf.appendText(error.toString());
            }







What am I doing wrong, any ideas? This was so easy before AS3

Pass Html Variable Without AC_RunActiveContent.js
Well I have had no luck trying to pass a variable from an html page to my swf.

Here is what I have tried
html code

Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="compass" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="compass.swf?mX=90" />
<param name="flashvars" value="something=somethingelse&apples=oranges" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="compass.swf?mX=90" quality="high" bgcolor="#ffffff" width="550" height="400" flashvars="something=somethingelse&apples=oranges" name="compass" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
And here is what I have in the document class

PHP Code:



var tf:TextField = new TextField();
            addChild(tf);
            tf.autoSize = TextFieldAutoSize.LEFT;
            tf.border = true;

            tf.appendText("params:" + "
");
            try {
                var keyStr:String;
                var valueStr:String;
                var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
                for (keyStr in paramObj) {
                    valueStr = String(paramObj[keyStr]);
                    tf.appendText(" " + keyStr + ": " + valueStr + "
");
                }
            } catch (error:Error) {
                tf.appendText(error.toString());
            } 




What am I doing wrong, any ideas? This was so easy before AS3

Please Help Can I Pass A Variable Between 2 Swf's That Are On Different Html Pages?
Hey,

Does anyone know how to pass a variable (string) from one swf to another if there in separate html pages?

I assume I’d have to send the variable from the first page and load it into the second but I don’t know what functions or code I should be using. Any suggestions would be a HUGE help.
Thanks

If it helps: I’m creating a log in and sign up sheet that can be accessed from several sites. I’d like to record which site the user has come from when they signup.

Thanks

Flash Menu With Multiple HTML Pages - How To Pass Variable To Menu On Refresh?
please note this topic is also posted at AS under this title:
Flash Menu 4 HTML pages - pass variables on page refresh
-----------------------------------------------------------------------

So the subject is a hint as to how hard it is to search on this simple idea.

Will be very greatful for some help today!


PROBLEM DETAILS:
I am building a swf menu for an HTML site. It has the following buttons:

SectionA

SectionB

SectionC

What I want to do is modify the text when the HTML page for the correspoding section is loaded. So, if I click on "SectionB", SectionB.html loads. Now I want that button "SectionB" in the swf to have a background glow.

Of course the catch is, that each time a new HTML page loads, it reloads the swf menu (No Frames please!). So, naturally I know I can just tell the swf menu to go to a certain place in the timeline where there is the glow graphic behind "SectionB". But the swf needs a variable saying it is on a Section B HTML page. (of course I could build a seperate swf for each section - but that seems stupid.)

THUS....


MY QUESTION:
How do I pass a variable from a swf on one HTML page (that is being replaced by a new HTML page!), to a swf on a new HTML page.

Can I do this with a GET/POST or something?

Thanks!
-AB
Birdsong is online now Edit/Delete Message

Passing Flash Variable To Html Form With Javascript?
How can I pass a variable from flash to a html form on my website? I assume I use javascript somehow.

Basically what i want to do is this :

Lets say there is a textfield in my flash movie and the user types in their name and presses the button within the movie. I want the button to pass their name to a html form field that is on the same webpage.

How can I do this?

Thanx for any help or suggestions you can give

Ryan

Pass Frame Variable Via Query String Bettween 2 Swf In 2 Different Html Files
Hello, I have an swf movie embedded in an HTML. One of the links calls to another HTML with a different SWF embedded. I need to link back to the original HTML/SWF but to a certain frame within that SWF using HTTP query. I understand that I can do this with Javascript and by parsing the HTTP query. Can anyone direct me to a tutorial or give me some help?

Thank you

maknenoiz

Show Dynamic Variable In Form Field
Last edited by LinkMaster : 2004-11-05 at 03:13.
























Hi there again...

I'm using this code for my game timer. That works fine!


Code:
function timer(){
seconds=seconds-1;
if (seconds < 0) {
clearInterval(myTimer);
gotoAndPlay("Scene 2", 1);
}
}
myTimer=setInterval(timer, 10000);
But I'd like to know how I can show the gamer how many seconds he has left (in a text field). I've looked in the tutorials but I didn't find my anwser.

Anyone an idea?

Leon

Passing Variables To HTML List Form Field
Hello and yes, I am stuck again.

So, here's my dilemma...
I have an HTML page with a form on the right hand side of the page and an embedded SWF on the left. Upon pressing a button with the SWF, I want to send a variable to the HTML form, to a list box. I've worked with the Javascript Integration Kit from the Expert Tutorial in the Flash 5 Bible and I don't see anything about it in the Flash MX Bible. Does anyone know how to do this?

The code I used in Flash was this:
on (press) {
getURL("javascript:FDK_AddValueToList('frmindex/selmy', 'Rogers Park', 'Rogers Park', "1'");
}

Then in Dreamweaver, I entered the this code (it isn't PHP. I couldn't get the code to show up any other way):

Any ideas?

Thanks,
jessicuh
PHP Code:



<script language="JavaScript" type="text/JavaScript">
<!--
function FDK_AddValueToList(ListObj,TextString,ValString,Position)  {
  if (isNaN(parseInt(Position)))   {
    Position = ListObj.options.length;
  }
  else  {
    Position = parseInt(Position);
  }
  if (ListObj.length > Position)  {
  ListObj.options[Position].text=TextString;
  if (ValString != "")  {
    ListObj.options[Position].value = ValString;
  }
    else  {
      ListObj.options[Position].value=TextString;
    }
  }
  else  {
    var LastOption = new Option();
    var OptionPosition = ListObj.options.length;
    ListObj.options[OptionPosition] = LastOption;
    ListObj.options[OptionPosition].text = TextString;
    if (ValString != "")  {
      ListObj.options[OptionPosition].value = ValString;
    }
    else  {
      ListObj.options[OptionPosition].value=TextString;
    }
  }
}
//-->
</script>
</head>
<body>
<form action="" method="post" name="frmindex" id="frmindex">
  <select name="selmy" size="1" multiple id="selmy">
  </select>
</form>

Pass The Form Value To The Flash Movie
Hi

I would like to know whether it is possible to pass the html form value to the flash movie as the variable without using database. so that i can make use of it in the flash movie.

Pass The Name Of A Flash Form To The Server
How do we pass the form name (not any form variable) from flash to a server side page just like any HTML form?

Pass Flash Form Value To Javascript.
I'm having a problem with an html form that I'm converting to flash. It is a very simple form consisting of a single field (zipcode) which is meant only to autofill a popup window controlled by a 3rd party vender.

A test url can be found here.

It shows the flash version which does open the popup window but won't pass along the zipcode, as well as the html version which does pass the zipcode.

In flash I made an input text field and named the var 'zip' just like in the html version. And then for the submit button I added the actionscript:

PHP Code:





 on (press) {
getURL("javascript:popopen_zip('http://foxreality.channelfinder.net/start.asp','GetFRCwin',550,375)", "", "POST");








The working javascript is:

PHP Code:





<script>
        function popopen_zip(thePage,theName,wt,ht){
            leftPos= (screen.width-wt)/2;
            topPos = (screen.height-ht)/2;
            newWin1 = window.open(thePage,theName,'toolbars=0,status=0,resizeable=0,scrollbars=0,left='+leftPos+',top='+to  pPos+',width='+wt+',height='+ht);
            
            document.getFRC.target = theName;
            document.getFRC.submit();
        }
</script> 






Working html form:

PHP Code:





<form method="post" action="http://foxreality.channelfinder.net/start.asp" name="getFRC" id="getFRC" onSubmit="popopen_zip('http://foxreality.channelfinder.net/start.asp','getFRCwin',550,375)">
              Enter Zipcode
              <input name="zip" type="text" class="foxinput" size="10" maxlength="10" />          
              &nbsp;
  <input type="submit" name="button" id="button" value="Submit" />
</form> 







I don't know what I'm missing to pass the zipcode. Keep in mind I have no control over the content of the popup window. This is the javascript they gave me to work for an html form. I was just hoping to make it work with a flash form as well.

Thanks for any help!

Can I Pass A Variable Into Flash With A URL?
i saw a site (although i forget the damn URL) that had "smart" flash nav- ie, it highlighted the appropriate section that the user was in. i checked the source on this to see how they did it, and it said
embed src="movie.swf?clip=1"
anyone have an idea of how to accomplish this? fs command is not an option since AFAIK it doesn't work in netscape.
thanks for any help!!

finn

How To Pass Variable From Asp To Flash
In a flash game, need to pass a session variable from an asp page to the flash file having the game. The asp page is loading initially in the flash file (loadvariable) and able to pass the points variable but not the session variable. Please help solve dis..

How To Get A PHP Variable To Pass Into Flash
When you click a button in the movie or on another link on a web page you are taken to a web page that requires a session ID in the URL. I also need flash to take that variable and use it in my switch statement.

Thanks

How Can I Pass A Variable From ASP.NET To Flash
I want to pass a variable from asp.net page to a flash movie on the same page


How do I do that?


Thank you

Choo

Pass URL Variable To Flash
I want to put a variable at the end of a URL and have Flash "find" that variable. The url would be:
www.mydomain.com/index.html?agent=Campbell
"Campbell" is the variable I want to pass to Flash. I then have this script in the root timeline:
loadVariables (""+agent".txt", this);

I want "agent" to be replaced with Campbell. That way I can have it read a bunch of variables from the txt file.

I tried this as well:
loadVariables (""+_root.agent".txt", this);

What am I missing in this?

Thanks,

Brian

How To Pass The Variable From ASP To Flash
hi to all,
any one can help how to pass the parameter variable from ASP to Flash..
any help can be apriciated..

How To Pass A Variable Between Flash And ASP
I create a page using html and asp

and i have a flash movie contains TEXT

how can I change the text in the flash by entering the text in my page that created with html and asp?

How Can I Pass A Url Variable To Flash?
Hi -

I need to pass a variable from a URL (not the entire URL) to urls in links in the Flash movie.

A cgi in the site adds a SID value to each url in the html, but I need to get that value into urls in Flash.

ex: www.abc.com/SID=1234567.6543/

Any help is appreciated.

Pass Variable To Flash
hi,

i have an embedded flash movie that contains a nav menu. is it possible to pass a variable to the movie (perhaps in the object tag) so that when it loads the URL it knows what button was pressed?

here is the movie: link

the client wants to have the button over state remain showing depending on which button was pressed.

Pass Variable From Flash To JavaScript? How?
Ok -- so what I am trying to do is the following:

When the user clicks a button in flash, I want a variable called "picVar" to be passed to a new, pop-up web page, with a value. The web page will then take the value of that variable and use it in a document.write sort of situation.

So, to explain again:
1) Flash says picVar = abc
2) Flash pops open a new HTML page (window)
3) Flash sends the picVar variable and value to JavaScript
4) A document.write script in the page uses that value in the page.

How can I achieve this? Would fscommand() work? If so, does fscommand() work in IE for Mac... I read that it didn't. Any ideas?

Pass Variable In To Flash With Javascript
hi.
I'm following this tutorial http://www.macromedia.com/support/fl...htm#javascript

im trying to pass a variable to flash with javascript.
i have followed this tut exactly but when i test it i get a Windows Alert that says:

("Error:'window.document.movie' is null or not an object")

This is My html code:

<HTML>

<TITLE>menu_lat</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<HEAD>
<script language = "JavaScript">

<!--
function PassFlash(){
window.document.movie.SetVariable("text", "hello");
}
//-->
</script>
</HEAD>
<BODY bgcolor="#FFFFFF">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=114 HEIGHT=400>
<PARAM NAME=movie swLiveConnect=true VALUE="menu_lat.swf?"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="menu_lat.swf?" quality=high bgcolor=#FFFFFF WIDTH=114 HEIGHT=400 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
<a href="#" onClick="PassFlash()">Pass The Variable</a>
</BODY>
</HTML>


Why???????
Thanks
dani

Pass Variable From Java To Flash
I am trying to have a web page that has a flash movie on it and when i pop another page on top of the flash page, the music will stop on the below flash movie. Also when the top window is closed and the flash movie is active again I want the music to play. I was thinking about usinga javascript that would check for the page html being active or not and use that variable in an if statement that controled the volume of the music. I think the main problem I am having is getting the right javascript and then calling for it from inside flash.

How Do I Pass A Variable To A Flash Movie?
I am able to pass a value from my flash movie to a database, which returns a text string in the format of &username=value&recordid=value& how do I get these values back into my flash movie?

Thanks!!!

How Do I Pass A Variable To A Flash Movie
I am able to pass a value from my flash movie to a database, which returns a text string in the format of &username=value&recordid=value& how do I get these values back into my flash movie?

Thanks!!!

How Do I Pass A Variable To A Flash Movie
I am able to pass a value from my flash movie to a database, which returns a text string in the format of &username=value&recordid=value& how do I get these values back into my flash movie?

Thanks!!!

Pass Variable To Java From Flash
Hello all,

I've got a question about passing variables to Java from Flash. I need to create an exercise where the user will move an object to a specific place on the grid, then based off where the user stops and drops the object the variable will go to be read by Java.

I have no idea where to begin on this. Can anyone get me started? Thanks in advance!!!!

Pass A Page Variable To Flash?
Hi guys

Does anyone have a simply explanation on how I can pass a page variable from my asp page to a flash mx movie within the same page.

Basically I have a swf audio player code below

My Play Button

on (release) {
stopAllSounds();
}
on (release) {
loadMovie("/members-audio-file.swf", "tg");
}

and I want to pass my asp page variable “audio-file-name e.g. jhon-smith.swf” to

loadMovie("/jhon-smith.swf", "tg");

Hope this all makes some sense.

Pass A Variable From One Flash Movie To Another
does anyone know how to pass a variable from one flash movie to another? say if a swf is set to load upon its completion it increments a variable so that the parent swf, in this case my audio player, sees that the varibable has been incremented and so makes adjustments to the values assigned to the back and next buttons?? any help is greatly appreciated!!

thanks!
+stephen

Problems When I Am Trying To Pass A Variable From Flash To PHP
I am trying to pass a variable from flash to a php page. When I test this in to my computer it works, but is not working in to my server.
My only guess is that the problem is from the server
If you have any idea what I am doing wrong please help !!!!!!!!!
Thank you


ActionScipt


Code:

<?php


$file = $_GET['file'];

header("Content-Type: application/force-download");

header("Content-Disposition: attachment; filename=".$file);
readfile($file);

?>


php Script:

Code:
on (press) {
var loginDets:LoadVars = new LoadVars();

loginDets.file = "test.txt";

loginDets.send("d_files.php", "POST");

}

LARGE Variable Pass From FLASH To PHP
Hello, if ANYBODY can help me out on this I'd greatly appreciate it!

I can pass variables from Flash to PHP, but I only know how to do them through URLs, for example, http://www.blah.com/blah.php?var1=so...ar2=something2... etc.

Is there a BETTER way to pass variables from Flash to PHP? Because now that I have LARGE amounts of data to pass... the URL Address bar can't hold all the data!! (only a little of 2000 characters...)

There HAS to be a way! I've been looking all over for a solution... I can pass HUGE amounts of data from PHP to FLASH, but not vice versa... must be a way!

Problems When I Am Trying To Pass A Variable From Flash To PHP
I am trying to pass a variable from flash to a php page. When I test this in to my computer it works, but is not working in to my server.
My only guess is that the problem is from the server
If you have any idea what I am doing wrong please help !!!!!!!!!
Thank you




PHP Code:



<?php

$file = $_GET['file']; 

  header("Content-Type: application/force-download");
 
  header("Content-Disposition: attachment; filename=".$file); 
  readfile($file);
  
?>








ActionScript Code:
on (press) {
    var loginDets:LoadVars = new LoadVars();
   
    loginDets.file = "test.txt";
   
    loginDets.send("d_files.php", "POST");
   
}

Can You Pass Flash A Variable At Startup?
I need to pass flash a path variable to some of the content it will need to load on startup. But I don't want to write a text file just to have flash do a loadvariable command.

Is there some object that captures initial vars that were passed when the object initated in the web page?

Pass Variable To Flash / Load Row
Hi all,
I've search for days and nothing has worked so far.

Goal: Load MySQL data in flash depending on url id.
Example: visit.php?pk_listId=185 <= Flash displays row 185

My Results: Flash loads and is blank, but if I change the "SELECT" in visit_bar.php, it works
From: WHERE pk_listId = '$pk_listId'
To: WHERE pk_listId = '187'

Conclusion: Flash is not getting the variable. ie: $pk_listId

Tested:
myData.load("visit_bar.php");
myData.load("visit_bar?pk_listId="+random(99), 0);
myData.load("visit_bar.php?pk_listId=", 0, "POST");
myData.load("visit_bar.php","_self","GET");
myData.load("visit_bar.php?pk_listId=$pk_listId"," GET");
myData.load("visit_bar.php", pk_listId, "GET");
myData.load("visit_bar.php?pk_listId=", $pk_listId);
myData.load("visit_bar.php?pk_listId="+random(99), myData, GET);
myData.load("visit_bar.php?pk_listId=", 200,"GET"); Works but not dynamic


visit.php
loads swf file with the basic code

Code:
<param.....
<embed....
visit_bar.swf
grabs the Id, the flash document has a few fields for display on keyframe one with a stop function

Code:
// In the flash document I have 2 Dynamic Text Fields with instance names
// pk_listId_txt
// listTitle_txt

// ActionScript
myData = new LoadVars();
/* THIS MUST BE WRONG */
myData.load("visit_bar.php?pk_listId=", 0, "POST");
myData.ref = this
myData.onLoad = function(success){
if(success){
this.ref["pk_listId_txt"].text = this["pk_listId"]
this.ref["listTitle_txt"].text = this["listTitle"]
}
else trace("Error loading data")
}
stop()
visit_bar.php
Connect to MySQL / Query Id / Format Result for flash

Code:
$pk_listId = $_GET["pk_listId"];

$MySqlConn = ....
mysql_select_db....

$Query = "SELECT * FROM listing WHERE pk_listId = '$pk_listId' ";
$Result = mysql_query($Query);
while ($Row = mysql_fetch_array($Result))
{
Print "pk_listId=$Row[pk_listId]&listTitle=$Row[listTitle]";
}

Copyright © 2005-08 www.BigResource.com, All rights reserved