flex3

resize loaded SWF to fit in canvas

Hello, a .fla is 500 x 300. Inside, content moves OUT of the 500 x 300 stage so that it appears like it hides or moves off of the screen. .fla complied... loaded into Flex via SWFLoader: <mx:Conainer width="500" height="300"> <mx:SWFLoader width="100%" height="100%" /> </mx:Conainer> Loaded .swf file shows outside of the 500 x...

Flex: Getting a variable from your regular component to an inline item renderer

I am trying to turn labels red when they can no longer be added to a list because of size requirements. The renderer works but Flex creates a separate component. I can't think of any good way to get that value to the new component. Any ideas? <mx:List... > <mx:itemRenderer> <mx:Component> <comp:SetSizeLabel nu...

Check remote file existance with Flex 3

In Flex 3/AS 3, what would be a good way to check if a remote file exists? I'm thinking in PHP ways where you'd try to "fopen" a remote path (like "http://example.com/somefile.exe"), and see if it works or not. I'm not asking to just download all of the file, I just want to know if the file is there (and accessible). ...

flex TLF right click

Hi, I am using TLF in my application. the textflow contains text & inlinegraphics. I am trying to implement spell checker on my own. So I want to add the suggested words for the miss-spelt word. For that I want to know the word I have right cliked on. After that fetching it from library & getting the suggested words part is done. So I ...

How can I send another variable with FileReference Upload

Hi, I'm new in flex.i face a huge problem of the filereference class using the upload function. Actually i want to send the folderLocation variable with fileReference.upload(). Below i try to describe my strategy.Please help me with code correction. var folderLocation : String = "photos/myUniqueFolder/"; private var serverSideScript:St...

AdvancedDataGrid Multi-column programmatic sorting

Hi, I need to to a programmatic multi column sorting on the AdvancedDataGrid. The issue is, currently I am implementing paging on my grid. So, if I sort the data, only the perticular page is being sorted. So, I need to sort the entire list by the column criteria. I tried HeaderRelease event, but I guess it is of no use as I need to mak...

Custom Images for Items in a Flex Item List

Hi I want to have custom images with in a Flex List, so I want to have a selected image, hover image and normal image. I have tried many different ways I cannot seems to get it working. The closest I have got is to use a custom image renders with a button within the itemrender, even then -selectedUpSkin doesnt work, you can see it is ...

Flex 3 keyboard event handling

I'd like to arrange things so that I have a chain of keyboard event handlers in my flex application, all of whom are queried when key down events occur. Basically, when a visual component is on screen, it is a candidate for handling a key press event. Something like this (clearly this is pseudocode): <application handles_keys="F5, F6"...

How does one smooth an image used as a control skin?

I'm embedding an image like this: [Embed(source="/tool_deleteUp.png")] private static const c_deleteButton_styleUp:Class; I'm using it like this: _removeButton = new Button(); _removeButton.setStyle('upSkin', c_deleteButton_styleUp); When I rotate the button, the image doesn't scale smoothly. I know the tricks one uses to scale an ...

how to add effect to menubar items

Hi Greetings, I'm currently working on Menubar ,with dynamic xml in Flex 3.0.Here i want to provide an Zoom effect to each menubar item.But i'm finding difficult. Can anybody tell me how can i do this.Tell me how can i manipulate the menubar items. Thanks in advance, Do reply, With regards, Ashwin jiwane ...

pass parameters to HTTPService and use them inside the URL

Flex3 + Cairngorm. I have my service in Servicis.mxml: <mx:HTTPService id="docIndex" url="{URL_PREFIX}/jobs/{???}/docs" resultFormat="e4x"/> And I call it from my generic restful delegate like this: public function index(params:Object):void { var call:AsyncToken = services.getHTTPService(resourceName+"Index").send(params); call....

Limit filter to visible screen - Actionscript 3

I'm currently working in FlexSDK/AS3 and have a canvas containing many objects. The canvas is large - around 4K x 4K pixels, and I do a lot of scaling/zooming/scrolling about. The viewport is only around 800x450. I'm trying to apply a blur filter to the canvas - which I have figured out and it works fine, except for this one little bug:...

How Sort flex 3 arraycollection by datetiem value?

Hi!!! i need sort an arraycollection in flex 3 by date. i try this but i don't understand why doesn't work! var dataSortField:SortField= new SortField(); dataSortField.name="productDateAdded"; dataSortField.compareFunction=date_sortCompareFunc; var dataSort:Sort = new Sort(); dataSort.fields = [dataSortField]; productSort...

protect flv video file

I have a flv file,and want to play from only from AIR application. Now i need to protect my flv file in such a way that it cant be opened or played by any other existing flv player in the world.If some one doubleclicked that flv file then action will be zero or not played by existing flv player in the world and only played from my own...

Flashing Button with Flex/Action Script

I want to make a button flash red in response to an event, and then stop flashing whenever the button is pressed. This would be much like the master alarm button in an aircraft. So the flashing effect needs to be something that I can programmatically stop. I saw one example using a timer, but I want to avoid using a timer because I do...

Is there a good way to get a tri-state checkbox in flex?

Hi, I've had a good rummage around the interweb and can't seem to find any examples of a tri-state checkbox. It doesn't look to be supported in the SDK and I can't find any examples online. I would imagine this is a common problem, before I embark on writing my own does anyone know of a good flex tri-state checkbox component somewhere ...

How to resolve Adobe Flex error: "Error #2036: Load Never Completed"?

How to resolve Adobe Flex error: "Error #2036: Load Never Completed"? ...

Trying to understand the AsyncToken in Flex/Actionscript.

I am trying to understand the way the AsyncToken works in actionscript. How can I call a remote service and ensure that a specific parameter is available in the result or fault event functions? I think it is the async functionality I want to use. The following code will hopefully explain what I am trying to do. Feel free to modify the c...

Flex: Special-casing an item in a list or menu?

I've found it's often useful to special case the first item in a drop-down menu (ie, an instance of Menu). For example, if I want to pick a color from the list provided by a web service: <mx:PopUpMenuButton id="colorSelelector" dataProvider="{colorsService.lastResult}" /> I might also want a special-case, which is "enter a new co...

How to get the size of an embedded image / swf?

Normally if you were loading an image from a URL you would do the following: m_image = new Image(); m_image.addEventListener(Event.COMPLETE, image_completeHandler, false, 0, true); m_image.source = "http://www.example.com/image.jpg"; private function image_completeHandler(event:Event):void { // Image content has now loaded, we need...