ActionScript 2.0 :: FMX - Passing Variable From HTML To SWF?

Mar 18, 2004

I've been trying - with absolutely no success - to pass a variable from an SWF on an index page to an SWF on the next page (in this case home.asp). I am using the following method:

In the index page when a menu button is clicked I pass the value in the string
[AS]getURL("home.asp?jumpTo=aboutus", "_top", "GET");[/AS]
Then on home.asp I drop the value into the SWF link (both the object and embed tags):
myswf.swf?jumpTo=<%=request.querystring("jumpTo")% >

In the SWF I then attempt to use the value of "jumpTo" like this:
(this is on the first frame of the SWF)
[AS]if(jumpTo==aboutus) {
_root.button4.gotoAndStop(10);
_root.header.attachMovie("aboutID", "attachedAbout", 1);
getURL ("aboutus.html", "site");
}

There are 11 possible values for "jumpTo" and I have a similar "if" statement written for each one. i know the value is being passed from the original SWF to home.asp because when I request the querystring it gives me the correct value. it's obvious that the SWF embedded in home.asp is not receiving the value. Do I need to declare the variable first? Should I use a global variable? is it possible to set up a dynamic variable in the flash movie?

View 3 Replies


Similar Posts:


Php :: Passing Variable FROM Flash To HTML?

Mar 7, 2011

I have a rather simple flash application users can make a quick username when connected, and the username is created inside the flash swf.

Now, I have a cron job deleting inactive usernames every ten minutes (on my mysql database where these usernames are all stored and accessed by the other people online) which is fine. But it can still get cluttered up if a bunch of people sign off at once, there is still that 10 minute window before the cron job clears them.

The users have an option to click log out in the flash application which is fine and works great. But of course many choose not to click log off they just click the browser x.

I've looked into onbeforeunload and jquery's .unload but I still need a way to get the username variable that's IN flash INTO the HTML, then use a php script to run the delete username mysql query.

If not, any insight on how I might pass the username variable to the html to hold onto it after the user makes their username so it can be involved with the .unload function running the php script?

EDIT::::: Maybe is there a way to create a UNIQUE string of numbers with php then pass that var to flash to include with the mysql row then since i already have that var since it was created on the html side, just along with the unload, have it delete the row that has that unique id?

