Actionscript 3 :: Sending Vars From A Classic ASP Page To Flash?
Feb 23, 2011
I am having a bit of trouble retrieving variables from an ASP page. It returns the entire page whereas I just need the variable strAnswer from the page.
Here is my code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onDataSaved);
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
I am having a bit of trouble retrieving variables from an ASP page. It returns the entire page whereas I just need the variable strAnswer from the page.Here is my code:
PHP Code: var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, onDataSaved);
having an unusual problem sending vars to php. it is sending the var but my flash game is being unloaded off the site once the var is sent. if there is another way to send VARS please let me know, OR maybe my code is wrong.
Code:
function sender() { varsToSend = new LoadVars(); varsToSend.var1 = beatTimer;
I have an AIR app that is uploading a txt file to a server, and I have a progress bar set up in AIR for the user.
The php file that handles the upload then opens the txt file, parses and sanitizes the contents, and inserts them into mysql.
I was wondering if there is any way to have php tell Flash what's going on at each stage of the operation?
At the moment, my progress bar gets up to 100% once the txt file stops uploading, but then hangs around until php has finished the backend stuff. This is fine - I like that the progress bar movieclip stays there until the mysql insert is complete, but I was wondering if it would be possible to reset the progress back and have it move as the php continues through the parsing and mysql insert, or send back a series of text vars saying 'Parsing text file' then 'updating database'?
I understand that you can only echo back to Flash once, and I've also come across that Flash bug that doesn't accept variables back when you are uploading a file as opposed to just uploading variables.
I have developed a facebook application in which I am sending data from Flash to Php.Its actually a game based on Flash 8 and at the end I send data by using
loadVarsNum()
using POST method to flash but the problem is this data can be easily tampered so I want know that how can I secure my data from theft or any hack.
<? include("dbconnect.php"); /// connects to database //// get data $SQLstr = "SELECT * FROM programtexter WHERE subject='$select'";
[Code].....
flash reads in the 1st variable _root.pg1text1 and writes it out on the page ok but how do i make it know when theres a new variable. because it also puts the second part in the 1st variable. it does not break up the variables it just puts all the text into _root.pg1text1
how do i break it up so that each text string is put into the right text string? doing <br> and haviung spaces between dident work
I am using the follwing actionscript to send 2 vars to a php file:
Code: getURL ("file.php?name1=" + name1+ "&name2=" +name2, "_self", "POST"); .but when i test it local. I see the following: "file.php?name1=david&name2=posh?M%5FloveMatch=%5B type+Function%5D&calculateScore=%5Btype+Function%5 D&your%5Fname%5Fstatic=dfjkawef&your%5Floveone%5Fs tatic=oiaSDV&score=78&scoretext=78%25&name1=david& name2=posh"
I'm trying to send variables to a php-file. It works ok with some of the vars but not for continent (see code below). I have all tried the "" around the value - still no go. The clip is loaded from a mouseover function. I have tried to make a trace of the variables, but that doesn't work either.
I have a site the runs in flash. IE7 will not reload the vars in flash, the vars set by flash in the swf. when the page is reloaded. The thing that bugs me out is refreshing the page actually refreshed the page. The flash started how it was supposed to except the variables in flash didn't reset.This only happens when the "Temporary Internet Files" settings in IE is set to "automatic". But works how it should when "Everytime I visit The Page" is checked.
On my html page I have two frames, one for navigation and the other for content. The navigation menu is an swf. Most of the content is html, except for the 'gallery' page.
The thumbnails for the gallery appear within the navigation. I can get the pictures to load from the thumbnails into the 'content' frame using LoadVars sendAndLoad.
However, doing this means that the flash gallery refreshes itself each time a thumbnail is clicked (thereby losing the transition effect).
So, how do I load the images in the other frame without reloading the flash??
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?
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,
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).
I'm trying to login to a password protected php page through a form in flash.When the user provides correct information the flashmovie opens a php-page, but how do I protect the php page from unautorized accesses?Can I send a variable containing the user/pass given?but then everyone who checks history can access the page without even having to access the flash page..
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();
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.
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?
I've followed the contact form tutorial and believe I've updated the php to php5. The email sends but I never get a success or failed page. It just stays there. I'm being hosted by Go Daddy and I am on a Linux server.
I've followed the contact form tutorial and believe I've updated the php to php5. The email sends but I never get a success or failed page. It just stays there. I'm being hosted by Go Daddy and I am on a Linux server.
[URL]. I am trying to make the code into a function so that I can place it in a frame instead of attaching it to a mc.
onClipEvent(data){ this.sendSent.text = "MESSAGE WAS SENT"; this.textEmail.text = "EMAIL"; this.textSubject.text = "SUBJECT"; this.textName.text = "NAME"; this.textMessage.text = "MESSAGE"; } on (release) { // send variables in form movieclip (the textfields) // to email PHP page which will send the mail this._parent.form.loadVariables("email.php", "POST"); }
How to retrieve xml data in an aspx page after sending it using URLLoader.load
This is the flash code i am using:
var urlLoader:URLLoader = new URLLoader(); urlLoader.dataFormat = URLLoaderDataFormat.TEXT; //tried by giving VARIABLES also urlLoader.addEventListener(Event.COMPLETE, handleComplete); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
[Code]....
I were able to accept data in above statement when i send a string in var1 say "test". But on sending xml above error is getting.I have tried to load the xml data in XMLDocument also.
In AS20 i used sendAndLoad method to send and reterive xml data.
I got Flash CS5 a few days ago and tried to compile some of my applications - got strange textfield representation, parts of words were missing. Very simple example to demonstrate something's not working right here:
-C-reate a textfield (classic; static) type "Test". Choose Arial Regular as Font.
-Create an input textfield (classic), choose Arial Bold as Font, embed the font with all glyphs (or subgroup).
-Compile it: Try to type into the input textfield - no cursor (for me at least), nothing shows up.
If you embed the Arial Regular also (which should not be necessary for a static text), the input field does respond but shows Arial Regular instead of Bold.So it seems you cannot use two weights of the same font in one Flash movie?Using TLF it works fine - but I can't switch over yet, some of my customers do still use Player 9.
Is it possible in Flash CS5 to import text from a PSD as Classic Text. Since TLF Text doesn't support older postscript fonts, I'd like to be able to import as classic text instead of doing a find and replace and hope for the best.
I'm new for AS3. I have some question about the classic tween vs AS3 Tweening.
I tried to compare the swf file size of both.
the first one i make an animation with the classic Tween.
the second one i make an animation with AS3 Tweening.
before, i thought the script tweening one will much smaller than the classic tween one, but after i compare both, the AS3 Tweening one has bigger file size.
So my question is, 1.will the file size bigger if i use action script to move the object?
2.then what's the advantage to tween the object using AS3 for a flash website?
3.how can I compress the filesize(i'm trying to build a full flash site)?
It seems like even if you set an Image object's smooth property to false, it doesn't make the Bitmap look jaggy on non-90-degree angles (jaggy = aliased, opposite of a smooth edges = anti-aliased).Is there any way to achieve this? Or do I have to construct the rotation-spritesheet by hand and interpret the "angles to sprite index" calculations myself?