Flex :: Why Is The 'Range' URLRequestHeader In Flash Restricted

Jan 26, 2010

I want to be able to pause and resume downloads in my flex application, but I get a RTE when trying to set the Range header.

Error #2096: The HTTP request header Range cannot be set via ActionScript.

I imagine there isn't going to be a work around client side, but expect there is a way you can get a server to change the name for the range header to something else...

View 3 Replies


Similar Posts:


ActionScript 3.0 :: URLRequestHeader Standalone Application

Jun 8, 2010

I am having an issue trying to set http headers when trying to access a web service.
 
I have read that I need a crossdomain.xml on the server, but is this only when the application is running in a browser - i.e. hosted somewhere.
 
My scenarion is that I am developing an app to run as a stand alone application (not in the browser) for a 3rd party device.  This device does not support the flex mx packages.
 
The app calls a webservice and displays data.  The webservice requires to be authenticated.
 
In JS i can use an XMLHTTPRequest and load the url using "https://username:password@server.com/service.asmxpassword@server.com/service.asmx" - attempting to do this in AS 3 using a URLRequest and URLLoader I get "#2044: Unhandled ioError:. text=Error #2032: Stream Error".
 
So I try to add a HTTP header instead, but this appears to be ignored - the credentials of the user who is currently logged into the network (idsid) is used instead.
 
Do i need a crossdomain.xml file on the server hosting the webservice even though my flash application will never be hosted.  The server admin is not happy allowing all domains ("*") since I dont knwo what domain I am in as my flash app is not hosted.
 
Any help you can give me would be greatly appriciated.  or perhaps there is an alternative way of doing this?
 
<code>
var urlRequest:URLRequest = new URLRequest("https://server/service.asmx");
urlRequest.method = URLRequestMethod.POST;
urlRequest.contentType = "text/xml";
 
urlRequest.requestHeaders.push(new URLRequestHeader("Content-type", "text/xml"));
urlRequest.requestHeaders.push(new URLRequestHeader("Authorization", "Basic " + escape(usr) + ":" + escape(pwd)));
urlRequest.data = getSoapData();
 
 
var urlLoaderService:URLLoader = new URLLoader();
urlLoaderService.dataFormat = URLLoaderDataFormat.TEXT;
urlLoaderService.addEventListener(Event.COMPLETE, onServiceLoaded);.....

View 2 Replies

Actionscript 2 - Flash : Event For Restricted Text Input?

Oct 13, 2011

I have a restricted editable textfield in flash like this:

oField.restrict = "0-9";

To capture changes I attach this listener:

oField.onChanged = function(){
trace(1);
};

Is there a listener to capture the event when a restricted character is entered (e.g. the event when the key "a" is pressed - the field does not change, so onChanged does not fire).

View 1 Replies

ActionScript 2.0 :: Is Flash Secure Enough To Use For A Website That Holds Personal Info, Password, Restricted Areas

Aug 4, 2009

Is flash (actionscript 2.0) secure enough to use for a website that holds personal info, password, restricted areas, ect. How can I make it secure enough if it's possible.

View 1 Replies

Flash :: Specify Fallback Font In Adobe Flex When Some Character Range Is Not Available In Primary Font?

Mar 23, 2011

In my application I'm using a custom embedded font for English (Helvetica New) which does not contain characters (glyphs) for chinese unicode range. In the application, wherver chinese characters are avaiable they are not displayed (suppressed) since they are missing in the custom embedded font. How can I make the flash player to use a fallback system font for the missing characters? And the fallback should be for the missing characters alone. For the Engligh characters it should use the embedded font.

View 1 Replies

Actionscript 3 :: Flex - Disable Range On Slider?

Jan 4, 2010

I have an HSlider with a minimum of 1 and a maximum of 6. Is there a way I can disable the range 3 - 6, so the user can only select from the range 1-3 on the slider.Note: Your first thought might be to tell me to set the maximum to 3. I dont want to change the maximum to 3, I want the user to know there is more, but currently not selectable.

View 2 Replies

Actionscript 3 :: Set The Date Of Second Datefield To A Specified Range - Flex

Sep 29, 2011

