ActionScript 3.0 :: URLVariables / URLLoad Returning Entire Page?

May 29, 2009

I am trying to transistion myself from AS 2.0 to AS 3.0. Everything is going really well except I am so confused about URLLoad & URLVariables.I've been trying to load external data via ASP and it does send back the variable I want, but that variable also has all the HTML of the page too.If someone can tell me what I'm doing wrong that would be great. If they can explain what's going on too, that would be a bonus Here's my code:

public class TestURL  {
var MyRequest:URLRequest; var MyLoader:URLLoader ;
public function TestURL() {  MyRequest = new

[code].....

View 9 Replies


Similar Posts:


ActionScript 3.0 :: A Page Loading In Other .swfs (need To Unload Entire Page)

Nov 3, 2011

I have an invisible movie clip I want to go to the NEXT page, as it goes to that page, I want it to essentially remove itself (page1.swf). e.g. page1.swf (contains fancy.swf - [AS2], 4 images, several invisible MCs with code) has an invisible MC + on click = remove page1.swf.

To be clear, this does work. It goes to page2.swf and page2.swf goes to page1.swf as it should. The issue is that if the user repeatedly does this (just 2 or 3 times) the fancy.swf becomes impossible to control and Flash (CS5) crashes. I think this is due to the fact it's not unloading the entire thing, it's only unloading fancy.swf on click (I hope). So underneath page2.swf is page1.swf, and when the user clicks back to page1.swf, page2.swf AND page1.swf are underneath that, and so on and so forth.

[Code]...

View 9 Replies

ActionScript 2.0 :: SWF Hangs In I.E. When Returning To Page

Jul 31, 2009

A SWF (published as AS2 for player version 9) sits on a page called home.aspx with other textual content. The SWF is a wrapper that loads in various other SWFs based on flash cookie data. Here is the problem: In I.E. (and not Firefox), sometimes the wrapper SWF hangs and fails to load the external SWFs.

The only time this happens is when returning back to this home page via another link that ends in a hash mark (home.aspx#) or to (default.aspx) which is supposed to act the same as home.aspx Also, this doesn't happen every time. Only sometimes. Anyone have any clues? I'd love to provide a link but this is on a beta server at the moment and I don't think I'm allowed to.

View 1 Replies

ActionScript 3.0 :: Refresh A Frame Or Entire Page?

Sep 3, 2009

How do i refresh a frame or entire page by using actionscript 3 ?

View 1 Replies

Flash 10 :: Transparent Swf Over Entire Html Page?

Oct 2, 2010

I wanted to know if it was possible to have a transparent swf sit over the whole of a html page? Basically I want to have a standard html page and create say an insect crawling over it, is this possible? I know about swfObject but I can't seem to figure out how to make the swf full screen AND to still see the html?

View 1 Replies

Actionscript 3 :: URLload Local Files With Absoute Path?

Oct 1, 2011

I am trying to open local hard drive files inside AS3. I'm getting a security error with this code:

var soundFile:URLRequest = new URLRequest("c:slushy.mp3");

Is it possible to URLload an absolute path on the hard drive?

Edit: so this appears to be a sandboxing issue. Drat. Is it possible to load the local file via PHP and send to flash?

View 1 Replies

Professional :: Sound Duplicates On Top Of Itself When Returning To Home Page?

Apr 27, 2011

i have a question about loading an mp3 in flash. the mp3 is loading & playing fine, but if i click a button to go to a new frame, and then click another button to return to the home page, a new copy of the same audio clip is loaded over the one that is already playing, thus causing two audio files to play at the same time. it will keep loading a new copy of the audio clip every single time i return to the home page. how do i go about correcting this? the following is the code i am using:

[Code]...

View 7 Replies

ActionScript 2.0 :: Gallery Section And Template Resizes Entire Page

Feb 18, 2011

I am working on a site and I'm using template for the gallery. It's being loaded with a loader component and an external swf file...

Everything is fine on the flash movie until I actually get to the gallery section and the template resizes the entire page!

View 2 Replies

ActionScript 3.0 :: Flash Not Loading On Webpage After Navigating To Diff Page Then Returning?

Jun 11, 2009

I seem to have an issue with a flash I have written. The person who I made it for is telling me that first time he loads the page with the Flash in it, it loads fine. However, at this point if he navigates to another portion of the site, then goes back to the Flash page, he says it freezes on the loading bar. Consistently everytime, but only on his work computer, not home computer or lap-top. I think it might be a caching issue in IE, but I am kind of stumped, anyone ever experience this?

View 9 Replies

Php :: Calling A Page With MySQL Query From Javascript Function Then Returning Results To Another Javascript Function

Jul 8, 2010

I am refactoring some code. I have a PHP page that contains a MySQL query and stores the result in a PHP variable $my_result. This result is then echoed to a Flash SWF during embedding with SWFObject. I now want to call this PHP page that makes the query from a javascript function like so - one change I have made to the PHP is that instead of storing the result in a variable $my_result I am echoing the result. Javascript function to call the PHP page and make the database query

[Code]....

View 2 Replies

ActionScript 2.0 :: Print Entire Page But When Text File Is Scrollable It Doesn't Print Whole Text?

Jul 14, 2005

how do I go about printing entire, scrollable text area in flash movie, I know how to print entire page but when text file is scrollable it doesn't print whole text.

View 8 Replies

ActionScript 3.0 :: Gallery Page With A Bunch Of Page Numbers - Click On A Page Number, The Over Script Should Stop Until Go To Another Page?

Jan 26, 2009

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].....

View 0 Replies

ActionScript 3.0 :: Using URLVariables?

Mar 24, 2009

This is my code to send a multi-dimentional array to a PHP script:

Code:
var sendData:URLVariables = new URLVariables();
var sendRequest:URLRequest = new URLRequest();

[code]....

View 3 Replies

ActionScript 3.0 :: Get The URLvariables From The Addressbar

Sep 28, 2011

I like to get the URLvariables from the addressbar. For ex: [URL] i need to get aID and bID values into flash.

View 1 Replies

ActionScript 3.0 :: Flash - URLVariables From PHP?

Apr 6, 2011

I was actually watching a tutorial about how to make a highscore table. The problem is it was done in AS2 and I'm using AS3. I've been searching tutorials for 2 days and so far I've converted what I could. In the AS2 tutorial he uses loadVariables which works for him and I've successfully used URLVariables to pull in my php variables in AS3. But, when he pulls in his variables for instance name1="happy",score1="100", he uses the set command and these variables can automatically be referenced by var1 and var2 respectively and can populate the dynamic text fields of his score board.

Set works differently in AS3 and using URLVariables I see the string of name/value pairs and I've split them up with an array, but, when I try to display them AS3 treats these name/value pairs as a value of the array instead of name/value pairs. I understand that you can load URLVariables as name/value pairs, but, how do you get AS3 to treat them as name/value pairs once the string is loaded?Sample code:

var sumString:String = event.target.data;
var sumArray:Array= sumString.split("&");
trace(sumArray); //this shows the whole array string

[code]....

View 2 Replies

Data Integration :: URLVariables And URLRequest?

Jul 20, 2006

I get the following errors when I try using URLVariables andURLRequest. Can anyone tell me what I'm doing wrong ?The class or interface 'flash.net.URLVariables' could not beloaded.var params:URLVariables = new URLVariables();The class or interface 'flash.net.URLRequest' could not beloaded.

var request:URLRequest = new
URLRequest("upload_process.php");

View 1 Replies

Assign Variables Dynamically To URLVariables?

Oct 9, 2009

Is it possible to assign variables dynamically to URLVariables?

View 6 Replies

ActionScript :: Add Empty Array To URLVariables?

Jan 4, 2010

I have tried several different ways, but it seems that it never sends the empty array value to the server

_vars["myObject[array_list][]"] = null;
_vars["myObject[array_list][]"] = [];

It only seems to work if I provide a value (which I am trying to avoid). What I would like for it to do is send the url param: myObject[array_list][]=& (i.e. an empty value)

View 1 Replies

Actionscript 3 :: Set URLVariables Parameters From An Object

Dec 2, 2011

I have a URLVariables object (variables) that I'm setting its properties this way. [code]But the properties differ so I want to just pass an object in the following format and have it set the property names and values correctly.{fname: "fname", lname: "lname", address: "address"}I tried a forloop like this, but it's not working. Not sure exactly how I achieve the same thing as setting the properties manually.[code]

View 1 Replies

ActionScript 3.0 :: Dynamically Populating URLvariables?

Oct 2, 2009

I am currently trying to write a simple class that handles form validation with a backend script, how the backend script works is that you POST a variable type and it's value and an XML is returned with any errors. The problem is, I want to be able to dynamically generate the variable names so that they don't have to be hard coded into the class. Is this possible?for example:instead of

ActionScript Code:
var urlVariables:UrlVariables = new UrlVariables();
urlVariables.first_name = "foo";

[code]......

View 2 Replies

ActionScript 3.0 :: URLVariables Causing 'URL Not Found'

Aug 26, 2010

[code]the external swf runs fine. This can only mean that the issue is being caused by trying to send the variables, or am I missing something?

View 3 Replies

ActionScript 3.0 :: URLVariables Uploading Images

Feb 4, 2011

I'm uploading files to my server using File.upload();. My php file looks like this:

[Code].....

View 2 Replies

ActionScript 3.0 :: Using URLVariables To Pass Name/value Pairs To A Swf?

Mar 2, 2011

I am attempting to make a flash object that receives name/value pairs to a swf that resides inside a LCMS. There is some documentation on the topic from the lcms, but very little support. The documentation says to instantiate the flash class called URLvars (which doesn't exist, so I'm using URLVariables) and says to use this code with the following example if the name/value pair is baseColour = 0x1c617D (essentially, then, the value of the variable baseC would be 0x1c617D):

var thisURL:String = _url;
var vars:URLvars = new URLvars(thisURL);
var baseC:Number = vars.data_obj.baseColour;

I tried to do this in a very simple object, but it will not pull the name/value pairs from the LCMS

View 1 Replies

IDE :: Passing Variables To PHP, Getting The URLVariables Error?

Mar 13, 2009

I have written up some code following preivous work. And it seems to me like it is correct.ut i am getting the below code when i click on my button to run the function!Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.

at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables()

[code].....

View 2 Replies

ActionScript 3.0 :: URLVariables Order Of Data?

Mar 28, 2009

I'm sending some data through an instance of URLVariables. I define it in a loop but basically it goes like this:

Name="blah";
E-Mail="blah@blah.com";
Phone="1223";

[code].....

View 7 Replies

ActionScript 3.0 :: Return URLVariables From A Function?

Apr 17, 2009

Is there a way to return URLVariables from a function

eg:

function varsLoaded():URLVariables {
var variables:URLVariables = new URLVariables();
variables.var1 = 'string1';

[Code]....

Now what I would like to do is assign "variables" to a variable:

var theVar = varsLoaded();
trace(theVar.var1);

Obviously the code above isn't correct; just to illustrate what I'm hoping to accomplish.

View 1 Replies

ActionScript 3.0 :: URLVariables - Multiple Variables With The Same Name?

Sep 18, 2009

I got a problem with URLVariablesprobably better to show by example

Code:
for each(var foo:String in fooArray){
variables.foo = foo;
}

this unfortunately doesn't work as intended as the old foo variable in the URLVariables get overridden each time.Thus when I output the variables as suchTried looking around the net for it but couldn't find anything. Also it seems logical enough that the variable gets overridden and I wouldn't really question it if it wasn't that ive been told the querystring should contain multiple definitions of the foo variable...

View 2 Replies

ActionScript 3.0 :: URLVariables Not Parsing Data?

Dec 13, 2009

ActionScript Code:

//request is made to PHP script
function completor(evt:Event):void {
var getor:URLLoader = URLLoader(evt.target);//works
var vars:URLVariables = new URLVariables(getor.data);//doesn't work!
}
getData.addEventListener(Event.COMPLETE, completor);

The first line outputs something like "&var1=something&var2=something_else". I just can't get why when I try to parse the data from the loader object into variables (second line) Flash simply stops and all the code after doesn't get executed.

View 1 Replies

ActionScript 3.0 :: Passing Dynamic XML Via URLVariables?

Apr 5, 2011

I have XML I'm dynamically creating and want to pass to a swf via URLVariables. What I have right now is the following:

var urlReq:URLRequest = new URLRequest(url);
var variables:URLVariables = new URLVariables();
variables.data_file = "us/data.xml"; //data.xml is static/already created

[code].....

View 3 Replies

ActionScript 3.0 :: Local Use Of Loader, URLVariables And URLRequestMethod.GET?

Aug 4, 2009

Does anyone have a way (or an alternative to) to get code below to work on local, windows if that matters,  files (so not served on a http server)?If I use code below, the IOError eventhandler is triggered (it appearantly cannot deal with the ?testing=true trailing the filename)If URLRequestMethod is set to POST, the external file loads but its loaderInfo.parameters do not contain given parameters from the URLVariables object.
 
Code below does work on localhost so in essence it's OK, right?I can have the loaded file poll the parent or whatever to retrieve variables or push variables after Event.COMPLETE but that does not seem as elegant...
 
var l:Loader = new Loader();l.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, onError );var u:URLRequest = new URLRequest( "somefile.swf" );u.method = URLRequestMethod.GET;var d:URLVariables = new URLVariables();d.testing = "true";
u.data = d;
l.load( u );addChild( l );
function onError( e:IOErrorEvent ):void{    trace( e );}

View 2 Replies







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