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




Passing Value From Flash To ASP



Hi there...

I'm trying to get variable score to my ASP-page, but it ain't working...

This is the code in flash

[as]
on (release) {
var score
score = total
getURL("index.asp", "_top", "GET");
}
{/AS]

And I'm using this in my ASP-page: request.querystring("score")

I this the correct way or is the a better way to pass values from flash to asp?

Thnx



Ultrashock Forums > Flash > Flash Newbie
Posted on: 2004-09-07


View Complete Forum Thread with Replies

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

Passing Property Values And Passing Them Back
Hi,

I am trying to pass property values from one function to another function, let it do it's work then pass it back to original function when called.

Example:


Code:
function displayText()
{
nameCurrentMap.curMapName.text = flashServ.map;
nameCurrentMap.curMapName.embedFonts = true;
nameCurrentMap.curMapName._alpha = 0;
fadeInCurrentMap = setInterval(fadeIn, 50);
}

function fadeIn()
{
if(nameCurrentMap.curMapName._alpha < 100){
nameCurrentMap.curMapName._alpha += 5;
}else{
clearInterval(fadeIn);
}
}
As of right now this code works perfectly. However, I have to hard code my property value. I wish to make it more dynamic so I can use the function "fadIn()" more universally.

The colored (red) text shows on what I wish to make it more dynamic.

I basically want to take the property and be able to use any instance name in place and pass it back.

I hope someone out there understands on what I am trying to explain.

Any Help would be appreciated.

Thanks in advance,

- Alex

Passing PHP Var To Flash
Hello All,

I need to pass securely some PHP session variables to a Flash movie.
Does anybody know how to achieve this ??

