ActionScript 2.0 :: Getting A Variable From A Php Page?
Nov 7, 2005
I have created a video player interface which loads external flv's. Now I'd like to integrate this into a live site, a site that I have not built myself.
There will be a list of clips on the page, the list is taken from a mySql database and displayed with info, a thumbnail and a link. When you click the link, a popup window is supposed to be launched and in it the video clip will be played inside my player.
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..
i'm trying to build a flash site and ran into a problem... i have a gallery page with a bunch of page numbers at the top. when you click on one, a movieclip loads of some images coming in.so the problem i'm having is that i made a little animation for when you roll the mouse over the page number (they scale up when the mouse is over, scale back when the cursor moves away)... what it's doing is when you roll over, it goes to a certain frame in the timeline and plays that animation.that's all working cool, but i need it to not do that once it's clicked on. so basically when you actually click on a page number, the over script should stop until you go to another page... here's the code i've written,
function over(event:MouseEvent):void { this.gotoAndPlay(30);} function out(event:MouseEvent):void {[code].....
I've got a flash course that needs to pass the current screen number from the course to the mySQL database. The person who built the back-end built a php page that I can pass the number to and it will get written to the db but I'm not sure how to "send" that in the background.He told me that I just need to call the index.php page like: [URL]So, would I use URLRequest for something like that?
Code: var vars:URLVariables = new URLVariables(); vars.theData = data; var req:URLRequest = new URLRequest("www.url.com/index.php/user/bookmark/"+slideNum);
I am trying to call an aspx page, have it hit the database, and return a string of text to my actionscript.
Here is my actionscript code:
It crashed on the line 'gameText = urlLoader.data.theText;' with the error of 'Error #1010: A term is undefined and has no properties.' so i guess urlLoader.data.theText is coming back null.
Here is my .aspx page code:
When I run the .aspx page separately, it returns what I want it to: '&theText=This is my test text'. I think I may be missing the big picture here somewhere.
I went to pass a variable to an ASP page, the ASP will filter a recordset based on that value. I want the results of that filter to be passed back to my Flash page. I am, of course, using LoadVars() in the following way:
Code: getserver="[URL]"; formdata = new loadVars(); formdata.SRV_NM=GA016DBB;//this is the variable I want to pass to my asp page for filtering replydata= new LoadVars(); //this next section may be my problem if(replydata.onload){ trace("yes!"); formdata.sendAndLoad(getserver, replydata, "POST"); } else { trace("no"); }}
i'm trying to use an array to match up with a variable from an .asp page.. that is, i want to load a particular .swf file based on that returned variable.I'm not sure that loadMovie even supports this kind of tomfoolery... anybody out there who be's smarter than me know?
Code: var swfs2Load=new Array("sin.swf","flirt.swf","entertainment.swf","dizzyfunk.swf","aura.swf","privilege.swf","envy.swf"); function dayTest(){ _root.maincontent_mc.loadMovie(swfs2Load[getData.day]) } getData = new LoadVars(); getData.load("whatday.asp", getData, "GET");
here's another one about passing data to an asp page. I'm trying to pass a variable through a string to an asp page. I cannot understand why this is not working. Here is my code:
this.btn1.onRelease = function (){loadVariables("http://www.mywebsite.com/paragonstats/flashprogress.asp?pagename=introduction","POST"); }
If I paste my url in a browser, it triggers the asp page as it should. But this code is not working from flash. If I use getURL, it works, but it opens another browser window or redirects my movie. I'm just trying to track click through statistics. I've even set up a movie with just one button on the root with this code and it won't work.
I am trying to set up a form in a flash movie that will post the users entry to a php page. I then need the php page to re-direct the user to a page to show a result.
I have the following AS in the flash form. It seems to post to the php page but from within the flash movie. Rather than taking them to the php page, as a non-flash form post would.
on (release) { loadVariablesNum("search.php", 0, "POST"); }
Is there a way I can get the flash form to post to the php page in the same way a non-flash form would post.
Hope this makes sense! Basically, when the user clicks the submit button, I need the browser to load another php page that gets the user's input via post.
[Flash MX 2004] Anyone noe how to send a variable value from flash to a php page? I have a score's value which I need to send it to the php page n update into the database.
i'm trying to use an array to match up with a variable from an .asp page.. that is, i want to load a particular .swf file based on that returned variable.I'm not sure that loadMovie even supports this kind of tomfoolery...
Code: var swfs2Load=new Array("sin.swf","flirt.swf","entertainment.swf","dizzyfunk.swf","aura.swf","privilege.swf","envy.swf"); function dayTest(){ _root.maincontent_mc.loadMovie(swfs2Load[getData.day])[code].....
I have a sliding, drop down menu sidebar thingy. The user clicks a button and my slick little eye candy flash movie has a secondary navigation list slide down while any buttons underneath slide down as well. Then when you click on another button it slides back up and the new button's secondary nav slides down. nuff said.what I would like to have happen is that when a user clicks on a secondary nav button and a new html page loads, I would like it to appear that the secondary nav slider has stayed down on the newly loaded html page.this means passing some kind of variable to my flash movie so that it can tell which page the user is on and react (go to a particular frame)
I am trying to pass a variable from my .aspx page into my published swf file. I am using the code below, and using swfobject to try to pass my variable. (I am very comfortable with swfobject and would prefer, if possible, to avoid using FlashVars.) The variable myVar represents the name of an image file, and will be a different image for each user on my site. I am using Flash CS4, and AS3. I only mention that because I was able to do this in CS3 using AS3, yet certain things have been deprecated in CS4 - hence my code does not work. And for what I'm doing and how I'm doing it I cannot use CS3 to create my swf file. Anyway, here is the code:
I am trying to build a page transition in Flash. The way I have it set up right now is as follows: 1) I have a movieClip with the transition animation.
2) I have two buttons, both MovieClips. And the actions layer of my timeline is scripted as follows: Code: stop(); mybutton1.onRelease=function(){ navVar="firstpage" _root.transitionClip.play(); } mybutton2.onRelease=function(){ navVar="secondpage" _root.transitionClip.play(); }
3) The last from of my Transiition movieClip I have this code: Code: stop() if(navVar=="firstpage"){ _root.gotoAndPlay(navVar); }else if(navVar=="secondpage"){ _root.gotoAndPlay(navVar); }
When I click on the buttons, they are loading the transitionClip movieClip. But they are not moving to the correct framelabel after they hit the last frame of that movieClip.
I know how to pass vars from php to flash and from flash to a "new" php page but here is my question.
I have a php page (page1.php) with some HTML and a php variable called $number. page1.php also has an embedded test.swf movie. While working with the test.swf movie, I want to send data back to the $number var on the page1.php without reloading the page1.php because then it would reload the test.swf movie.
I have been able to use javascript to change background colors on page1.php from within the test.swf movie but cannot figure out how to set a php variable from within the test.swf movie.
I know of flashvars, but how would one send a variable into a swf and then for instance change the variables value and then pass it into the swf again?
Like the title say's, is it possible to send data to my flash movie after it has been loaded? More specific: I have a flash-movie with an image in it, and from the outside I would like to be able to alter it by sending fe. '?color=FF00FF' to the movie
[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"); }
Is it possible that I go to an html page , (which contains a flash movie) and let the movie start playing in a certain behaviour according to a parameter passed in the URL?
I have a variable called AICC_Student_ID, which is talking to an LMS to pull in a student's unique ID (usually the same as their NTID). I need to take that JS variable value, and slap it into a String for treatment.I looked at the work it would take to use SWFObject, and since this little swf is going onto literally thousands of pages, manually hacking each and every one is just not worth it.
I have a master page and a child page and have placed the javascript code inside the child page for flash movie.
The problem is the movie seems working when there is a alert on, without at least one alert msg, the code does not work, I am sure you people can solve, I can see that the following code works well in both Mozilla and IE, but only if the alert is ON, if I put it off, then the code does not work. Can anybody tell me what is the workaround :
var fo = new FlashObject( "Movie1_controller.swf", "Movie1_controller.swf", "591", "480", "7", "#FFFFFF", false, "best" ); --------------------------
Is there a way to modify that call (maybe using ASP Javascript) so you can call different movies calling the same page with different parameters?. I haven't been able to get this working. It seems to be that the "FlashObject" call cannot have any variables on it.This is the way I'm trying it:
1. The call to the page would be: http:[url]....
2. Add javascript to get value passed:[code]....
It just doesn't work. The FlashObject.js doesn't seem to like that call.
I need to pass a variable from flash to a javascript on the same page. The javascript is called "ShowAjaxResult". How do i do this from flash. The variable comes from a textfield...
When i zoom into the page then move around the edge of the page can be moved past the edge of the browser window showing the static page which appears at the start of the document. Is it possible to use actionscript to stop the page being dragged past a certain point so the static page is not seen? On the example below the static page is white so it does not pose too much of a problem however im using the static page as a sort of instruction page and it looks a bit rubbish if the user drags a page past the edge of the view window and see's the original page. Example below. [URL]
I have an swf loaded in a browswer (fire fox) and i use log on console using [code]I have initialized my swf in the document class on the Event.Added to stage.and i have a clean up function performing all the clean up/exit process in the code on the event [code]Now Doubt that this is being called/ activated/trigered as i am not able to log the start and end of the function to the console.The console log is of firebug.What exactly am i missing here? I would like to call the cleanup function on reload of page or relode of swf or change of page.How do i trigger and log it properly