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 .
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.
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)?
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?
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
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
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 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:
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)?";
I have a Flash movie (shell.swf) that loads in an external movie ("home.swf"). Within home.swf, one of two different swfs can load and I'd like to use a query string to determine which one loads.
this is probably quite a newbie problem but its driving me insane!I'm simply trying to make a flash file with a button that automatically copies text to the clipboard...
ActionScript Code: //imports the necessary as events import flash.events.Event
I have a flash banner and embedded the flash swf the usual way. The flash banner has an xml file that loads in images.when published it views and works fine. But when I incorporate into my site it doesnt load the xml file. I believe it is because on the site i have friendly URLS. so when you are on the home page it looks for the file in home/images.xml.when you are in about page, it looks for the file at about/images.xml.I believe that i have to pass a param giving the absolute path to the flash file so that it loads.
these are basically input fields, but for some reason they are passing all the html tag assigned to the flash textfields. (used to style the flash components) is there a quick way to kill that with either php or flash??
Then i must get values from "item1" and get them into a variable and sent it to flash. i probably will be using an array to store the values of "item1" but what can i use to create multiple param with the same name and have multiple values?
I don't really want to have any arrays like item1 = x,y,z because x,y and z are going to be html encoded, and the code of line would become enormusly confusing to read and edit.
I have a flash map I have created years ago and I've recently done an update to the file and published it. Everything works perfectly locally and online except for when I pass variables into the movie online none of the variables are recognised. Locally the file works fine and the dummy variables are passed in. But even online the dummy fall back variables don't work.There are two files the main map movie and the preloader. The preloader determines the variables that are passed into the main movie from the html embed code.HTML EMBED CODE
I am writing the codes that can pass the value from the table of database when I click on a button. When I click on the button in the first time, I send the the number of click: clickNum = 1 to the php file and I want to select the first row from the table. When I click on the button in the second time, I send the clickNum = 2 to the php file and I want to select the second row from the table, and so on. I can successfully send the clickNum in that numerical order. However, I can't pass the corresponding row of result back to the flash. For example, when I send clickNum = 1, it pass the value of the second row of table back to flash, but not the first row. And the row that it pass back to flash is different everytime, seems it is random and I can't find a pattern. The second question is that I still can't read the chinese character from the table of database even I have included the header("Content-Type:text/html; charset=utf-8"); in the php file.[code]
I am trying to pass a variable in Flash(MX2004) but struggling with it [code]where 'main' is a movie clip which conatins a variable called 'texts' to show the text entered in the html.
I have been reading all the post on this topic, but i just do not seem to get it! I am trying to send the variable "folder" to a flash file and get the flash file to recognize it. i am using the loadVariables() command to get the variable, but i am not sure how to process it to where i can use the variable later in the actionscript. can someone post an example script to show how to process a variable sent from php to flash?
The above carries through the affiliate ID together with Site Language which user has come to. The above works fine, what I need to now do is have my flash button call the same function...
I am trying to place a SWF on a page and pass a variable to it. The variable would depend on which link that the user clicked on. I am toggling the visibility of the div containing the SWF (code at the bottom). What I need to do is, when I toggle the div 'on' I need to pass a variable to the SWF so that it knows which file to load. Would I use SWFObject for this?Here is the HTML code on the page.