ActionScript 3.0 :: Url In URLRequest?

Apr 28, 2010

I have the following actions in my file :

var xmlLoaderA:URLLoader = new URLLoader();
xmlLoaderA.addEventListener(Event.COMPLETE, LoadSomething);
xmlLoaderA.load(new URLRequest("my url"));[code]....

now imagine that the loading of the file is completed and we are in the "LoadSomething" function. How can we trace "my url" in this function? In another word I want to wite this action:

trace(Command);

and I want "my url" string in output.But I dont know what is the Command.

View 1 Replies


Similar Posts:


Professional :: URLRequest Lost - Error 1046: Type Was Not Found Or Was Not A Compile-time Constant: URLRequest

Aug 12, 2009

In my movie i have a link button with following, simple, function creating a link:

[Code]...

lately i've associated a class file (.as) to my movie and immediately after, when publishing the movie i got the following error message: 1046: Type was not found or was not a compile-time constant: URLRequest. as well as a couple of other related error messages: 1180: Call to a possibly undefined method URLRequest. 1180: Call to a possibly undefined method navigateToURL. when i remove the link to the class file, the problem goes away. also, i have checked the class file for mentioning of "URLRequest" and nothing is there.

View 9 Replies

Flex :: Use A Var In A URLRequest?

Dec 27, 2011

During development I have to test using several different hosts. It is a pain to have to change the IP address everywhere I use navigateToURL or in an mx:HTTPService. I would like to set a var with the IP... public var hostIP:String = "192.168.1.100"; Then later I instead of doing...

[Code]....

View 2 Replies

ActionScript 3.0 :: New URLRequest To PHP?

Sep 26, 2009

working my way through some tuts, and have set up WAMP. Trying to send some vars from AS3 to PHP to update a mtySQL table.My issue is that the php file does not seem to be receiving the variable info from flash, why not?

Here is the AS code

Code:
submit_btn.addEventListener(MouseEvent.CLICK,onClickSubmit)
function onClickSubmit(event:MouseEvent):void
{
var loader : URLLoader = new URLLoader();

[code]....

The PHP works cos when I run it from a browser $sd3 updates the database field to 78.This the output of the 'trace' statements

clicked
sd1=77&sd2=88&nickname=test1

The reason is probably simple but I can't see it.

View 1 Replies

ActionScript 3.0 :: New URLRequest Not Working

Nov 2, 2009

I cannot ascertain why the code for one set of navigation buttons I've created works, but similar code does not. The code is rather lengthy, but I've pulled out the salient components to see if the Interwebs could help.

Here's the script that IS working:

Listener code:

Code:
cswordbutton.addEventListener(MouseEvent.CLICK,fetchcswordassets);
And the function code that goes with it:

Code:
function fetchcswordassets(e:MouseEvent):void{
var url:String = "knowntomeURL";

[Code].....

1) All of the actions are in a separate layer in the first frame;

2) There is only one scene;

3) I've given the same button a different instance name in many cases, to coincide with different expectations (URLs).

View 4 Replies

ActionScript 3.0 :: URLRequest And Php-xml's - Get The Xml-data?

Jul 30, 2009

i have this code
 
