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


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

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

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

Flex :: Youtube Upload Via URLRequest?

Jun 13, 2011

I'm attempting to upload a video via the YouTube api. I can authenticate everything fine and formulate the request just fine but the body of the request with the binary video data I'm having an issue with.

What's the proper way to encode the file data and add it to the body of the urlRequest?

My best guess was:

public function getFileStreamBytes(fileName:String):String{
var byteArray:ByteArray = new ByteArray();
var returnString:String = "";

[Code]....

View 1 Replies

Flex :: Url - Send Array In URLRequest?

Jun 24, 2011

In efforts to allow users to save their progress in my application, I've decided to allow them to save. In order to do this, I'd like to create an array with all the necessary information, and send that information to a coldfusion (.cfm) file and process the information from that page. Is it possible to send an array instead of a bunch of url variables? It is possible (and quite probable) that users would exceed the query string length of most browsers.

View 1 Replies

Flex :: Uploading Bytearray Via URLRequest?

Sep 4, 2011

I'm trying to upload a bytearray, but am struggling to make the content-type go as image/png (it always goes as application/octet-stream no matter what I do.).I've checked the request with Charles Proxy, and can confirm that it indeed always goes as application/octet-stream.My code is:

protected function onObjectLoaded(event:Event):void
{
var byteArray:ByteArray = new ByteArray();
var fileName:String = fileReference.name;
var uploadPath:String = serviceURL;

[code]....

how to change this, so the bytearray itself gets passed in as image/png instead of octet-stream This image is being upload from the client side, and being passed as a FileReference, which I then invoke load(), and then get it's "data" attribute, which is where the bytearray is.

View 1 Replies

Actionscript 3 :: Flex 3 File Download Without URLRequest?

Apr 7, 2010

My Flex client app has got some data from the back end (RemoteObjects, BlazeDS, Spring). Client has got all the data it needs, it now needs to put some information in a CSV format and make it available for download.Using Flex 3 for this.

View 2 Replies

JavaScript :: How To Replace HTML Tag In URLRequest Flex 4 / Air

Mar 2, 2011

I am embedding a website into my application, and Adobe Air does not recognize the breakline HTML tag in the source code (Firefox and Chrome auto-correct the error). I have attached the source code below. Is there a way to replace the breakline with the correct syntax (no forward slash). I do not control the website, I am merely loading it into my application, so I can't just change it at the source. I am using an mx: html object and htmlLoader to load the url.

Website Source:
<ul>
<li><a href="Rpt_Selection_2.asp?Report=StatusReport/StatusReport.asp">Status Report</a></li>
<li><a href="Rpt_Selection_2.asp?Report=StatusReport/AlarmsAlerts.asp">Alarm History</a></li>
</ul><br/>
<table class="Header" cellspacing="0" cellpadding="0" border="0">
[Code] .....

MXML Component:
<mx:HTML id="htmlControl" width="100%" height="100%"/>

Script to load URL:
htmlControl.htmlLoader.load(new URLRequest("[URL]"));

View 1 Replies

Flex :: Attaching An Event Listener To All URLRequest's?

Oct 13, 2011

We have a flex application that connects to a proxy server which handles authentication. If the authentication has timeout out the proxy server returns a json formatted error string. What I would like to do is inspect every URLRequest response and check if there's an error message and display it in the flex client then redirect back to login screen.

So I'm wondering if its possible to create an event listener to all URLRequests in a global fashion. Without having to search through the project and add some method to each URLRequest.

View 3 Replies

Actionscript 3 :: Air Flex Uploads URLRequest Maximum Simultaneous

Sep 24, 2009

I'm trying to upload to amazon s3 using FileStream and UrlRequest.

But it seems I can only upload 2 files simultaneously.

Is there a reason for this? How can I work around this?

Also would this affect web service calls to a SOAP web service on the same domain?

View 2 Replies

Flex :: Html5 - File Upload Not Working Using URLRequest

Feb 13, 2012

I used upload functionality by html . using given code it's working fine .

[Code]...

BUT GETTING Bad request error . so anybody know , what did i wrong in code.

View 1 Replies

Flash :: URLRequest - Send A Delete Method From Player (Flex)

Jan 14, 2010

Need to find a way to send a delete method from Flash Player (Flex). Currently it's not done by default (except for from AIR), but I am sure someone has augmented the URLRequestHeader to get it to work properly. I've tried this, it isn't working:

[Code]...

View 2 Replies

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

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

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







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