If anyone things this idea would be the best approach, and if i used something like md5(uniqid(microtime()) . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']) to make a random iD how could i go about storing the result in a var i could place in the flash vars param then again in the jquery unload or javascript onbeforeunload if that would be better .

View 2 Replies

ActionScript 3.0 :: Passing A Simple Variable From Html?

Jan 23, 2010

I use an swf file to play short flv files on a web page. I write the embed/object tags into a dynamic web page using php and understand how to pass the relevent parameters to the swf file. As a complete flash scripting dummy, I don't know how to get the variable into the flash script or how to use it once it is there. At the moment I create a new swf file for each movie I want to display and write the file name into the script as below. how to get the file name into the script below using FlashVars or a query string in the html.

// Create a NetConnection object
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection

[code].....

View 3 Replies

IDE :: Load Swf By Passing Variable From HTML Page?

Sep 14, 2009

I have a main swf movie.....in which i want to load another swf by passing variable from html page

.
.
.
.
.
in flash 8 in as2

my code is that....

var topnavigation = _root.topnavigation; // Will load top navigation.swf
drop.loadMovie(topnavigation);

View 4 Replies

ActionScript 2.0 :: [FMX] Difficulty With Passing Variable From HTML To SWF

Mar 18, 2004

i've been trying - with absolutely no success - to pass a variable from an SWF on an index page to an SWF on the next page (in this case home.asp). i am using the following method: in the index page when a menu button is clicked i pass the value in the string

[Code]....

View 3 Replies

ActionScript 3.0 :: Passing Dynamic Variable From Html To Flash

Jun 6, 2011

I know this is pretty simple but all that I have read doesn't make much sense to me. I have one swf calling another swf that I have embedded into an htnl. In other words just calling another html page in a seperate window. In one.swf (runing in broswer) I use the below to call another html page passing the variable NewLessonArray. This contains an array of completed chapters.

[Code]...

All that is returned that I can see is object Object. But since I am passing on a address line into another swf embedded in a html page I am unable to determine that correct syntac for retrieving the information.

View 6 Replies

ActionScript 3.0 :: Passing Variable To A SWF On Separate HTML Pages?

Sep 3, 2009

i have a flash file created in AS3, let's call it file1.swf it contains a variable.. we will call this testVariable file1.swf is embedded inside file1.html file1.swf reaches a point where it needs to load a new swf file that we will call file2.swf file2.swf is done in AS2. file1.swf simply calls file2.swf by calling a new HTML file that embeds file2.swf

So file1.swf calls

var targetURL:URLRequest = new URLRequest("file2.html");
navigateToURL(targetURL, "_self");

I need file2.swf to have access to testVariable.

View 4 Replies

ActionScript 3.0 :: Passing Variable From Flash To HTML Form?

Oct 16, 2009

An AIR application that load an html page which contain some forms. I want to pass values from flash to html and then submit data. Don't suggest other possible variants, i have experience using URLLoader, amfphp, blazeds e.t.c. Idea it's to pass that from flash to html form, and then submit that information to server using html page. How can be do that? Or maybe in an web application (not desktop)?

View 2 Replies

ActionScript 2.0 :: Add Flashvars - Passing Variable / File Name In Html / Php

Oct 9, 2009

I m passing variable/ file name in html/ php like this

[Code]...

View 2 Replies

ActionScript 3.0 :: Passing Html Text When Php Send Variable To Flash

Dec 5, 2010

i'm having a problem when php send variable to flash for example ("notlogged") , it's being send like that :

[Code]....

i know i need to convert it to htmlText but i can't find a way to do that

View 3 Replies

ActionScript 2.0 :: Passing HTML Form And Hidden Variables From Flash To Html Page

Dec 3, 2003

I have a html/flash site now, [URL]. i access email from my site itself by giving the userid and pwd text box which i copied from the actual website hosting my email access. i copied the entire <form...></form> tag to my page and thus was able to put the name and pwd in my home page only and access the email in a separate window. now i have redesigned my webpage using only flash. i would like to know how i can implement the same using flash. as i have not much experience using action scripting i am a bit stuck about how you pass the hidden form variables. the below is the the exact form syntax:

[Code]...

View 1 Replies

IDE :: Load Panghat Spa.swf As A Variable By Pasing Variable From Html Page In To Flash

Sep 15, 2009

var loader:Loader = new Loader();
loader.load(new URLRequest("panghat spa.swf"));
addChild(loader);

want to load panghat spa.swf as a variable by pasing variable from html page in to flash

View 1 Replies

Javascript :: Dynamically Assign Variable From HTML To AS3 Variable

Sep 12, 2011

I have an HTML button that I need to dynamically assign to an AS3 variable when clicked (in order to load an .mp3). I am using externalInterface.call to collect javascript variables - I am just unsure how to change these dynamically when a button is clicked.

View 2 Replies

CS3 Passing A Variable Through A URL Into A SWF

Aug 22, 2009

I have a flash file that has an XML driven menuing system to select and play various FLVs. I want to be able to craft different URLs to open the swf and start playing different FLVs. (The others will be accessible from the menu once the sfw is opened, but I am looking to control what plays on opening, dependent on what link a user click.) Not really sure about the best way to get the selection into the swf.

View 4 Replies

ActionScript 3.0 :: Passing Parameters Through HTML

Aug 13, 2009

What is the best way to send HTML custom parameters to the flash player?Here are some parameters and values I would like to pass:

- autostart: true/false
- column: 1/2
- mini: true/false
- shuffle: true/false
- repeat: true/flase

View 1 Replies

Actionscript 2.0 :: Passing URL Parameters From HTML

Sep 23, 2009

after 3yrs doing this stuff, i feel like I'm still learning the basics of .as and .html and am wondering how I can pass a parameter to another server using Flash. ... Man, how do I explain this? ... An html guy set up his server to display my content- ie: He setup his server..

[Code]....

View 4 Replies

ActionScript 2.0 :: Passing Variables From 1 Html To Another?

Oct 30, 2005

I was just wondering what would be the "best" way to pass a variable that's in a swf to another swf located in another html.

something like index.swf embed in index.html and sends a value to a variable to index1.swf embed in index1.html.

What I'm trying to achieve is have a user select the language he wants, plays the rest of the swf and when it reaches the last frame it does something like

Code:
//this is the last frame of splash.swf
if (language == "fr") {
_root.container.loadMovie("about.swf"); //_root is on index.swf

[Code]....

so that works perfectly when splash.swf is loaded into index.swf but now I want the same result but having splash.swf and index.swf on different html

View 6 Replies

ActionScript 2.0 :: Passing FlashVars To Swf From Html?

Mar 16, 2007

So I'm building a Flash/HTML hybrid website that uses a Flash navigation. Within the index.html file there is an Iframe that loads the different pages of content. I used this method so the whole page didn't have to refresh only the content being loaded.

Well I have some buttons on the inner pages that will redirect to other inner pages. The problem with this is the Flash navigation is still stuck on the old page. The Flash nav says you're on the home page while the content being displayed is the about page. Get it?

I've looked into some articles on using FlashVars but it doesn't really apply to my site because of the Iframe.

View 1 Replies

IDE :: Passing (URL) Variables Between Two Swf (html) Files?

Mar 22, 2009

how do I passing variables between two swf (html) files For instance how can I request the variable "var_1" in the file blikvanger.swf (or blikvanger.html).Here is my code of one as file (contact.as):

Code:
...
homelink.addEventListener(TextEvent.LINK, linkHandler);
homelink.htmlText = "<a href="event:../blikvanger.html">THUIS</a><br>";
homelink.styleSheet = myCSS;

[code]....

View 5 Replies

ActionScript 2.0 :: Passing Variable To Url?

Aug 17, 2009

I have a site that uses an user id that needs to be passed from links with a flash banner. I have it working, but not the way I need it and could use a little assistance.

[Code]...

View 4 Replies

Flash :: Passing A Variable From PHP To A SWF?

Aug 26, 2011

I'm trying to pass the file name of an image upload PHP script into Flash's UILoader component. So when a user uploads their image, the file name of the file is passed to flash so that the image displays within the Flash UILoader application. Here's the PHP variable I'm trying to pass: $filename= ''; And here's where Flash's UILoader gets it's source (ActionScript 3.0): uiLoader.source = "freshly uploaded file.jpg ($filename)?";

View 1 Replies

ActionScript 2.0 :: Passing One Variable From Php To Swf?

Aug 13, 2009

i have the php file transfering the correct data but it is not registering as the variable in swfi have already tested the php file and do Know that it is working correctly
I have tested the swf file - no user works but the variable sent for balance is not setting

$select = "SELECT * FROM `auth` WHERE `username` = '$username'";
$result = mysql_query($select) or die(mysql_error());
//how many rows

[code].....

View 0 Replies

ActionScript 3.0 :: Passing Variable From One Swf To Another?

Dec 7, 2009

I am using SWFObject2 and passing in a flashvar to the movie it is loading (preloader.swf). I can retrieve the flashvar in preloader.swf no problem at all.The issue is that I am loading another swf from the preloader.swf (lets call it loaded.swf) and I want to get the variable from preloader.swf into loaded.swf - but for the life of me I just can't work out how to do it.If I try and access the variable from the preloader.swf via loaded.swf I just get compiler errors because the variable I want in preloader.swf doesn't exist in loaded.swf

View 0 Replies

ActionScript 2.0 :: Passing Variable From PHP To .swf?

Oct 19, 2011

I've got a question regarding passing a variable from PHP webpage to .swf file placed on that webpage.

Example:
Button on a webpage1.php is loading a frame.swf file.
Frame.swf is loading test.swf into itself using
ActionScript Code:
loadMovie("min est.swf", mc);

Button on second webpage2.php is again loading frame.swf file but this time I would like that frame.swf would load test2.swf into itself using ActionScript Code:

[Code]...

View 2 Replies

ActionScript 2.0 :: Passing Variable From One Fla To Another?

Nov 1, 2005

I have integrated a swf into another swf. (Actually it is a menu that I have incorporated in my 'main swf'.) When clicking a button in swf no.1 (the menu) I set:

_global.new_value="1" ;
_root.Application.newfunction();
-and then in swf no.2:

[Code].....

View 5 Replies

ActionScript 2.0 :: Passing A Variable From One Swf To Another?

Apr 5, 2006

I'm trying to pass a variable from my main swf to another one that's being loaded in a container in the main swf. What I usually do is create that variable in the main swf and have the loaded swf fetch it but in this instance I need the loaded swf to have it's own root.

Code:
container._lockroot = true;
container.loadMovie("main.swf");

[code].....

View 7 Replies

ActionScript 2.0 :: XML Variable Isn't Passing?

Sep 2, 2006

I am at a loss as to why I can't get the "linkto" variable to pass through past the firstImage() function. here is the code:

Code:
delay = 5000;
//-----------------------

[code].....

View 1 Replies

ActionScript 2.0 :: Passing Variable From MC To MC?

Oct 25, 2006

i have a "campus map MC" that is an attachedmovie clip linked from the library to a scrollpane on the main timeline. there is a "info balloon MC" in the "campus map" with a "close" button on the info balloon that hides the balloon.

the campus map has buttons over each bldg. on rollover/rollout the "info balloon MC" appears and disappears. if you click the button it 'stays' and the button is disabled so that the rollover/out stop.

button code:

Code:

on (rollOver) {
setProperty(this.bubble,_visible, 100); // info balloon MC nested in the campus map MC
setProperty(this.bubble,_x, 200);

[Code]....

View 1 Replies

ActionScript 2.0 :: Variable Not Passing?

Jun 29, 2007

I know this should be simple but I can't figure it out for the life of me.

Code:
for(i=0;i<xmlLength;i++){
mainMenu.createEmptyMovieClip(xml[i].attributes.n,mainMenu.getNextHighestDepth());

[code]....

View 3 Replies

IDE :: Passing A Variable Into An Swf Using The AddVariable?

Oct 5, 2009

i am passing a variable into an swf using the addVariable seen below

Code:
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("ticker.swf", "background", "293", "107", "8", "#000000");
so.addParam("menu", "false");

[Code]...

View 1 Replies







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