I have two Datefields .Is there a way that i can set the date of second Datefield to a specified range(say three days ...?. I tried to do it but not worked .. dont know to convert date back to string and format it .. here is the code

[Code]....

View 2 Replies

Actionscript 3 :: Flex Chart...update Date Range?

Aug 30, 2010

I am using Flex 4 & zend to create a simple areaseries chart. Currently, I am pulling 20 yrs of data from the database & displaying it by default. I then want to let the user choose the dates he wants, but without going back to the server....how can I do that?

<mx:AreaChart id="Areachart" dataProvider="{employeesResult.lastResult}">
<mx:series>
<mx:AreaSeries yField="numberOfEmployees" xField="date" id="areaSeries"/>[code]....

View 2 Replies

Flex :: Convert An Arbitrary String To Float In Range 0 And 1?

Aug 22, 2011

I'd like to convert an arbitrary string (or for easier process a string hash) to a float number between 0 and 1. The purpose is to create a function that returns a color code for a given string so the user always sees that entity in the same color that is generated from its name.OP included this code in comments (included here for readability):

var hashed:String = MD5.hash(input); // creates a 32 long hexa
const max:Number = Number("0xffffffffffffffffffffffffffffffff");
var hashedHexa:Number = Number("0x" + hashed);

[code]....

View 1 Replies

ActionScript 3.0 :: Scaling A Movieclip In Restricted Area?

Jun 29, 2009

I have a movieclip (view_mc), I want to scale it in a restricted area.

I have made an IF statement,

when its width and height are less than the width and height of the restricted area, then do scale.

but when it reaches the width and height of the restricted area I can't scale it down.

Here is the code:
view_mc.addEventListener(Event.ENTER_FRAME, on_enter_scale);
function on_enter_scale(e:Event):void
{

[Code]....

View 7 Replies

ActionScript 3.0 :: Resizing Movieclip In A Restricted Area?

Jul 7, 2009

I have 2 moveclip called view_mc and restricted and button called btn_scale.
 
When the user click and drag btn_scale, it resizes the view_mc where the width and height of view_mc dosen't exceed the width and height/2 of restricted area.

I made that.  But when view_mc reaches the width and height/2 of restricted area, I can't resize view_mc to be samller. (The btn_scale looks like it's disables and can't use it)

I think some logic is missing. I highlighted the code that is missing some logic.
 
var clickedX:Number;
var clickedY:Number;
var newScale:Number;

[Code]...

View 1 Replies

ActionScript 3.0 :: Specific URL Blocking - Access Restricted

Mar 22, 2012

This is specific url blocking.
function pageDomainCheckInit(event:Event):void {
var url:String=stage.loaderInfo.url;
var urlBeginninng:Number=url.indexOf(://)+3;
var urlTermination:Number=url.indexOf(/,urlBeginninng);
var pageDomain:String=url.substring(urlBeginninng,urlTermination);
[Code] .....

View 9 Replies

Flex :: Subsetting Array - Select A Range Of Sell Data For Some Month

Aug 14, 2009

I want to subset an array. I have the following array

[Code]...

Now based on user requirement I want to select a range of sell data for some month.For example sometime it may be sells data from Apr to Dec,sometime may be Jul-Oct.How can I do that without hampering the original array

View 2 Replies

ActionScript 3.0 :: Capturing User Input Restricted To Just Numbers?

Nov 14, 2008

I've written a function that restricts user input to just numbers (0-9,.) and stores the input in the associative array, userInput[]. It works but seems inefficient looping through the entire input text string to scrub out invalid characters. Anyone have suggestions for a more efficient approach? Note that a working solution must correctly process mouse or cursor key movements/edits within the input box.

Also, you can see I'm using the KeyboardEvent.KEY_UP event to trigger the processing. The docs seem to indicate TextEvent.TEXT_INPUT is really the proper event for this purpose. I started with TextEvent.TEXT_INPUT but found the event is triggered before the last key pressed is actually added to the instance. The result is that the function was always one characterbehind. Is there an easy way to get the current text in the input box, including the last key pressed, when processing TextEvent.TEXT_INPUT?

View 5 Replies

Professional :: Troubleshooting In Highly Restricted Network Environment?

Mar 29, 2011

Looking for any help you might be able to give me with this one. Recently upgraded from Flash CS3 to Flash CS5 Pro. When I publish a movie produced exclusively with CS5, the resulting SWF will work everywhere but inside my company's highly restricted/locked down network. When I attempt to load the SWF in a browser from within the network, all I get is what appears to be the standard Flash preloader - the 5 little dots that crawl across the middle of the screen.

I've confirmed there's no IE version error, the machines have the newest version of Flash Player; the only difference is the network. What could be preventing the SWF from reaching the browser? Is there any esoteric publishing setting I can use in CS5 pro that I should try?

View 3 Replies

ActionScript 3.0 :: Mouse Control In A Restricted Area Of The Stage?

Aug 4, 2011

How can I make that the Mouse Control is only possible in a restricted Area on the Stage?

View 1 Replies

ActionScript 3.0 :: Accessing An Access-restricted Folder In Server?

Jan 14, 2012

Does anybody know how to make a folder inaccessible by direct address yet accessible to a flash file within that domain? Consider the following scenario.[URL]

View 9 Replies

Flex :: Changing Spark TextArea Text Color Dynamically Over A Range Of Characters?

Dec 22, 2010

I am attempting to dynamically change the color of a subset/portion of text in a Spark TextArea control. Using the MX-based TextArea, I could leverage the mx.controls.textClasses.TextRange type and change the color directly as follows:

TextRange tr = new TextRange(theTextAreaControl, false, beginIndex, endIndex);
 tr.color = somePredefindColor;

Input Parameters to TextRange constructor:

1st argument: The TextArea control that will provide access to the underlying textField property
2nd argument: Indicates the TextRange will not modify the content of the TextArea
3rd argument: The beginning index position in the TextArea text string
4th argument: The ending index position in the TextArea text string

How would I go about doing this for a Spark-based TextArea control? I am looking to dynamically change the font color for a range of text, not just the entire TextArea AND I cannot statically specify the font color. The problem I run into when trying to re-use the TextRange type is that the 1st argument is expected to provide the textField property, which is currently not on the Spark-based TextArea control. I thought about extending the Spark-based TextArea control to provide this accessor property but that seems like overkill and is probably not the best approach.

View 1 Replies

ActionScript 2.0 :: Build A System Where Users (restricted To A Very Few Admins) Can Publish News Articles?

Feb 18, 2012

I'm trying to build a system where users (restricted to a very few admins) can publish news articles. The form is simple enough: an input field for "Headline" (single line) an input field for "article" (multiple line) and a file reference field to include a picture.

The idea is that you can EITHER write a headline and some text and then publish | OR | write a headline, some text then choose a picture and publish.No check boxes - no "would you like to include a picture" - just an idiot proof system where you can wither publish text - or text and a picture on the click of ONE button.

The picture is placed (via php) into the file system on the server, the text for headline and article are pumped into an SQL database (via php). I know php well and can do that bit with no probs but I'm having trouble with the function to pump the vars to the php if the user HASN'T chosen to include a picture.

1) has anyone done this before and if so do you have a "boilerplate" fla / php I could copy and paste into my project ?

2) can anyone see any problems in the code (posted below) which would explain why the upload of pictures always works but the sql insert never works ? On the stage are two input fields and two buttons (obvious names in the code are 'head_txt' and 'art_txt' )

CODE:
import flash.net.FileReference;
var progressBar:MovieClip;
var reference:FileReference = new FileReference();

[code]....

View 3 Replies

Flash AS3 - AddChild Outside Of Sprite Range

Jul 29, 2011

I am trying to create a dynamic scrolling list in Flash AS3. When I create a list, I set it to be an initial length. Later, I add more objects to the list which is outside of the original size of the list. I want to be able to scroll down the list and see all the objects. My scrollbar just moves the list's y position. However, every object that is drawn outside the original list size is not shown when I run the program and scroll. I have a list object which has the function below when I need to add content to the list. When I initialize the list, I give it an initial height and width which I use to create a mask.

public function AddPlayers(pPlayers:Array, pScrollBar:ScrollBar):void {
var player:Player;
trace("happened again");
for (var i:int = 0; i < pPlayers.length; i++)
player = pPlayers[i];
[Code] .....

View 1 Replies

ActionScript 3.0 :: Radians In Flash Had A Range Between -PI And PI?

Feb 15, 2012

I have a simple code snippet as follows:

ActionScript Code:
testangle = Math.tan((-stage.mouseY+marker.y)/(stage.mouseX-marker.x));
trace(testangle);

In the swf I simply moved the mouse around the stationary object marker and read the results. For some reason I'm getting crazy values like -20 and 18. Why on earth is that? I thought radians in flash had a range between -PI and PI.

View 2 Replies

Flash :: Looping A Range Of Layers & Frames CS5?

Dec 14, 2011

I created an animation in which I'd like to continously loop the last 100 frames of 3 different layers ('baubles continuous' folder), how do I do that? 

View 3 Replies

Actionscript 3 :: Flash Range Slider Component?

Jan 5, 2010

Is there something similar to this jquery component in flash or are there any ready examples on how to do that?

View 2 Replies

Flash :: Using Context3DVertexBufferFormat.BYTES_4, What Is The Value Range Of One Field?

Jan 20, 2012

If I populate a vertex-buffer by using the byte-array method:

//Example: var ba:ByteArray = new ByteArray();
//Write vertex #0:
ba.writeFloat(-.5);
ba.writeFloat(-.5);
ba.writeUnsignedInt(0);

[Code]...

What is the range of values possible (0 to 255? 0.0 to 1.0? etc.) for the Vertex attribute's field (in this case, va0.x, va0.y, va0.z, va0.w)? Does it vary between which data-type is written to the ByteArray object (writeFloat vs. writeUnsignedInt)?

View 1 Replies

ActionScript 3.0 :: Flash Generate Random Number Within A Multiple Range?

Feb 20, 2011

really great job done in the forum This is my first thread here, and i would like to ask how can someone produce a random number within a complex range.In my case i want to produce a random number in the range [0,90]OR[270,359] and i can't find the way to do this using Math.random . I looked on the internet but in most cases a simple range is used like (2,40) or [4,50] etc.

View 14 Replies

Actionscript 3 :: Testing Flash Movies Performance Agaisnt Range Or Computers And Browsers

Jan 18, 2010

I am half way done with making my first flash web game. I put alot of work into it and dont really know how great the performance will be on browsers and range of different types of computers. This is my first time working with flash in general. I was wondering if there is any tools to test my game out against browsers and hardware. The game might work great on my computer, but how can i ever tell how great it works in a range of browsers and computers.

View 4 Replies

Flex :: Way To Set Text Format For A Range Of Text Using TLF?

Jan 25, 2010

i have to set the text format for some tokens in a plain text. I'm trying to use the Text Layout Framework to improve the speed of the operation but i've founded that TLF is far slower (10X in my tests) than the old setTextFormat(). For each token i call this function:

public function setTextFormat(format:TextLayoutFormat, begin:int, end:int):void{
var selection:SelectionState = new SelectionState(this._textFlow, begin, end, this._normalFormat);

[code].....

View 1 Replies

ActionScript 3.0 :: Sandbox Security - Restricted By Security In The Game Swf?

Apr 17, 2009

I haven't fully grasped how the flash security model works, and now I've ran into a problem. I have a base SWF that loads a game loader swf, which in turn loads the actual game.What I'm trying to do is taking a current bitmap snapshot of the running game. This works fine before the loader swf has loaded the game. When the game is loaded, I get a security violation because the game has images pulled from facebook. Is this something that can be solved on my end, or restricted by security in the game swf?

View 2 Replies

ActionScript 3.0 :: Specify A Range For X Coordinates?

May 5, 2011

This code below works, but I'd like to modify it so that if my dragged item passes over a region in the x coordinates. So if I pass the dragged item over the range of 600 - 700 then it would play the frame labelled "square", and when it passes out of that region, go back to play the frame labelled "circle". So realy I'm asking how can I modify the <=600 to instead 600 to 700, and else refer to circle.

if (me.x <=600){
me.gotoAndStop("Square")
} else if (me.x>= 700){
me.gotoAndStop("Circle")
}

View 5 Replies

ActionScript 3.0 :: Use Switch With Range?

Dec 26, 2009

I've got a variable called coins which contains the amount of coins you have.I've also got a movieclip called customer_marker_mc which I want to change color depending how much coins you've got...I want 100 (or more) - 91 to give one color and 90 - 81 another and so on.[code]...

View 6 Replies







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