(PS. I don't want to insert any code in the object tag or any extra code in the url)

thx

Passing XML To Flash
Hello all,

I found the following XML driven quiz on the net and I was wondering how can I adapt the XML doc to pass CDATA instead of "Value". The code is currently sending the "answers" values into Flash as value, instead of values I will like to type the answers inside of CDATA tags. I don't know how and what to change in the XML as well as in the AS file.

I tried to contact the author but no use, I guess his email is no more

Please see the link http://actionscript.org/showMovie.php?id=831 where you can see and download the files. I will appreciatte your help

Passing Php Var To Flash
hello..

okie im new in this php to flash thingy stuff... and also actionscript..

i need a basic how to display the variables in the flash..

okie let say i have this php file test.php

<?php

echo "name=test";
?>

so now how can i display the value of name inside flash.
i just need some basic explanation..

thank you..

Passing A URL Into Flash
Does anyone know how to pass a string into Flash through a URL?

For an example:

domain.com/myflash.swf?variable=string

I'm basically asking, how can the $_GET PHP method be used in AS syntax?

Passing Variables From Flash To Asp
I am have tried using

loadVariables ("page.asp","","POST");
getURL("page.asp","_parent","POST");

but my asp files don't get any variables from the flash movie??

anyone any ideas

Gareth

Passing Variables Into Flash In The Url
Hi

Is there any way I can pass a couple of variables into my Flash movie in the URL. I.e. have something like:

Code:
http://www.blah.org/Movie.html?position=56&height=90


and then have some code in the movie that can pick up these values

Thanks
[Edited by m_andrews808 on 01-02-2002 at 05:54 AM]

Passing Flash Variable To PHP
Im trying to retieve a data from my Mysql database via PHP and using flash as my display arae. My problem is passing a varibale from flash to PHP. That can be done.But mine is not working. My scenario is this i have several button on a separate .swf file which load another .swf file to the rigth part of my stage whenever a button is hit and unload that movie and load another .swf file when other button is hit. here is a the code on each button
--------------------------------------------

on (release) {
_root.dostuff(x);
var id = "x";
loadVariables ("fetchclient.php?", "x.swf", "POST");
}

//where is is button number
//doStuff function does the loading and unloading of the movie
-------------------------------------------
now i want to pass var "id" to php, so that ill use that as a query id to retieve my data
here is the code for my PHP.Look at my query
-------------------------------------------
<?
// fetchcllient.php

// Define satabase connection details
$dbHost = "localhost";
$dbUser = "joseph";
$dbPass = "joseph123";
$dbName = "MDi";
$table = "clients_grp";


// Attempt to connect to MySQL server
$link = @mysql_connect($dbHost, $dbUser, $dbPass);


// Attempt to connect to MySQL server
$link = @mysql_connect($dbHost, $dbUser, $dbPass);

// If the connection was unsuccessful...
if (!$link)
{
// Report error to Flash and exit
print "&writeup=" . urlencode("Could not connect to server");
exit;
}

// Attempt to select database. If unsuccessfull...
if (!@mysql_select_db($dbName))
{
// Report error to Flash and exit
print "&writeup=" . urlencode("Could not select $dbName database");
exit;
}

// Build query to fetch client grp items from database
$query = "SELECT clients_grp.client_type, clients_grp.writeup, client.client_name
FROM clients_grp LEFT JOIN client ON clients_grp.client_grpid = client.client_grpid WHERE clients_grp.client_grpid = '$id'";


// Execute query
$result = @mysql_query($query);
if ($result && @mysql_num_rows($result) > 0)
{
// Initialise variable to hold client grp items
$writeup = "";
$client_type = "";
$client_name = "";
// For each client grp item returned from query...
while ($row = mysql_fetch_array($result))
{
$writeup .= '<font align="left" face="Arial, Helvetica, sans-serif" color="#003399" size="10"><b>';
$writeup .= stripslashes($row['writeup']);
$writeup .= '</b></font><br>';

$client_type .= '<font align="center" face="Arial, Helvetica, sans-serif" color="#003399" size="12"><b>';
$client_type .= stripslashes($row['client_type']);
$client_type .= '</b></font><br>';

$client_name .= '<font align="center" face="Arial, Helvetica, sans-serif" color="#003399" size="10"><b>';
$client_name .= stripslashes($row['client_name']);
$client_name .= '</b></font><br>';
}

print "&writeup=" . urlencode($writeup);
print "&client_type=" . urlencode($client_type);
print "&clientText=" . urlencode($client_name);
}
else
{
// Tell Flash no news items were found
print "&writeup=" . urlencode("No clients items yet");
}

// Close link to MySQL server

mysql_close($link);
?>
---------------------------------------------
when i run this i got the msg"No client items yet" and when i manually replace $id with a number say 1 it displays the content of my database to flash.What could be the problem ??Please help

Passing Variables From ASP To Flash
Hey, folks.

Here's the deal -

I've got a .swf that sits at the top of an html website. The .swf contains sound - and a nifty on/off toggle button to turn said annoying sound on or off.

Unfortunately, the .swf is not in its own frame - so every time a link is clicked, the .swf is reloaded.

I'm DESPERATELY trying to pass a 'sound' variable from the .swf (eg. sound == "on") into asp.

THIS seems to be working - because I can see the sound=on (for example) tag in the url when the page reloads, and when I view the source of the .asp document.

Now... how in tarnation do I get Flash to load the value from the ASP? It's clearly not doing that. It's in the query string - it's in the url - hell, when I view the source, the value in the ASP is changing.

How do I succesfully load the value 'sound' from the ASP into Flash?


stop ();
if (_level0.sound != "off") {
tellTarget ("sound_toggle") {
gotoAndStop (2);
}
} else {
tellTarget ("sound_toggle") {
gotoAndStop (3);
}
}

I know how to load values from, say, a text file - does it work the same way, especially given that the ASP is continually being changed by the Flash?


Does anyone have ANY idea how to save seven professional developers from insanity?

Thanks, folks!

- Thingee

Passing Variables To Flash 5?
When you mouseover a section in my nav, the color of the clip will change, let's say to orange. When you click, a new HTML page will load and the navigation would then default back to it's normal "off" state, with a color of "blue". Orange is the "on" color, blue is the "off" color. What I want to do is to make the orange color "sticky". Meaning that the navigation would stay orange even after a new page has loaded.

This SHOULD be possible, but I'm not sure how I would go about doing it. I'm not using frames or it would be fairly easy. I'm thinking about putting a "nav=orange" on the end of each link on my site. I'm hoping that I can somehow pass that variable into Flash which would then know to "make orange the default color" for the selected page instead of the normal blue color. I would use this method for each different color that I wanted to make "sticky".

Does that make sense at all? Can someone point me in the right direction, either with code or a link to code?

Passing A Value To A Flash Movie
could you find out what you need to do to read in the value that I pass to the flash movie.
In the HTML page that holds the movie there is this line in the code:

<PARAM NAME=movie VALUE="debug.swf?src=gotit">

I need you to be able to read the value of the variable 'src', which in this instance is 'gotit',
and have that appear as one of the values when your form submits.

Passing A Complex URL Through Flash
Hey all,

Have a problem that I don't know how to fix...

as you all know flash can supply dynmaic text after the SWF file name (i.e. link.swf?link=whatever)

my problem is this... I"m setting it up to work with an ad generation system, and my problem is this.

This system creates the links and i've got them to work all fine except when I need to use the "&" sign.

the link looks something like this (link.swf?link=whatever?click=something&zone=somet hing&timestamp=somethingelse

as you can see the ad program puts a "?" at the begining of it's link... which is what it's supposed to do... what flash does is treat the "&" as a variable or something, because it get's ignored all together...

Any thoughts on how to fix this?

Thanks

ASP Passing Variables Into Flash
Will someone kindly help me to understand how I would go about passing vaiable "X" into my flash movie which contains a dynamic text field.

Passing Variables Into Flash
Here is the snippit of code...

<object ...>
<param name=movie value="Flash/test.swf?songid=123">
<embed src="Flash/test.swf?songid=123"...></embed>
</object>


What is the actionscript I need to get the "songid" number?

Passing ASP Variables To Flash MX
Sorry for asking this but I'm new to flash actionscripting so here goes...

I have a form that passes several variables (in ASP) to another page, would it be possible to extract those variables and have them show as text in a flash movie and also replace the url encoded spaces with blank spaces?

i.e. n=Andy
or m=Andy%20Smith

in asp file that contains the flash file I want to set the variables from the previous page then display them in a movie file...

What I'm trying to do is have someone fill out a form with various text fields, these details are passed to another page for confirmation, they will also be able to see a representation of the text they have entered in a layout in a flash file which is contained in an ASP page...

hopefully that's reasonably clear...

Cheers,



Andy

Array Passing From Flash To ASP
Hi,
how do i pass an array from flash to ASP...

thanks,
shilps

Passing Vars To Flash
Hi I'm using flash MX and
having some difficulties getting a flash form to "Read" vars from an asp page.
Basically the asp checks if a user name is allready in use
, then creates the vars that tell the movie to goto "success" or "Failed" parts of the movie
this is the asp code that is giving me trouble:

<%@LANGUAGE="JAVASCRIPT"%>
if(!rsUserName.EOF)
{
Response.End
Response.Write("iFailed=1");
}else{
Response.Write("iSuccess=1");
}
%>

I've tried it without response.write e.g just iFailed=1
still doesn't work.

I'm sure it's somthing to do with the vars because if a user name is being used it doesn't perform the task after the Response.Write("iFailed=1");
If the user name is not in the db then it works (performs the tasks in the script) but always sends flash to the failed part of the movie
what am I doing wrong?

In Flash:
frame 1.
// Quantity of time to allow (in milliseconds) for variables to load.
qTimeOut = 3000;
// Quantity of retries (after initial try).
qRetry = 2;
stop();
---------------------------------------
This code is attached to button:
on (press) {
MM_insert = "true";
iSuccess = 0;
loadVariablesNum("http://localhost/myfolder/form.asp",0, "POST");
nTimeStart = getTimer();
nRetry = 0;
play();
}
--------------------------------------------
frame2.
play();
-----------------------------------------
frame 3.
nTimeElapsed = getTimer()-nTimeStart;
if (!(Number(iSuccess)) && nTimeElapsed<qTimeOut && nRetry<qRetry) {
gotoAndPlay(_currentframe-1);
} else if (!(Number(iSuccess)) && nTimeElapsed>=qTimeOut && nRetry<qRetry) {
nTimeStart = getTimer();
++nRetry;
gotoAndPlay(_currentframe-1);
} else if (!(Number(iSuccess)) && nRetry>=qRetry) {
// frame with you have submitted unsuccessfully message
gotoAndStop("Failed");
} else {
// frame with you have submitted successfully message
gotoAndStop("success");
}
-------------------------------------------------
in frames 4(success) & 5 (Failed) stop()
Hope fully there's some one here who can help
Thanks in advance.
Royse

Passing A Variable TO Flash FROM The URL
can i pass a variable INTO flash via the URL?

lets say on a splash page i want to put a link to HIGH and LOW quality flash movie.

the base swf if the same.. the LOW and HIGH quality is actually the loaded flash video.


in the base movie i would have something like
loadMovieNum(variableFromURL, "target");

is that possible? is there any script i need on the HTML page? browser version/platform limitations?

Passing Value Into Flash From HTML
How do I pass a value into a flash movie as the flash movie starts up? I think I did this before, and I just put the parameter in the HTML stuff that calls flash somewhere - so apologies if the answer to this question is trivial - I just couldn't do it this time?

Passing Variables To Flash
I am trying to pass variables into flash using the GET method, by appending a URL eg http://www.mydomain.com/flashhost.php?var1=test.

in the flashhost.php file I have the following lines, which is output in the HTML..
<object>
...
...<EMBED src="source.swf?var1=<?=$var1?>"...
...
</object>

I can get this to work if I use 'loadVariables ("flashhost.php?", this); but I want to be able to pass the variables from several files and therefore I can not code the movie with the name of the file which the variables are being passed from.

Can anyone help? thx

Passing Variables From PHP To Flash ...
I am trying to understand how to pass information from PHP to flash. My php code looks like the following:



$name = "Mark";

$address = "Seattle";

echo "name=".$name."&address=".$address;



In my flash file I am using a loadvars variable with the following call.



var c = new loadvars();

c.onload = information();



c.sendandload("test.php", c, POST);



But I don't know what to put in myinformation function to access the data that the php sends back. I assume that information will be in my loadvars variable, but I don't know where.



Please help!

Passing Variables To Flash-ASP Or XML
What are the benefits of passing values to flash using say and ASP page or XML. What kind of situation is best for each and what the drawbacks of each

Thanks

Passing Into Flash A Variable
Can someone please show me an easy piece of code that passes from the html a variable into a flash movie? Like if you wanted to pass in a username and then have that variable in flash.

Thank you very much.

Passing Values To Flash
I am trying to pass some variable to flash and have them display in a dynamic text field.
the javascript im using to pass the values is; JavaScript:GetNumberOfProps()
How do I then call this into flash??
Do I use 'geturl' or ....???
regards.

Passing Hex Colors Into Flash
Hi,

I posted a simlar question before, but didnt explain the problem correctly.

I have drawn up a map in flash which is made up of several, movie clip images that define areas.

I want to pass these movie clips a colour, so when the final movie loads, the individual movie clips take the colour passed to them from a variable.

Any one have any ideas?

P.S. Im a very flash newbie, and know no action script so the less complicated the better.

Many thanks

Passing Variable From Flash To ASP
Hi all,
I'm just fixing a swf for a friend....it should be a quick fix.
Basically i have an input field in flash thet when the user clicks the button the following action is executed:

Code:
getURL("dosearch.asp?KEYS=" add val.text, _self);
The search works fine except when i seem to use special characters.
If i do a search for say

Ned's Head

it brings up an error but if i were to do:

Neds Head

it would search correctly.
My question is how do i escape special characters or do i have to do it in the ASP script. Because i have never used ASP can anyone tell me where i need to modify the script to allow special characters?

Here's the dosearch.asp

Code:
<%
'Dim rgKeys(20)
Dim rgKeys
Private nSrchType
Private nSrchRec
Private nRecs

nSrchType = VInt(Request("srch"))
nSrchRec = VInt(Request("srec"))

function GetKeys ()
Dim s,rg,i
Dim temp


s = Request("KEYS")

rg = split(s,",")
if (UBound(rg) = 0) then
rg = split(s,"+")
if (UBound(rg) > 0) then
'NOTYET - SET OPERATOR TO 'AND'
else
rg = split(s," ")
'NOTYET - DON'T SPLIT QUOTED STRINGS
end if
end if

rgKeys = rg
for i=0 to UBound(rgKeys)
rgKeys(i) = Trim(rgKeys(i))
if (left(rgKeys(i),1)="""") then rgKeys(i) = mid(rgKeys(i),2) end if
if (right(rgKeys(i),1)="""") then rgKeys(i) = left(rgKeys(i),len(rgKeys(i))-1) end if
rgKeys(i) = Replace(rgKeys(i),"'","''")
next
GetKeys = UBound(rgKeys)+1
End function

Private Function BuildWhere ()
Dim sWhere,sAge,sPrice,sBrand,sKeys,sImg,sAward,rgAge,rgPrice,i,nK,sKop,sKw

'build 'where' clause
'if more than one page, must track search clause or pass it in query to next
'page of results
sWhere = ""
sAge = ""
sPrice = ""
sBrand = ""
sKeys = ""
sImg = ""
sAward = ""

if (Request("AGE")<>"") then
rgAge = split(Request("AGE"),",")
if (rgAge(0)=0) then
sAge = "(nAgeFrom = 0)"
end if
if (rgAge(0)<>0) then
sAge = "(nAgeFrom >= " & rgAge(0)
if (rgAge(1)<>0) then sAge = sAge & " and nAgeFrom <= " & rgAge(1)
sAge = sAge & ")"
end if
if (rgAge(1)<>0) then
if (sAge<>"") then sAge = sAge & " and "
sAge = sAge & "(nAgeTo <= " & rgAge(1) & ") "
end if
end if

if (Request("PRICE")<>"") then
rgPrice = split(Request("PRICE"),",")
if (rgPrice(0)<>0) then
sPrice = "curPrice >= " & rgPrice(0) & " "
end if
if (rgPrice(1)<>0) then
if (sPrice<>"") then sPrice = sPrice & " and "
sPrice = sPrice & "curPrice <= " & rgPrice(1) & " "
end if
end if

if (Request("BRAND") <> "") then
sBrand = "sBrand in ("
for i=1 to Request("BRAND").Count
if (i>1) then sBrand = sBrand & "," end if
sBrand = sBrand & "'" & Request("BRAND")(i) & "'"
next
sBrand = sBrand & ")"
end if


'NOTYET - IF ONLY KEYWORDS, SEE IF KEYWORD IS A BRAND FIRST, IF SO, SHOW BRAND PAGE


'break into separate words
if (Request("KEYS")<>"") then
nK = GetKeys()'sets rgKeys
if (nK > 0) then
if (nK = 1) then
'check product code
sKeys = sKeys & "( (tblItems.id='" & rgKeys(0) & "') or "
end if

sKeys = sKeys & "("
sKop = Request("KEYS_HOW")
if (sKop="") then sKop="and"
for i=0 to nK-1
if i>0 then sKeys = sKeys & " " & sKop & " " end if
sKw = rgKeys(i)
sKeys = sKeys & "( (sText2='" & sKw & "') or (sName like '%" & sKw & "%' "
sKeys = sKeys & "or (sDesc is not null and sDesc like '%" & sKw & "%' ) "
sKeys = sKeys & "or (sDesc2 is not null and sDesc2 like '%" & sKw & "%' ) "
sKeys = sKeys & "or (sDesc3 is not null and sDesc3 like '%" & sKw & "%' ) "
sKeys = sKeys & "or (sDesc4 is not null and sDesc4 like '%" & sKw & "%' ) "
sKeys = sKeys & "or (sKeywords is not null and sKeywords like '%" & sKw & "%' ) ) )"
next
sKeys = sKeys & ")"

if (nK = 1) then
sKeys = sKeys & ")"
end if
end if
end if

if (Request("IMG")<>"") then
if (Request("IMG")="1") then
sImg = " bHavePic<>0 "
end if
end if

if (Request("AWARD")<>"") then
if (Request("AWARD")="1") then
sAward = " (sAwards is not null and sAwards<>'') "
end if
end if

sWhere = "where bShow<>0 "
if (sAge <>"") then
sWhere = sWhere & " and "
sWhere = sWhere & "(" & sAge & ") "
end if
if (sPrice <>"") then
sWhere = sWhere & " and "
sWhere = sWhere & "(" & sPrice & ") "
end if
if (sBrand <>"") then
sWhere = sWhere & " and "
sWhere = sWhere & "(" & sBrand & ") "
end if
if (sKeys <>"") then
sWhere = sWhere & " and "
sWhere = sWhere & "(" & sKeys & ") "
end if
if (sImg <>"") then
sWhere = sWhere & " and "
sWhere = sWhere & "(" & sImg & ") "
end if
if (sAward <>"") then
sWhere = sWhere & " and "
sWhere = sWhere & "(" & sAward & ") "
end if

BuildWhere = sWhere

end function




Private Sub Search
Dim sql,sql2
Dim s,sWhere


sql = ""
if (nSrchType) then
're-execute query
else
'Starting a new Query
sWhere = BuildWhere
'use separate connection because we need a static cursor
sql = "select distinct tblItems.id,sName,sSmallSize,tblItems.sBrand,bHavePic from tblItems inner join tblCodes on tblItems.sBrand=tblCodes.sText " & sWhere & " order by bHavePic desc,tblItems.id asc;"
'Response.Write sql

'STORE THE SEARCH TEXT
if (Request.Cookies("GRPERSON")="") then
s = Request.ServerVariables("QUERY_STRING")
sql2 = "insert into tblSearch (dtSearch,sSearch) values ("
if (gbWeb) then
sql2 = sql2 & "getdate()"
else
sql2 = sql2 & "Now()"
end if
sql2 = sql2 & ",'" & s & "')"
conn.Execute(sql2)
end if

end if

call Results(sql,nSrchType,nSrchRec)

end sub

%>
Regards,
Suzy

Passing Variables From The Url To Flash
I want to pass variables from the url to flash. For example, (webpage.htm?variable1=blue&variable2=5) will load variable1 and variable2 into flash and make it dynamic. How do I do this?

Passing Variables To Flash
Hey All,

I searched through the forums and didn't find anything that addresses this specific issue.

I want to pass a variable to flash from my html file. I know I can pass a variable inside of the <EMBED> and <PARAM> tags, but all the examples I've seen set the value of the variable at the same time.
I'm defining and setting the value in the url (i.e http://www.url.com?variable=value) then I want to pass the variable to my swf file and have it keep the value I define in the url.
It's currently not receiving the variable. If I define the variable and assign it's value inside the embed and param tags it works fine, though.

Thanks for any help.

Luke

Passing Values To Flash
Hi,
How do I send default variables to a flash movie from html?

I've tried adding this param to the embedded flash movie ...


Code:
<param name="rId" value="5">
... and accessing it from flash with ...


Code:
_root.testText.text = _root.rId;
... but this does not seem to work.

Please help!

Thanks,
nanda :)

Passing Variables (in Flash 4)
I know Guru would know this... Such a stupid an eternal question, i'm sorry about it...

IN FLASH 4, How can i pass variables from a loaded movie (level 1) to the main movie. Can i also do the opposite ??

Passing Value From HTML To Flash
We are doing a site wherein the menu is in flash.The rest is all html.
There is link called 'Dealers'.
Now this link calls a different page as per the different products.
e.g. If i'm on the page 'Refrigrator' this link calls the Dealers of Refrigrators, and if i am on Office Conferencing page, this link calls the respective dealer's page.

We need to use only 1 flash swf carrying the links since the site is based on Content Management System.

Can anyone help me as to how to i pass a value/variable from html page to my flash carrying the links.

Any help is greatly appreciated.
Thanks.

Passing Variables To Flash
how do i go about passing a variable from an html file to a flash document embedded in it

lets say, I want to set a value of 'id' in flash

do I do it through the param tag?
<param name='id' value='80' />

i know this - but have brain freeze

cheers

Passing Variable To Flash
OK, so I have a flash page that i want an .asp to tell it what to do.

we have the first frame in the flash with this:

loadVariables("myscript.asp", 0);
if (flag="on") {
gotoAndPlay(20);
}



and out .asp is saying:

<% flag="on"

%>


But when I play the movie it's not going to frame 20!!!

Anyone help???

Passing Vars From Flash 4 To Mx
hi all
i have a flash 4 movie i want to integrate it in a mx 2004 movie the problem when i integrate it mx 2004 don't recognize syntaxe like this

PHP Code:



tellTarget ("C2/M") {
        gotoAndStop(/Colors:m);
    }




well the idea is to generate the swf then i will integrate the swf file in the mx 2004
i have a var that i want to get from the swf i try to use _global it don't accept it what to do???

Passing Variable From Flash To ASP
Hi there...

I'm trying to get variable 'score' from Flash to my ASP-page, but it ain't working...

This is the code in flash

[as]
on (release) {
var score
score = total
getURL("index.asp", "_top", "GET");
}
{/AS]

'Total' is a number in my game.

And I'm using this in my ASP-page: request.querystring("score")

I this the correct way or is the a better way to pass values from flash to asp?

Thnx

Passing ComboBox Value's From Flash
Hi..

I'm trying to submit a form from flash to an external notes database, I can get the text boxes for Name, Address etc to pass but I cant get the value of the dropdown boxes to come through.. here's the code on my submit button, the one marked in bold is the dropdown:

on(release) {
sender = new LoadVars();

sender.Forename = Forename.text;
sender.Surname = Surname.text;
sender.Dob = Dob.text;
sender.Address = Address.text;
sender.City = City.text;
sender.Postcode = Postcode.text;
sender.Tel = Tel.text;
sender.Email = Email.text;
sender.DJ = DJ.text;
sender.Club = Club.text;
sender.Hear = Hear.text;
sender.Occupation = Occupation.text;
sender.Mobile = Mobile.text;
sender.Add2 = Add2.text;
sender.Title = Title.text;

sender.send("http://blahblahblah","_blank","post");

}

I know I need to put something else instead of .text but I've tried .selected .value and a few others but it still passes nothing. I've put Mr, Mrs etc.. in the Labels and Data section of the components properties.. what am I missing?

Thanks, Rockstar.

ps, thanks to Lexicon for all the help so far!

Passing Arrays Into Flash
Hi,

Is there a simple way to pass an array into Flash?

I have a database that I want to query.
I need the results of the query passed into an array in Flash.

I'm using Flash MX 04, SQL DB, and ASP.

My Process is currently as follows:

I've got a DB in SQL with data.

I'm using ASP to query the database and return the results.
In asp, I'm formatting a string of variables -
&item1=a|b|c&item2=d|e|f&item3=g|h|i and so forth

In Flash I'm using LoadVariablesNum and pointing to the asp page.
I parse the string so that item1's data will be in array[0], item2's data will be in array[1] and so forth.

The data to be passed into flash is a bit long so the strings are quite long.

Is there an easier way to do what I am doing?

Thanks.

Passing Variables In Flash?
I have a navigational movie which animates each time the user goes to a new page. I would like to make it so that the user only sees the nav animate once when they originally enter the site and not again after that. I know it can be done by creating and passing a variable but I dont know how. Can anyone tell me or give me another resource which will help?

Thanks

Neilb1969

Passing Variables Flash To Php
hi friends..

Please give me solution.

i am working with php and flash
my flash my.swf running in index.php

now i need to pass variables from my.swf to index.php without refreshing page. and dont want to open new page.

please help.

thanks in advance
mahesh

Passing Variables Flash To Php
hi friends..

Please give me solution.

i am working with php and flash
my flash my.swf running in index.php

now i need to pass variables from my.swf to index.php without refreshing page. and dont want to open new page.

please help.

thanks in advance
mahesh

Passing Variables From FLASH To PHP
I'm trying to pass simple variables from flash to php and vice versa. I have come accross so many different ways that i don't know which one to use.

I have a flash movie and i have a php script. I want variables to pass to the script a few times a second, then the php script sends the values to a MySQL database. But i have no problem with that. The problem is that i can not get the variables in flash to pass to php. I don't want the movie to do anything when a variable is passed either. So the getURL command is no good.

Does anyone know how i can do this?

Thanks.

Passing Variables From Flash To PHP
I have a problem when trying pass a variable (entered into an input textfield) from Flash to PHP. When the button is hit to activate the LoadVars object, the PHP script returns the error message:

Notice: Undefined index: years in /Users/phil/Sites/phpflash/campaign/calculation.php on line 2

Here's the Flash script:

var path:String = "http://localhost/~phil/phpflash/campaign/"

var dataOut:LoadVars = new LoadVars();

myBtn.onRelease = function() {
dataOut.years = years_txt.text;
dataOut.send (path + "calculation.php", "_blank");
//trace(years_txt.text);
};

And here's the PHP script (called 'calculation.php'):

<?php
$calculation = $_POST['years']*7;
echo $calculation;
?>

The trace function shows me that the value entered by the user is recognised and I've done all the usual checks (ie: checking the path names and instance names etc are all correct), but I'm still getting the Undefined index error.

Can anyone help?

Help Passing Vars From Flash To PHP
I am trying to do something that is probably very simple, but I am having the toughest time.

I am simply trying to take 2 text inputs in flash (1 var is called username and the other called passwrd).

I simply want these variables to POST to a page called login2.php

I also want to first check to see if either of them is empty.

Here's what I have so far and it does not seem to be sending my variables. I think my code doesn't know exactly where my text inputs are because if I leave the fields blank, it still goes to the page.


Code:
on(release, keyPress "<Enter>"){
auth.txtuser = _root.closemovie.acctLogin.username.text;
auth.txtpass = _root.closemovie.acctLogin.passwrd.text;
if(_root.closemovie.acctLogin.username.text == "" || _root.closemovie.acctLogin.passwrd.text == ""){
_root.errormsg.gotoAndPlay("back");
} else {
_root.closemovie.gotoAndPlay("away");
_root.loginmovie.gotoAndPlay("back");
trace(auth);
auth.send("login2.php","_blank","POST");
}
}
My button and both my inputs all sit inside of a movie clip. Why doesn't this work?!

You can see it in action here: http://files.blasterstudios.com/hgs/site/

Passing Variable In Flash
i have a flash movie which redirects to a url
i just need to pass a variable to the flash and have it put that variable in the geturl so i can get it with php after the redirect.

like this
like
www.something.com/flash.swf?refer=flashkit
then the flash needs to put the variable in the get url
like geturl (http://yaddayadda.com/variable=variable

shouldnt be too hard.

Passing Variables To PHP From Flash
Hey guys,

If anyone could help with this, I'd be very happy!

I have my Flash5 movie embedded in the index.html page in:
http://www.dar.cam.ac.uk/mayball/smrtj/
(swf file location http://www.dar.cam.ac.uk/mayball/smrtj/smrtj.swf)

On each page after the intro, I have an "admin" button. (Note there is also an "admin" button on the intro page, but this doesn't yet have any AS).

On each page, which is actually a scene in my swf, the variable current is set to the name of the current page, juniors, say. The "admin" buttons have the following AS:

on (release) {
page = current;
getURL ("form.php", "admin", "GET");
}

So that brings up a new window (called "admin") and, from the juniors page, loads:
dar.cam.ac.uk/mayball/smrtj/current=juniors&page=juniors
into it.

The problem is, the PHP doesn't get the variables! The URL is in the address bar as shown here, but "Here, page should be: $page" doesn't show anything for the $page variable!

Can anyone clear this up for me???

Thanks a lot,
Chris

Passing Arrays To Flash From PHP
Hi

I need to let my admin guy enter dates into external files for my calendar in my swf to load onto an events calendar.

The events calendar is actually more of a timeline, and these dates will place dots on the timeline.

Any ideas on the best way to do this??

Thanks a lot,

Chris
http://emma.dar.cam.ac.uk/~cdj21/smrtj/aru

Help - Passing Data From Flash To PHP
I manage to send data from PHP to flash but clueless on how to the opposite.
i did a search and found the address below, but its this method require flash to open another browser and pass it useing http address.
I want to to be done in background.
what functions might I use in flash?

http://flashkit.com/board/showthread.php?t=636251

Passing Variables From Flash
hi,

i encounter problem when i want to pass variables to another file/program.

my situation:
to receive a variable (eg. id)
then pass this variable back when come to last frame.

how do i pass variable in this situation?
i tried using

var id=id;
getURL("test.asp", "GET");

is this correct?
the .asp page will open which i do not want. how do i just pass the variables only.


thanks very much.

Passing Data From Flash To ASP
I'm not sure about how to go about this. I have a flash file with a search form in it. I want to pass the data entered into this search form to a non-flash .asp page to show the results there. And I have to use Flash 7. How do I go about doing this?

Thanks!

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