How To Pass Variables In Flash?
May i know how to pass data from a flash files to unopened swf files? Please guild me. Thxs in advance, anyhelp is appreciated.Regards,louis chin
Adobe > ActionScript 3
Posted on: 09/18/2008 11:36:10 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Pass PHP Variables To Flash
I am trying to create a flash site that will allow users to upload an image to database. I am using PHP script to upload the image through an HTML popup window. Once the image is uploaded (after 'submit' has been clicked), how can I pass the 'imgID' variable back to Flash?
I know variables can be passed back to Flash through PHP by simply using the 'echo' function, but I can't seem to get it to work in this case (maybe b/c I am launching my php script through the 'getURL' instead of 'loadVariables'???).
Flash code:
Code:
on (release) {
//launch upload window
getURL("javascript:openNewWindow('upload.php', 'myWindow', 'height=200,width=500,toolbar=no,scrollbar=no,menubar=no,location=no,resizable=yes,status=no'); NewWindow.focus(); void(0);");
}
PHP Code:
PHP Code:
<?php
#DB CONNECT
//database info
$host="localhost";
$user="";
$pass="";
$db="";
$table ="image";
// database connection
$conn = mysql_connect($host, $user, $pass) OR DIE (mysql_error());
@mysql_select_db ($db, $conn) OR DIE (mysql_error());
#ON SUBMIT
// Do this process if user has browse the
// file and click the submit button
if ($_FILES) {
#ALLOWED FILE TYPES
$image_types = Array ("image/bmp",
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png",
"application/octet-stream");
#IF THE FILE UPLOADS SET USERFILE AND BUILD VARIABLES
if (is_uploaded_file ($_FILES['userfile']['tmp_name'])) {
$userfile = addslashes (fread (fopen($_FILES["userfile"]["tmp_name"], "r"), filesize($_FILES["userfile"]["tmp_name"])));
$file_name = $_FILES["userfile"]["name"];
$file_size = $_FILES["userfile"]["size"];
$file_type = $_FILES["userfile"]["type"];
#IF THE FILE UPLOADED IS IN THE ALLOWED FILE TYPES ARRAY UPLOAD IT
if (in_array (strtolower ($file_type), $image_types)) {
$sql = "INSERT INTO ".$table." "
. "(image_type, image, image_size, image_name, image_date) ";
$sql.= "VALUES (";
$sql.= "'{$file_type}', '{$userfile}', '{$file_size}', '{$file_name}', NOW())";
@mysql_query ($sql, $conn);
//Header("Location:".$_SERVER["PHP_SELF"]);
//get image id
$id= mysql_insert_id();
echo "$id";
}
}
}
?>
<html>
<head>
<title>Upload Image</title>
</head>
<body>
<form method="post" enctype="multipart/form-data">
<br>Select Image to Upload:<br>
<input type="hidden" name="MAX_FILE_SIZE" value="24000000">
<input type="file" name="userfile" size="60">
<p>
<input type="submit" name="submit" value="Upload Image">
</form>
</body>
</html>
HTML Code:
Code:
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<TITLE>index</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<!-- URL's used in the movie-->
<A HREF=javascript:openNewWindow('upload.php', 'myWindow', ','height=200,width=500,toolbar=no,scrollbar=no,menubar=no,location=no,resizable=yes,status=no'); NewWindow.focus(); void(0);></A> <A HREF=javascript:Launch('index.php')></A> <!-- text used in the movie-->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="550" HEIGHT="400" id="index" ALIGN="">
<PARAM NAME=movie VALUE="index.swf?id=<? echo id?>">
<PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="index.swf?id=<? echo id?>" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="index" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function openNewWindow(URLtoOpen,windowName,windowFeatures) {
newWindow = window.open(URLtoOpen,windowName,windowFeatures);
}
// End -->
</SCRIPT>
</BODY>
</HTML>
Thanks for any advice you can offer.
Pass Variables From Flash
hi,
i like to know how do u pass variables from flash to another html. mine is just one simple variable.
what i get from flash Help is using GET and POST(after declaring the variables)
getURL("http://www.macromedia.com", "_blank", "GET");
getURL("http://www.macromedia.com", "_blank", "POST");
is there another way where i can pass variables? like using:
getURL("http://wwww.macromedia.com?fid=",);
*fid is the variables.
thank you
H E L P P L E A S E ASP And FLASH Pass Variables
Hope somone can assist here, I have an ASP page with 3 variables it gets from an excel spreadsheet (unusual but it works ok) I want to display the variables in 3 text areas in Flash 8
getdata.asp is my web page, variables are
STR_name
STR_add2
STR_postcode
its as simple as that, the ASP page works fine so I guess I need to run it in the background to produce the variables?
I have read many tutorials arround this but cant quite grasp it
I need to know what actionscript to run under what frame, I dont need to scroll through the records as the web page will only bring back 1 set of variables because the data is non conflicting
Thanks in advance
many thanks
Edited: 04/16/2008 at 12:56:42 AM by john iles..
Pass Variables To Flash
http://www.bayareafellowship.com/baf...es/losite1.php
the image titled "relentless" and the title "relentless" i want it to pull from an xml file. how would i go about loading this in flash. i am doing through a database and i know how to get the xml file to update from the database. but i want the flash file to update from the xml file. all the variables i need to pass are
1) Title of series
2) series image (jpeg)
any suggestions
Pass Variables From Flash To ASP
Hi all.
I am trying to pass variables from Flash to ASP when someone releases a button. The variable will then be passed to my timeline.asp page and go to a specific record in my database.
I found a very useful tutorial to pass variables from ASP to Flash but only vaery short description on passing variables the other way around.
http://www.asp101.com/articles/flash/
Cheers
Does ANYONE Know How To Pass Url Variables To Flash AS3
Hi,
I've done a ton of internet searching and can't find but snippets and vague, non-working tutorials on this.
How do I read url variables in Flash CS3 (AS3)?? What commands? Syntax? I tried the following:
var obj:Object=LoaderInfo(root.loaderInfo).parameters;
var try_txt:TextField = new TextField();
addChild(try_txt);
for (val in obj)
{
id=String(obj[val]);
try_txt.text += id;
trace(try_txt.text);
}
it's always blank. My url is of the form
www.mysite.com?x=77
Then I change the object and embed parameters in the swf loder:
<param name="movie" value="loadURLParams.swf?x=77" /> //x will be populated w/ php
and do the same for the embed.
NOTHING. How do I do this??
Thanks!
Jay
HELP How Can I Pass Variables From Flash To Javascript?
I am trying to pass variables which the user can enter into a flash movie to javascript (for example to have an alert using the data they have just entered) but the flash variables are just being ignored (if I'd have them in the sourch code of the html file it would work- but i need to have the user enter the).
Can this be done?
thanks.
Pass Variables To A Flash Movie
1st, I'm not sure if is is really concerning ActionScript (maybe it is silly HTML)
How can I load a page with a flash movie, passing a pair of variables to the movie?
In other words, I've an ASP page, that get name and age, and put them in variables. After that, I'll jump to a page with a flash movie, and I want to get the two variables inside the flash.
Any help will be pleasant
ray
Pass Variables To Flash Isn't Working
I usually use flashfile.swf?var=blah but it isn't working anymore, does player 6 have a bug? I even tried it after uploading to the server, it still won't work.
Flash Images Need To Pass Php Variables In URL
Having spent loads of time learning php/mysql I then discovered Dreamweaver MX and am now updating my website. I have been give 4 lovely flash animations which I want to use as links to other pages in my website but have found that dynamic php variables passed to the images will not work. Any ideas. A friend said I could put the flash animations into a fireworks table but flash and fireworks just ain't my thing although if anybody can point me to an online guide that would help, I'd be a happy person.
Pass Variables From One Flash Movie To Another
Hi,
I need to find a method of passing a single variable from one flash movie to another, I have read up briefly on this subject but have only found methods of retrieving variables.
Basically, I have a swf with a number of buttons which call upon the corresponding URL containing the new swf when pressed. The problem is, I want a standalone preloader swf before the new swf loads, and rather than create lots of separate preloaders for each new swf, it would be nice if i could create just the one preloader, with the variable of the desired swf being passed to the preloader.
I'm sure this is possible, but if someone could get me started I would be very grateful!
Thanks, Steve.
How To Pass Variables To A Flash Movie?
Hello guys, I have a question regarding work with variables.
Now, the base of what I'm doing is php scripting. Among other things I want to pass some variables to a flash movie. So I have a script A that passes some variables to a php script B that has a flash movie included. I want that flash movie to pick up values of those variables.
I'm not sure what's the best way to do it and how it should be properly done to exclude any possibility of an error. Is the best way to do it, passing the variables through the URL? So I call "scriptB.php?somevariable=somevalue" in my script A or are there other options?
I'm really not sure how to read those variables in flash. I know functions like loadVariables, but that's loading an entire URL, ain't it? What I would like is for flash just to receive the variable & value pairs that were send to the script B that's holding the flash movie?
I hope it makes sense. Thank you for help.
Regards,
Airnine
FlashVars: Here Is A Way To Pass Variables To Flash Via AS3
I have been doing a lot of searching and speaking to a lot of people about a way to pass the current URL to flash so that I can make a simple button go to the down position based upon what page the person is on. WOW, what a pain... lol
Well, A pain no more. Here is a list of everything I have found. Hopefully it will help someone out there.
First, you can use FlashVars in order to talk to Flash.
You can use Flash Vars by simply either adding parameters to the movie parameter in the HTML for flash as such
<param name="movie" value="main.swf?one=1&two=2" />
<embed src="main.swf?one=1&two=2"
Code:
<!-- using query string -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
width="550"
height="400"
align="middle"
id="main">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="main.swf?one=1&two=2" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="main.swf?one=1&two=2"
width="550"
height="400"
autostart="false"
quality="high"
bgcolor="#ffffff"
name="main"
align="middle"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
OR
creating an additional parameter name called FlashVars such as:
<param name="FlashVars" value="one=1&two=2" />
FlashVars="one=1&two=2" (for the embed statement)
Code:
<!-- using FlashVars -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
width="550"
height="400"
align="middle"
id="main">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="main.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="one=1&two=2" />
<embed src="main.swf"
width="550"
height="400"
autostart="false"
quality="high"
bgcolor="#ffffff"
FlashVars="one=1&two=2"
name="main"
align="middle"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Okay, that was the easy part.
The next thing you have to be able to do is retrieve this information that you have just passed in
This was not so easy to find. Even when you do find it tutorials that explain it, they are not correct and they end up not working.
You have to change a few items in order to get this to work.
1. You have to add the following parameter to the AC_FL_RunContent Javascript on the HTML page generated by Flash: 'FlashVars', 'YourFlashVarParameterHere'
Such As:
Code:
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '550',
'height', '400',
'src', 'flashvars',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'flashvars',
'bgcolor', '#ffffff',
'name', 'flashvars',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flashvars',
'FlashVars', 'flashvars',
'salign', ''
); //end AC code
}
</script>
2. For testing, enter the following actionscript into your Actions Layer on your main timeline.
Code:
// Reading the FlashVars from the page
var tf:TextField = new TextField();
tf.autoSize = TextFieldAutoSize.LEFT;
tf.border = false;
addChild(tf);
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");
}
The above code creates a textbox dynamically and outputs the flash variable to that text field.
The following code is what I believe to be the actual item that collects the variable.
Code:
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
I hope this helps someone here like many people here have helped me.
Wayne
Pass Variables From Html To Flash ?
i was wondering if there's any way you can pass variables from html to a flash image ?
in other words: i want a script that takes a variable it is given from outside the flash movie and changes the link accordingly.
I hope this is possible and if someone wants to help me with this
Thx in advance
Greets
How Do I Pass Hidden Variables From Php To Flash
I am trying to make a flash file open a specific xml file from a URL that is set in the php file. when a the page is loaded, the php file is called for the variable. you must use a query line in the URL....example : http://www.mysite.com/test.swf?folder=myfolder
the php file should see the 'folder' variable and use it in the url that i want to load the xml file from. Once the variable is set in the php file, i want to transfer it to the swf file without having to change the url that the user types.
Here is basically what i want to do....
i want to be able to type in www.mysite.com/test.swf?folder=MyFolder in the browser. the php file will check some stuff in the mysql database and make sure that the user's space is not used up.....i can do that part with the space. If the user's space is not used up, it will post a variable to the swf file to load the xml file with the 'folder' variable in the url.. example : .....com/TheFolderVariable/thexmlfile.xml Once the variable is passed to the swf file, it will load properly.
I was trying to use the loadVars() and the loadVariable() commands but i cannot get the php file to post back to the swf.
Trying To Pass Variables TO Flash Then Back Into Php
First of all, I am a complete Flash n00b. I'm making a website right now and I've been trying to learn it 'on-the-go' with no avail. After 2-3 weeks of reading tutorials, reading up and researching I'm at the end of my wits. What I am trying to do:
Pass variables into Flash from a PHP script using LoadVars in the html
Quote:
object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="360" height="260" id="snakeTutorial" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="snakeTutorial.swf" />
<PARAM NAME=FlashVars VALUE="gameid=<?php echo "$gameid&userid=$userid";?>">
<param name="loop" value="false" />
<param name="quality" value="low" />
<param name="devicefont" value="true" />
<param name="bgcolor" value="#ffffff" />
<embed src="http://buxgames.com/demo/games/snake/snakeTutorial.swf"
FlashVars="gameid=<?php echo "$gameid&userid=$userid";?>"
Then I have NO idea where to put the LoadVars and how to treat the variables and to make the show up on the nameTextField. I don't know to to implement the getUrl in the submit button to pass on the variables to a PHP script either!
Display the name when the game is finished and once the submit button is pressed, I want to pass on the score, gameid, and userid into another PHP script which contains the sql code.
The script that I'm trying to edit: http://www.strille.net/tutorials/sna...hHighscore.zip
I read over countless LoadVars tutorials and did a lot of examples but I still cannot integrate into the script.
If someone would be able to help me out, I'd be GREATLY appreciated!
Pass External Variables Into Flash
hi all,
i have a variable i want to pass into my flash movie. in my xhtml page i have:
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="767" height="184">
<param name="movie" value="images/header.swf?myVar=5" />
<param name="quality" value="high" />
<param name="WMode" value="Transparent">
</object>
so im passing in the variable 'myVar'. in my flash movie, how do i get at this variable and display it in, say, a dynamic text field?
many thanks
- D
[MX04] Trying To Pass Variables TO Flash Then Back Into Php
First of all, I am a complete Flash n00b. I'm making a website right now and I've been trying to learn it 'on-the-go' with no avail. After 2-3 weeks of reading tutorials, reading up and researching I'm at the end of my wits. What I am trying to do:
Pass variables into Flash from a PHP script using LoadVars in the html
Quote:
object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="360" height="260" id="snakeTutorial" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="snakeTutorial.swf" />
<PARAM NAME=FlashVars VALUE="gameid=<?php echo "$gameid&userid=$userid";?>">
<param name="loop" value="false" />
<param name="quality" value="low" />
<param name="devicefont" value="true" />
<param name="bgcolor" value="#ffffff" />
<embed src="http://buxgames.com/demo/games/snake/snakeTutorial.swf"
FlashVars="gameid=<?php echo "$gameid&userid=$userid";?>"
Then I have NO idea where to put the LoadVars and how to treat the variables and to make the show up on the nameTextField. I don't know to to implement the getUrl in the submit button to pass on the variables to a PHP script either!
Display the name when the game is finished and once the submit button is pressed, I want to pass on the score, gameid, and userid into another PHP script which contains the sql code.
The script that I'm trying to edit: http://www.strille.net/tutorials/sna...hHighscore.zip
I read over countless LoadVars tutorials and did a lot of examples but I still cannot integrate into the script.
If someone would be able to help me out, I'd be GREATLY appreciated!
Best Way To Pass Variables To Flash Media Server?
Hello all!
I'm new to the forum, so please excuse any blunders I make!
I'm trying to learn the best/simplest/easiest way to pass a variable from flash to a flash media server. The transfer will be triggered by a button press, sending the info to my FMS which will respond accordingly.
The real question is, is it better to send the info from the swf or to call on it from the FMS?
Thanks in advance to anyone who answers!
Pass Variables Into Flash Movie Via Javascript
Hi,
I'd like to know of any (if any) way for me to pass 2 values into a flash movie (actionscript variables). My flash movie is supposed to generate some slogan based on the 2 variables passed by Javascript. Thanks.
Pass Variables Into Flash Movie Via Javascript
Hi,
I'd like to know of any (if any) way for me to pass 2 values into a flash movie (actionscript variables). My flash movie is supposed to generate some slogan based on the 2 variables passed by Javascript. Thanks.
Pass Variables Into Flash Via Query String
I used to do this all the time to pass in simple values to Flash but with Flash 8 it doesn't seem to be working properly. I've stripped it down to it's most basic and it still doesn't seem to be working. I've got a test page here:
http://icglink.com/flashtest/
The top set uses the standard object/embed method, the left one passing in a 0, the right passing in a 1. Both use the variable named previousvisitor.
The bottom set use the same variable and value structure, but with the swfobject javascript call instead of the object/embed method.
I've got a case statement on the 5th frame that tests the incoming variable and directs the playhead to one frame label or another. The idea is that if someone has come to the site for the first time, they'll get to see a video. If not, they'll get a still frame with a "play video" button.
I'm also including a link to the FLA (version 8 remember).
http://icglink.com/flashtest/cookieTEST.fla
So does anyone have ANY idea why this isn't working correctly? I really need to get this working and it should be dead simple.
Help, Trying To Pass Variables From A Flash Movie To Html Using GetURL
here's an example of the code i am using (it's for a banner that lets you select a few dropdown options):
//concatenates the variables in my movie to the url
_root.urlvar=("http://www.examplesite.com/page.html?var1="+_root.variable1+"var2="+_root.var iable2);
//opens the url in a new browser window
getURL (_root.urlvar, "_blank");
The problem i am having is that IE and Firefox block this. Is there a way of getting around the security without changing browser settings?
Pass Variables To Flash Through Embed Object Param
Hello!
I was wondering if you can pass variables to flash this way:
<object>
...
<param name = "pageid" value="10">
...
</object>
instead of passing them as part of the embed src property:
<object>
...
<embed src ="myflash.swf?pageid=10"></embed>
</object>
Thanks.
B.
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
How To Pass Variables From Flash To Asp.net And Asp.net To Flash
how to pass variables from flash to asp.net and asp.net to flash
I am using loadvariables in flash but i did not work
I simply write in my flash file
loadVariables("test.aspx", "");
and in test.aspx i am calling datetime function to print a date.
can anybody help me how can i do that.
Thanks in advance.
Pass Variables Between Different Swf >> HELP
This is quite simple.
I'm loading 02.swf inside 01.swf...
Code:
loadMovie ("02.swf", _root.screen)
That's OK
Now I want to pass some information from 02.swf to 01.swf before it's starts
In other words, I want to pass some variables to the main swf
Does anyone have an idea?
Thanks
Renato
Pass Variables From One Swf To A Second Swf?
Help! I have two movies and I want the first to pass a variable to the second movie.
loadMovieNum("second_movie.swf", 0, "POST") just doesn't seem to do it. My second movie plays but does not receive the variable.
I have tried loading the second movie into a new level rather than replaceing the first but that doesn't work either.
GET also will not work.
I'm trying to do this locally so I can run the swfs from a CD.
How Can I Pass Variables
can someone tell me how can i pass variables to a flash movie through html or asp pages?
merry christmas and thanks in advance
Baljit Singh Grewal
Variables Do Not Pass Why?
hello i am trying to make a ip fliter system and i need a little help
in my movie file i have
//Create the LoadVars object and load data
myData = new LoadVars()
//domain name with key
myData.load("http://domain.com/key.php")
//Callback handler and binding
myData.onLoad = function(succes){
if(succes){
Comments_txt.text = gotoAndPlay(this.Comments);
} else trace("Error loading data")
}
stop()
and at the key.php
<?php
$iplist = array("0.0.0.0","10.10.0.0");
foreach($iplist as $ip)
{
if($ip == $_SERVER[REMOTE_ADDR])
{
$allowaccess = 1;
}
}
if($allowaccess)
{
echo "Comments=2";
}
else
{
echo "Comments=3";
}
?>
when i enter my ip adress into Iplist$ and upload file to internet and after i play the movie from my computer everything works fine the variable Comments=2 forwards me to frame 2 .
The trouble happens when i wpload movie to domain2.com that has ip 10.10.0.0 and add this ip to ip list in key.php file the movie does not play athough it was plaing from my computer what could be the possible reason?
any advices are welcome
Thanks a lot!
Pass Variables From ASP To MX
This ASP line works fine for my flash movie:
Response.Write "&firstname=Mike&"
But this returns one quotation mark:
Response.Write "&firstname=" & firstname & "&"
I also tried this:
test = "&firstname=" & firstname & "&"
Response.write test
That doesn't work either.
How can I put variable names in the Response.write and get Flash MX to take it.
Here is my Action Script:
myData = new LoadVars();
myData.onLoad = function() {
leaguename.text = this.leaguename;
};
myData.load("livedraftvar.asp");
stop();
Pass Url Variables
Hey. I am trying to pass some vars via the url. I have the imbed/ object tags set up to receive the variables:
http://markchalus.com/gallery.php?ca...mbs=new_14.jpg
if you view the source, you'll see the var values are making it to the embed areas. The white text field you see floating on the page is on _root and has the var name of "cartItems". No value is appearing even though the imbed tags have the "cartItems" value. Any ideas? I was under the impression this is all I needed to do.
Thanks for the help,
1M.
P.S. I'm not sure if anyone else is having search problems here but I have had a difficult time for the past couple of days searching anything....
How Do I Pass Variables Between This?
I am building a Flash movie with multiple movie clips on the stage. I wrote some code so that it is possible to change all the movie clips at once with a while loop rather than having ti write code out for each one.
Most of the code works fine, however I think I am getting a problem when actually changing the movie clips. For example, I have a variable called nextItem, which holds the name of the next item to be changed. I then use the code:
Code:
_root.nextItem._x = _root.myThing._x;
_root.nextItem._y = _root.myThing._y;
to alter the clips on the stage. This is where the problem is, I think.
I presume the problem is that Flash is trying to move a clip with the instance name "nextItem" but of course I want it to pick up on the vairable instead of searching for the instance name.
How do I get Flash to pick up the variable instead?
Any help would be appreciated,
jellyrools
Pass Variables From URL
Hello everybody,
First I want to say that I am new to Flash and ActionScript.
What I need to do is:
I have that URL: http://domain.com/home.php?pid=23 (The value of $_GET['pid'] is dynamic, could be different depending on where I am coming from).
Also I have a flash navigation with buttons.
The URLs of these buttons should be:
1st button: http://domain.com/page1.php?pid=23 (This value of pid should be taken from the $_GET['pid'] value)
2nd button: http://domain.com/page2.php?pid=23 (This value of pid should be taken from the $_GET['pid'] value also)
My problem is that I can not figure out how to pass the $_GET['pid'] value and attach it to the getURL and make the links of these buttons.
Thank you for your help in advance!
Pass Variables To SWF
Ok guys, as i am sure you know when you publish your swf there is a html page that comes along with it, I have found through here how to embed the flas movies into pages, what I need to know is how do you pass variables into the swf?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>grafitti</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="550" height="512" id="grafitti" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="grafitti.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="grafitti.swf" quality="high" bgcolor="#ffffff" width="550" height="512" name="grafitti" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
what would I do to pass the variable 'picture' with the value 'thing.jpg',
thanks for the time spent oh and one more thing, can I load the swf into a page on a different site if i choose to?
How To Pass Variables?
function onResult(e :OperationEvent):void
{
var sd:Number = new Number(e.data);
}
Is there anyways to pass this variables to other swf files as a session?
Pass Variables To PHP?
Hi there...
I want to have a button and when clicked, it does the equivelent of going to this php address and executes the php, as it would by typing into address bar. Simply activates php script with variables.
Code:
http://yoursite.dom/public/list.php?email_address=newuser@domain.com&group_ids=1&action=subscribe&firstname=John&lastname=Doe
.
How can i do this 'behind the scenes' in flash?
I have so far this (which of course doesnt work because 'theVariables' is not recognised by the PHP fle. I need to send variables which are name in the php file email_address, group_ids etc etc)
Code:
btn_submit.addEventListener(MouseEvent.CLICK, btn_submit_handler);
function btn_submit_handler(event:MouseEvent):void {
theVariables.email_address = emailAdVar;
theVariables.group_ids = 1;
theVariables. action = "subscribe";
theVariables.firstname = firstNameVar;
theVariables.lastname = lastNameVar;
var theRequest:URLRequest = new URLRequest();
theRequest.url = "listmessenger.php";
theRequest.method = URLRequestMethod.POST;
theRequest.data = theVariables;
var theLoader:URLLoader = new URLLoader();
theLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
theLoader.addEventListener(Event.COMPLETE, loadCompleteHandler);
theLoader.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
theLoader.load(theRequest);
}
function handleIOError(event:IOErrorEvent):void {
event.target.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
}
function loadCompleteHandler(event:Event):void {
//do nothing...
}
thank you very much for any help!
Best Way To Pass Variables From As2 To As3
I have a variable in an as2 movie, urlwholoadedme = _level0._url; , that i need i need to pass to an as3 swf that gets loaded ( (loadMovieNum("movietoload.swf", 1); ). what is the most efficient way to do this?
TIA to anyone willing to help!
Pass Variables Into Another Swf
Hi, I'm very new to as and my friend wanted me to make 4 him som presentation cdrom in flash... it's photogalery and i used component from mr10.net and it works! BUT if i want larger image to open in a new window (not html) on click i'm finished
So. if anybody can explain me how can i make it ...
i've used this code:
ActionScript Code:
function clickMe(id) {
var imagePath = myGallery.getXMLNode().firstChild.childNodes[id - 1].attributes["jpegURL"];
var wiew = ("images/"+imagePath);
this.createEmptyMovieClip("imageBig",this.getNextHighestDepth());
loadMovie(wiew, "imageBig");
imageBig._x = 150;
imageBig._y = 70;
}
it works but that's only the big image with active content in the background .. i want to open another window with close cross and prev/next buttons but i'm unable to pass any variable into another swf file... so that's my story )
Pass Variables To Swf
Can anyone help me to pass variables through a url to swf file that loads in a html file.
I currently have it working when the swf that loads directly in a browser, see Pea Weavil Model
This works fine, but there are certain issues with loading the swf directly in the browser. Any help would be appreciated.
Pass Variables From ASP To MX
This ASP line works fine for my flash movie:
Response.Write "&firstname=Mike&"
But this returns one quotation mark:
Response.Write "&firstname=" & firstname & "&"
I also tried this:
test = "&firstname=" & firstname & "&"
Response.write test
That doesn't work either.
How can I put variable names in the Response.write and get Flash MX to take it.
Here is my Action Script:
myData = new LoadVars();
myData.onLoad = function() {
leaguename.text = this.leaguename;
};
myData.load("livedraftvar.asp");
stop();
Pass Variables From URL
Hello everybody,
First I want to say that I am new to Flash and ActionScript.
What I need to do is:
I have that URL: http://domain.com/home.php?pid=23 (The value of $_GET['pid'] is dynamic, could be different depending on where I am coming from).
Also I have a flash navigation with buttons.
The URLs of these buttons should be:
1st button: http://domain.com/page1.php?pid=23 (This value of pid should be taken from the $_GET['pid'] value)
2nd button: http://domain.com/page2.php?pid=23 (This value of pid should be taken from the $_GET['pid'] value also)
My problem is that I can not figure out how to pass the $_GET['pid'] value and attach it to the getURL and make the links of these buttons.
Thank you for your help in advance!
|