actionscript

Flex 3 - how to support HTTP Authentication URLRequest?

I have a Flex file upload script that uses URLRequest to upload files to a server. I want to add support for http authentication (password protected directories on the server), but I don't know how to implement this - I assume I need to extend the class somehow, but on how to I'm a little lost. I tried to modify the following (replacin...

Does a "tag search" method exist working with RDF/XML documents in Flex?

Hi all, I'm working on a RDF file in my application. I loaded it with the URLLoader and I've imported flash.xml.* class in order to manipulate the content of my RDF file. I need to count certain tags ("Description") in an efficient way. The number of the tags I'm searching for is variable and now I'm using a combination of methods first...

flex 3 accessing main mxml from actionscript code

hi, im writting an actionScript class to handle my web service calls. When i retrieve a result i want to call a setter method in my main mxml application. My problem is that i dont know how to access the methods in the actionScript section of my main mxml class from my actionscript class, any ideas? ...

Deleting XML nodes from within a flex repeater doesn't work?

I have the following repeater code: <mx:Repeater id="chapterRepeater" dataProvider="{Library.Book.Chapter}"> <mx:FormItem label="Chapter" direction="horizontal"> <mx:TextInput width="100" text="{ chapterRepeater.currentItem.@Name}" change="event.currentTarget.getRepeaterItem().@Name = event.target.text"/> <m...

web service code in actionscript

hi, im calling an actionscript class from my main mxml file. the actionscript class is responsible for calling a web service and handling the response, however im having trouble and keep getting the following error; (im new to flex btw) Error #1009: Cannot access a property or method of a null object reference. my code goes as follow...

How can I remove items from a Collection with filter function, and then add new items that don't meet the filter criteria?

I have a Collection, and I want to remove all items that have a certain property set to true. I use a filterFunction to accomplish this. My question is, how can I add new items to the Collection that have that property set to true? The filterFunction is still applied, and the item is not added.... Do I have to iterate through the entire...

Flex 3 - how to select the first item in a List using code?

I have a regular control in my code with serveral items. <mx:List id="myList"> <mx:String>Item 1</mx:String> <mx:String>Item 2</mx:String> </mx:List> I have some other code which runs and populates the list. How do I select the first item in the newly populated list using code? ...

Flash local file browser with thumbnails

Is there a way to have an file browser for Flash that allows the user to browse their local machine, view thumbnails of jpgs and other images and upload selected files? This would be like the ActiveX/Java applet that Facebook uses. Any ideas or examples? Thanks! ...

Flex 3 DataGridColumn HeaderText Localization

I'm working in a multi-language application using ResourceBundle in Flex 3. I'm displaying data in a DataGrid and defined DataGridColumn headerText like this headerText="{localizedHeaderText('LABEL_USER_NAME')} this function returns the localized label for the username, but when I dynamcally select another language evertying gets refr...

Getting flash.geom.Matrix3D rawData without requiring a Vector.<Number> allocation

Getting the "rawData" property from an instance of flash.geom.Matrix3D (a new class in Flash 10 for high-level 3D matrix math) causes a Vector. (also specific to Flash 10) object allocation to occur. Is there any way to access the raw data without incurring this object allocation overhead? Since I must access this data multiple times pe...

What thread does JavaScript code called from Flash execute on?

Hi, As far as I understand, all JavaScript code is event-driven and executes on a single browser thread. However, I have some JavaScript functions that are called from within a SWF object sitting on the same page. Is this code run in the same manner as regular JS code, or is it on some separate Flash thread? If it is on a separate thr...

Problem with handling keyboard events inside a Canvas using Flex.

For some reason, the event listener I define never seems to receive any events, although I believe it should. Here's a very short description of the MXML code I'm using: WindowedApplication VBox (root box) MenuBar TabNavigator VBox (first tab) Canvas VBox (second tab) If I ad...

Getting the status of a stream from FMS in ActionScript

I'm looking for a way to get the status of a stream from Flash Media Server to action script. I need to know if a stream has any publishers/listeners from flex/ActionScript. ...

Bookmark a page

How can we bookmark a page on clicking a button or a link button in flex using actionscript ...

FLV: How to stop a VideoPlayer from scaling along with its containing MovieClip?

I'm creating a VideoPlayer object in a swf and that works well. I'm sizing it using autoSize and that's working fine too. I'm trying to make it so that when the containing swf gets larger the video stays at the same size. The swf is actually loaded from another flash movie which is where the resizing happens. Is there a setting in the Vi...

What are some good books for Object Oriented Progamming in Actionscript 2

What are some good books for developing a better understanding of Object oriented programming in Actionscript 2 and Flash ? ...

Accessing an ItemRenderer in a DataGrid

I have a data grid that has a checkbox item renderer in a cloumn to allow row selections: Main application: <mx:DataGrid id="dg"> <mx:columns> <mx:DataGridColumn id="ir" itemRenderer="renderers.RowCheckbox" /> <mx:DataGridColumn dataField="Name" headerText="Name" /> /mx:DataGrid> Item renderer: <-- Row...

Get the status of a live stream for a VideoDisplay control

I'm looking for a way to find the status of a live stream through a VideoDisplay (or any other method really). I am interested to know if the stream is currently being published to or if the publisher has stopped. This is for a Flex/Flash ActionScript 3 project. Is there a way to do this or is this ANOTHER oversight by adobe? flex flas...

Re-dispatching event in FLEX

In a FLEX app, I am trying to "re-dispatch" a custom event. I.e. component1 does dispatchEvnet(event), component2 registers a handler for the event, the only function of the handler being, again, dispatch(event). Finally, component3 listens for the event coming out of component2. What I am trying to do is similar to the concept of "re-th...

How to create a vertical button in Flex 3.

I'd like to create a button that is basically a rotated 90's so that it is in effect a vertically aligned button. So that the the text is like that of a book spine. Thanks in advance. ...