ActionScript 3.0 :: Sending Variables In Flash Back To HTML Page
Dec 16, 2009
I had posted this in the PHP section but think it may be more relevant in Flash as have'nt had any replies yet..I have been asked to create a photo canvas website that allows users to upload an image, then apply several effects such as re-sizing/cropping/desaturate, then viewing the updated image on a generic wall and going to check out to buy the canvas.I am pretty new to web developing/designing, i am confident with html,css and actionscript to an extent, but have only used small parts of php before.My biggest worry is how to go between html > php >flash >back to html again.From what i understand i need to create the following functions:
1. Create a general html website which will store the upload form and flash photo editor swf on, when the user first access's the site i start the php session...
2. The user then uploads there image to the server using a simple php upload form which will store the file and create a unique named file also on the server...
3. The flash editor swf will then load up on the html page. Inside the actionscript of the swf i will tell flash to continue with the php session by calling it again and call users image on the server with the 'file reference' command. The editing functions such as cropping, canvas size will all have variables to mark what the user has chosen and these varaibles will get ent back to the html page using php to keep track of them for the checkout process...
4. Once the editing has finished the user will click 'finish' in the swf taking them to the php shopping basket/checkout which will call the variables sent in flash to determine final cost depending on what effects chosen.
Is the above correct and more importantly is it possible? The main part i am struggling to get my head around is editing in flash (say changing the uploaded image to 20 x 26) and then saving this back to the server and sending the new settings back into the html/php page.Is this all possible without using database and tables such as MySql?
View 0 Replies
Similar Posts:
Jan 5, 2009
I am having trouble with what would seem to be a simple thing...I need to pass a variable generated by the user from a swf/html page to another swf/html page. I am encoding the variable in the URL....?bagVar=How do I get whatever the content of this variable is imported to the other swf/html page? None of the documentation I've found seems to answer this (maybe I am looking in the wrong places).
View 1 Replies
Mar 31, 2011
So I am successfully able to send variabls from Flash to PHP, but I am still unable to figure out how to send the USER to the php page along with their variables. The reason I want to do this is because the PHP script in question spits out a bunch of text to the user based off the variables sent to it from flash.
Right now, when the user clicks the submit button in flash it sends the variables to flash ok, but to the user, they just continue to sit idly on the flash page, even though it no longer serves a purpose.
how can I get flash to send the user AND their data to the php script when they click the submit button?
Here's what I'm using now (inside flash):
//variables used to send data to server for processing
var scriptRequest2:URLRequest = new URLRequest("qm-results.php");
var scriptLoader2:URLLoader = new URLLoader();
var scriptVars2:URLVariables = new URLVariables();
[Code].....
View 1 Replies
Mar 13, 2006
I have a project where I need to keep track of where the user is at a certain point of a flash training orientation.
Flash application needs to accept a parameter which contains a unique ID for the user running the flash application. This ID needs to be stored throughout the session of the flash application, from page to page. Once a user travels from page-X to page-X in the Flash, the next button needs to call an aspx page in order to send that ID and the page position so the aspx can write to an XML file this information. If the user does not finish the flash, once they return, the aspx needs to read the correct XML file and send 2 parameters to the flash application. These 2 parameters will be the user's ID and the page the user was on the flash can load the correct page. Instead of passing 2 parameters so the flash can dynamically load the correct section, the aspx can call the correct flash file (i.e. flash_file2.swf) but still pass the user's ID as a parameter.
View 1 Replies
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
Feb 25, 2010
when you go to the home.html page an animation will play from start and then stop at the end of it. However, for all other pages i.e contact.html aboutus.html we need the animation to skip to the end straight away and not to play the whole animation through. I was thinking this would be controlled by a variable or some kind of external text file ect. Basically in the first frame the actionscript needs to basically say
"if this html page is aboutus.html then go to the last frame and stop" and with the index page it would say "if this html page is index.html then keep playing"
View 2 Replies
Feb 7, 2007
I have a header with tab buttons--- When you are on a certain page the coorisponding tab is a different color(as a locator). Right now I have like, 7 or 8 different headers that are the same thing minus the colored tab of the current page.Is there a way to code the flash so that I only need one header, but still keep the off-colored buttons when on the coorisponding page?Apparently, from what I have gathered I need to Send a variable to the SWF from the embedding HTML using FlashVars or SWFObjects' 'addVariable' method etc so the SWF knows which tab/color to use.But, I have no ideal where to start...u
View 4 Replies
Jun 22, 2003
Im trying to send variables from my HTML page to flash, in order to control the location of movie clips. This is what I have.
HTML PAGE
PHP Code:
<param name="movie" value="navi.swf?sectionheader=charts">
*I have also added the "?sectionheader=charts" to the EMBED line.
SWF/FLA
sectionheader._x = 10;
sectionheader._y = 290;
*This is set on the first frame.
The theory is that flash will read the variable and come up with something like:
charts._x = 10;
charts._y = 290;
..................but, ofcourse it doesnt!!!
I have been able to set text of textfields and event traget frame Labels in similar ways, but this will not work..
View 2 Replies
Jan 31, 2011
I have a cs3 project that works fine that saves an image out and sends back to a html page.We updated the project to cs5 and now it does not redirect back to the right URL. Only differences are in the below script. I been lookingat this for days without getting any where so would like some fresh eyes to have a look to see if there is glaring issues with the code.[code]
View 1 Replies
Mar 1, 2012
I got a dwg file converted into swf file. Now I want this swf file to embed in html page. No issue with that. The tricky part for me is to let the user select the entites of the file such as line/circle as one might select in autocad. After entity selection the swf file (by any means) pass the selected entity information back to the html page ( to the javascript function).
View 5 Replies
Feb 27, 2010
i want to know how we can make back button in flash to go back to page same like browser back button.
View 1 Replies
Oct 12, 2005
How to load variables from html page in swf? I need load some variables in swf from html page.
View 5 Replies
Mar 31, 2005
the button is set to: getURL("javascript:openNewWindow(movie,'thewin','h eight=400,width=400,toolbar=no,scrollbars=yes') ");Movie being the name of the variable set up earlier in the project to randomly choose my swf movie that I want to play. Then of course I have the function set up in the HTML page to listen for the variables for the URL, name and windowsettings. I can get the whole thing to work with an HTML page in the URL,
View 3 Replies
Feb 11, 2009
Is there any way to send data back to flash after using a FileReference upload? Basically I'm uploading an image and I want my PHP script to return some information back to flash after the upload.
View 2 Replies
Sep 15, 2009
So I'm wanting to create a DocumentClass that is willing to accept a variable for a path to an XML file, passed in from the HTML, like thisindex.HTML page would have this: mySWF.swf?xmlPath=xml/xmlFileName.xmlIn the FLA (SWF) I would have only a DocumentClass load a .AS file.In the .AS File I need to accept or read the paramater being passed in from the HTML page.
View 4 Replies
Sep 24, 2009
sent form data in Flash to a PHP script before and then read in a variable (say a user id) that gets passed back by the PHP. simple enough.but if the script passes back XML, how do i read that in?elow is the code i've used to send PHP a name and an email address and get back a userid, but i'm not sure how to go about writing the code if the script is passing flash a chunk of XML instead?
ActionScript Code:
var userRequest:URLRequest = new URLRequest("saveUser.php");
var userLoader:URLLoader = new URLLoader();
[code].......
View 1 Replies
Oct 13, 2008
I am currently working on an online connect four game where the state of the game needs to be updated after ever move. i've had no problems sending variables from a php script to flash but i'm having difficultly sending variables from flash to php when trying to update a database. i am getting this error message:
The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
To try an understand the process and figure out what i am doing wrong i've stripped down both my actionscript and php files to the bare minimum but still it wont seem to work. here is my actionscript:
Code:
var game_id:String = "1";
var postURL:String = "updateMoveScript.php";
var variables:URLVariables = new URLVariables();
[Code]....
i know the php query is fine as i've tested it by changing the $game_id variable to the value i want to send.
i've tried changing urldataformat from variables to text and also messed about with changing post and get and about every different possible combinations of doing this but with no joy.
View 2 Replies
Nov 6, 2010
I want to send variables from my Flash (AS2) movie to a PHP file that would then process the variables and echo them, but echo in an HTML page. Basically, I want to make my Flash movie form the equivalent of an HTML form, in that, when it's submitted, it sends the variables by POST and opens the PHP page for the PHP page to process and deal with, instead of sending the variables and loading the response from PHP into Flash.
I've been unable to use loadVariables in the usual way that I do it.
Actionscript Code:
form.loadVariables("myPHPfile.php", "POST);
Because that sends the variables to the PHP file, but then does not open the PHP file in the browser. Is there anyway that I can make this work? How can I make the variables send from Flash and then open the PHP page in a new browser window, just like an HTML form would?
View 2 Replies
Oct 2, 2011
So this is probably a simple question, but for some reason, I'm having problems with it. I have no ideia why, but I suspect the fact that sending a xml with full "< something >" tags may cause the php to behave wrongly.So all I need is to send (from a swf as3 client) a filename and a xml. The php will write a xml file with the required filename.
Everything should be okay with the php side, because I tried it using " $_GET " variables, but whenever I try using the flash client, It just doesent work, and the php log says that "the filename variable can't be empty". Whenever I try some static filename (not using GET or POST), it works.
EDIT: Code added.
var xmlURLReq:URLRequest = new URLRequest("www.url.com");
var test:URLVariables = new URLVariables;
test.filename = "01.xml";[code]............
View 1 Replies
Jul 20, 2009
I'm looking to figure out a simple way to send variables to a flash page.
Basically [URL]
Not sure exactly how it works in flash and out of flash. I searched but couldnt really find anything that worked..
Edit: I found this post
[URL]
But I'm not really sure where to put it and how to execute it. Do I just put the variables in the URL and then put that AS into my code?
View 4 Replies
Nov 30, 2011
this is my php code
[Code].....
as you can see i want to send variable"t$i" from php to flash but my this code is not working for me.its like i am sending a variable from php to flash which name is a variable. i dont want to use a.text=myData.t0 simply
View 3 Replies
May 10, 2003
I'll try to explain this as best as I can.I have about 30 .jpg files, 1 .swf file and 1 .php file.I want the PHP to load multiple copies of the SWF and have each copy load a diffrent JPG.
View 14 Replies
Mar 25, 2009
I want to send some variables to flash, just changing some the URL of the page. Tried adding ?value=2 on the url and receive that on flash, but it�s not working.
View 2 Replies
Oct 21, 2010
I have a Flash website with 3 interfaces( 3 frames with movie clips inside). they have a button that goes to different loaded .html page(text). But once the back button is pushed on the web browser, it always goes back to the first frame instead of the actual last page, which might have been frame 2 or 3.
View 1 Replies
Mar 31, 2011
So I am successfully able to send variabls from Flash to PHP, but I am still unable to figure out how to send the USER to the php page along with their variables. The reason I want to do this is because the PHP script in question spits out a bunch of text to the user based off the variables sent to it from flash.
Right now, when the user clicks the submit button in flash it sends the variables to flash ok, but to the user, they just continue to sit idly on the flash page, even though it no longer serves a purpose. So I guess my question is, how can I get flash to send the user AND their data to the php script when they click the submit button?
[Code]...
View 2 Replies
Mar 27, 2012
I am using Asp.net/C# in my application , I am using a .swf file which is placed on my Default.aspx page to capture images from webcam, I have a requirement that the captured image should be sent to server or aspx page without storing it on the clients machine,
View 1 Replies
Oct 8, 2009
how to send variables from one swf to anotherAssuming they are on different domains,
View 2 Replies
Jan 28, 2008
I have a problem while sending variables from flash to PHPHere is the code:
submit.onPress = function ()
{
c = new LoadVars ();
[code].....
View 4 Replies
Jul 17, 2009
I am trying to send variables from my Flash App to an ASPX page which receives the variables and outputs them on the screen. But he aspx script is not able to receive the variables. I am putting the variable into an object and sending that object using POST method through the URLVaiable class.
View 1 Replies
Aug 19, 2009
I've been having issues sending a list of ids to a php script from my swf file. What's interesting is when I test it locally it connects to bodysave.php and updates the output script with the current ids. However, when I upload the file, and run the swf file from the server - it updates the output file with 0's. Since the output script is getting those 0's, I know all of the paths are correct. But I can't figure out why the correct ids aren't being set.
[Code]...
View 9 Replies