public class TextboxXML extends Sprite
{
[...]
//XML[code]....

i want to get the xml-data. the xml will be generatet out of a php-function.testing it out of flash by "testing the movie" (apple+return), the php will be parsed and it works. when i test it on my lokal server, the same smf i mean, nothing happens.

View 2 Replies

ActionScript 3.0 :: URLRequest Doesnt Contain Anything?

Oct 20, 2009

I have an xml file which contains multiple products each with their corresponding background image, foreground image, text and website. The LoadXML class loads this xml file and creates an array of each image, text and website. The Main class then loads each image from the array of background images in the method onBackgrLoad(). This is done through the use of a for loop which loops through the array of backgrounds (called hintergrund[]) and loads each one in turn. On tracing hintergrund[] I sucessfully receive a string of all the different background image paths. However when I examine the backgrRequest and backgrLoader they both contain null. The images therefore dont appear on stage but neither does an error message appear! The same thing happens for onImageLoad (this should load the foreground image) and onTextLoad.
 
public class Main extends Sprite
{
//____________________________________________________________________________Vars : Newly

[code].....

View 6 Replies

ActionScript 3.0 :: URL Importation And URLRequest?

Dec 21, 2009

package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.net.URLRequest;

[Code]...

View 1 Replies

Asp.net :: Setting URLRequest Path?

Nov 12, 2009

fla files which is calling default page . but it's not able to find the default page.. my default.aspx page is in root directory ,and my fla file is in ../capture/image.fla . here is my code

[Code]...

View 2 Replies

Asp.net :: Flex URLRequest And .NET Authorization?

Apr 24, 2010

can I make role based authorization when sending requests to an ASP.NET MVC backend system. I am calling action methods and expecting JSON results, however, some action methods are decorated with the [Authorize] attribute, others require some role privileges to be present. I certainly hope that passing authorization data with every request is possible

View 1 Replies

Actionscript 3 :: LocalConnection Var Into URLRequest?

Jun 29, 2011

i use LocalConnection between two swf in the same page.What i'm trying to do is to use a String sent from one swf to the other, as variable into my URLRequest...So i can trace "myVar" into the function chemin, but i didn't find how to use it into URLRequest

swf that receive the var :

var lc:LocalConnection=new LocalConnection();
lc.client=this;
lc.connect("callBig");[code]....

View 2 Replies

ActionScript 3.0 :: How To Chage The Urlrequest Of An Xml

May 4, 2010

i have a menu with 9 buttons, every button take me to one gallery.i already do the gallery, and works fine in a button. but i wanna know if its possible change the urlrequest of the xml for every button.

[Code]...

View 1 Replies

ActionScript 3.0 :: URLRequest Gets Error

May 20, 2010

I've got code to stop an arrow and stop an animating photo attached to btnStopMems simple button. Now I want to also have the same button pull a new URL and go to that page.[code]...

View 4 Replies

ActionScript 3.0 :: How To Set Timeout For URLRequest

Oct 28, 2010

Try to set the timeout for my URLRequest via
Code:
var tempURLRequest:URLRequest = new URLRequest (path);
tempURLRequest.idleTimeout = 2000;
But it doesn't work. Thus: How can I set/change/get the timeout for URLRequests? I need this since I start many parallel URLRequests and on slow connections I get an IOError URL not found error due to the long time they are on stack (I assume).

View 0 Replies

ActionScript 3.0 :: Http_build_query() And URLRequest?

May 14, 2009

I'm working to gain some proficiency in communicating flash and php. I recently found this nice method to feed variables from php into flash. I'm using http_build_query() function in a php file to send some variables like this:

[Code]...

View 4 Replies

ActionScript 3.0 :: URLRequest Contains NULL?

Oct 20, 2009

An xml file contains multiple products each with their corresponding background image, foreground image, text and website. The LoadXML class loads this xml file and creates an array of each image, text and website. The Main class then loads each image from the array of background images in the method onBackgrLoad(). This is done through the use of a for loop which loops through the array of backgrounds (called hintergrund[]) and loads each one in turn. On tracing hintergrund[] I sucessfully receive a string of all the different background image paths. However when I examine the backgrRequest and backgrLoader they both contain null. The images therefore dont appear on stage but neither does an error message appear! The same thing happens for onImageLoad (this should load the foreground image) and onTextLoad.

[code]...

View 1 Replies

ActionScript 3.0 :: FileReference From URLRequest?

Jan 14, 2012

I used to have this code when I had the files implemented in the app.

PHP Code:
private function saveFile():void{var sourceFile:File = File.applicationDirectory.resolvePath("Content/sounds/" this.name".mp3"); 

[code]....

View 5 Replies

ActionScript 3.0 :: Loading Sounds With Urlrequest?

Feb 4, 2009

this piece of code:

PHP Code:
var mySoundReq:URLRequest= new URLRequest("samplesound.mp3");
var mySound:Sound = new Sound();
mySound.load(mySoundReq);

How does the urlrequest know where that .mp3 file is located, and how do i tell as3 where it is? and another thing: when i put this on the web, how do i locate the file then?

View 6 Replies

ActionScript 3.0 :: Identify Variables Via URLRequest?

May 18, 2009

I'm retrieving variables from a DB via PHP via the URLRequest, and the formatting is set to variables (URLLoaderDataFormat.VARIABLES) and matches the structure "myVarName=myValue&myOtherVarName=myOtherValue&... ".

My question is; is there a way, within Flash, to identify the variables and their values, without having to know their names?, are there methods within the loader class that allow this?, such as the variables count etc?

(I can access the variable "copyrightTxt." via the syntax: loader.data.copyrightTxt because I know its name, but I'd like something like

loader.data.variableSent[45].name = "copyrightTxt"
and
loader.data.variableSent[45].value = "@ 2009"
and
loader.data.variableCount = 98

View 3 Replies

ActionScript 3.0 :: URLRequest To Remote Server?

Jun 1, 2009

Can I send and load variables to a php script on a different server? Hen I try I get a Error #2048: Security sandbox violation How do I get around this?

View 14 Replies

ActionScript 3.0 :: Error 1009 When Using URLRequest

Dec 25, 2010

I'm figuring out a way to reload my entire SWF file from only AS3. I'm using the URLLoader and URLRequest method. When I run the SWF and execute the code, error 1009 keeps popping up

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Projectile3()[D:OliphantProjectileSimulation3Projectile3.as:1 07]

From the error, line 107 in Projectile3.as is causing the error. The line is:
var fps:int = stage.frameRate

I need to reload my flash file because as I simulate the projectile path, I also create a sprite that draw the trail of the path. I tried to remove the path using removeChild(trail) but as soon as I addChild(trail), the previous trail appears. The only way to completely remove the trail is by reloading the movie.

View 4 Replies

ActionScript 3.0 :: New URLRequest To Load A Page

Aug 29, 2011

I am using new URLRequest to load a page. I cannot seem to get it to load in the current page rather than create a new page. Here is my code;

Actionscript Code:
home.addEventListener( MouseEvent.CLICK, function(e){ navigateToURL( new URLRequest('http://www.site.com/page.html') ); } );

View 6 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

ActionScript 3.0 :: Set Or Even Get The Timeout For URLRequest Objects?

Oct 29, 2010

I try to set the timeout for my URLRequest via Code:var tempURLRequest:URLRequest = new URLRequest (path);tempURLRequest.idleTimeout = 2000;But it doesn't work. Thus: How can I set/change/get the timeout  for URLRequests? I need this since I start many parallel URLRequests and  on slow connections I get an IOError URL not found error due to the  long time they are on stack (I asume).

View 3 Replies

ActionScript 3.0 :: Importing Image Using Urlrequest?

Feb 11, 2011

i have imported an image using actionscript using urlrequest.i have set its x and y bu the image is to big, i want to resize it, i have tried the height and widt but it doesnt work

View 2 Replies

ActionScript 3.0 :: Linking To URL's Using Var Request:URLRequest?

May 23, 2011

I've created an RSS reader by going through this very useful tutorial: http://www.webdesignermag.co.uk/blog/build-an-adobe-air-rss-reader.I've adapted it to my needs but now  I'm struggling to add buttons to link to other websites. I've added 4 more buttons (link_mc_ videos, link_mc_images, etc) and added new variables (url2, url3, url4 + url5) but  when I click on the buttons they all go to the first URL I specify - can anyone help? Here is my  actionscript:
 
/* blog link */ link_mc.buttonMode=true; link_mc.addEventListener(MouseEvent.MOUSE_DOWN, linkMouseDown);
function linkMouseDown(evt:MouseEvent):void {
var url="http://www.popularmechanics.co.za/page/blogs"; var request:URLRequest=new URLRequest(url);[code].....

View 8 Replies

ActionScript 3.0 :: Can't Open JPG Using Loader And URLRequest

Mar 27, 2012

I am loading an image using Loader class and with URLRequest, but for some reason I am struggling to reference a file in a sub folder of the root (where the SWF is exporting to) this is local testing and I am assuming that if I refer using an absolute path on a web server it would work - but I do prefer to use relative paths for simplicity.I get the above error, but I know that the file name is correct as moving it to the same folder as the SWF works fine - but in implementation should I wish to organise hundreds of JPGs and create a gallery it would be a bit messy to store them at root level. As mentioned previously I am working on a local drive at present, and have no plans to move to a web server as this is just a test file for my own learning purposes.i have tried "folder/filename.jpg" and even on the unlikely side "folderfilename.jpg" and even further far-fetched "../rootfolder/folder/filename.jpg".The only issue is the path, I am sure of it - but the filename is correct.

View 1 Replies

Flex :: Retrieve The Variable Which Getting Through UrlRequest

Feb 16, 2010

I am sending userID through urlRequest like below code,

[Code]...

now when new window is opening in that new swf is opening(new project) that is also in flex only.there i need to retrive userID when initailizing only how can i retrive?

View 2 Replies

ActionScript :: Difference Between URLLoader And URLRequest?

Jul 8, 2010

What is the difference between URLLoader and URLRequest in Actionscript?

View 1 Replies

Actionscript 3 :: Set Rel=noreferrer In A URLRequest In Flash

Feb 26, 2011

I'm using a URLRequest to get a resource. I need to clear the Referrer information in the request. Is there a way to do this?

Snippet:

sound = new Sound();
var req:URLRequest = new URLRequest(url);
req.method = "POST";

[Code].....

View 1 Replies







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