flex

Smooth mousover images inside scaled Flex App?

I have a flex app I am scaling using systemManager.stage.scaleMode=StageScaleMode.NO_BORDER; for the most part it works well except for my bitmap data (mostly png's from the designers). I can set the mx:image tags to smoothBitmapContent=true and that works great for everything except my mouseover objects. When I do a mouseover, the so...

Callable objects on ActionScript?

Hi, is it posible to have callable objects on ActionScript? For example: class Foo extends EventDispatcher { Foo() { super(); } call(world:String):String { return "Hello, " + world; } } And later... var foo:Foo = new Foo(); trace( foo("World!") ); // Will NOT work ...

How to keep track of objects for garbage collection

May I know what is the proper way to keep track of display objects created and hence allow me to remove it efficiently later, for garbage collection. For example: for(i=0; i<100; i++){ var dobj = new myClass(); //a sprite addChild(dobj); } From what i know, flash's garbage collection will only collect the objects without strong refere...

How to get Flex app to load quicker?

We've got an app written in Flex that displays data from our app. The .swf file is only 427kb, but it takes a full five seconds to load in Firefox. This is a headache for our users because they need to access the page that contains the app frequently. (The app displays documents, and it's really slow to march through a list of them). I'...

[FLEX 3] Placing images into a Collage Canvas

I've got an array of different sized images. I want to place these images on a canvas in a sort of automated collage. Does anyone have an idea of how to work the logic behind this concept? All my images have heights divisible by 36 pixels and widths divisible by 9 pixels. They have mouseDown functions that allow you to drag and drop. ...

Flex 3 app is popping up a blank page along with content in firefox only

Why does my flex app open a blank page in firefox? Example http://localhost/flexApp/flex_bin/test.html. IE works fine--no blank pop up along with my test page. I'm not asking for one, yet ff feels the need to serve one up. Does anyone know why? ...

FlexPMD and TextMate setup question: Creating rules

Hi guys I wanted to get some assistance into how to set up new rulesets for Textmate, as I can't find the pmd.xml file that needs to be modified. Thanks in advance ...

How to determine if a string contains a specific substring

Given a string A, how can I determine if that string contains the substring "video/x-flv"? ...

Is there a way to check if an integer is going higher or lower in AS3

I'm trying to make a script that listens to a variable (int or Number) and then does certain functions whether the variable is going higher or lower. So for example if the number gets higher, it runs one function. If it gets lower, it runs another. Is this possible in AS3? Any ideas? ...

Flex: Creating Sound Waves Image

what i want to achieve is creating sound wave image depending on the sound i loaded in Sound() like this image: i been using WaveViewer function: Wave Viewer it did quite well but if i load huge mp3. it doesn't display the whole width of the wave, maybe i miscalculate the width. hope you can enlighten my mind.. thankss ...

static constants return instance of specific class in Flex?

So here's what I mean. Let's say I have a class ErrorMessages which holds all my error messages as static constants. So I could access them like ErrorMessages.PASSWORD_INVALID or ErrorMessage.PASSWORD_TOO_SHORT. I want to know if it is possible to have separate classes that hold subset of these constants and access them like ErrorMessag...

ArrayCollection error in Flex does not accept single XML nodes - alternatives?

hello, i get this error when i retrieve an XML that only has 1 node (no repeating nodes) and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error. TypeError: Error #1034: Type Coercion failed: cannot convert "XXXXXX" to mx.collections.ArrayCollection. this error occurs as the line of code...

Flash/Flex conditional compilation "else"

In AS3 you can pass a constant to the compiler -define+=CONFIG::DEBUG,true And use it for conditional compilation like so: CONFIG::DEBUG { trace("This only gets compiled when debug is true."); } I'm looking for something like #ifndef so I can negate the value of debug and use it to conditionally add release code. The only soluti...

How do I make sure that there is always something selected in a Spark List?

I have a spark list, which is based on a dataProvider. As the application runs, the data in the dataprovider can change, and also the dataProvider can be swapped for a different one What I need to do is make sure that something is always selected in the list (unless it is empty) ...

Actionscrips/Flex4: Display cut-off datapoints differently in LineChart

Dear Sirs, The issue arises when the user selects a range on the linechart that cuts off datapoints. When this happens, I would like the chart to tell the user somehow that there are data points three, just outside the range, perhaps by drawing a straight line across the top or bottom of the graph. How can I get Flex to do this for me...

Flex: How do I adjust the contrast/brightness of an image inside an image control?

I have an image loaded into an Image control and I'd like to know the most efficient way that I can darken/lighten the image programatically. ...

Flex 4: How to skin a spark volumebar to make it work like a HSlider?

Can anyone point me in the direction of skinning a video player volumebar? I want a mute button on the left side and then an HSlider to the right that is always open (no popups). I've managed to change the skin to use a custom track button and a custom thumb button and it mostly looks how I want. I can't seem to figure out how to mak...

Cross-domain policy issues after redirect in Flash

I'm having trouble with a cross-domain policy. I'm using the AS3 Loader to fetch an image; I'm making it load the policy file, like this : var pLoader : Loader = new Loader(); var pContext : LoaderContext = new LoaderContext(); pContext.checkPolicyFile = true; pLoader.load(new URLRequest(sURL), pContext); This works fine...

Compiling SWC file from FDT

Hi guys, I've made a library which I'd like to compile to an SWC file, I've tried to do this in FDT by choosing FDT AS3 Library as Run settings, but all I end up with is a 0kb .swc file. Does anybody know what I'm doing wrong? I can't find much when I google it either, if anybody has a quick walkthrough on how to do it saved in your boo...

In FLEX, How can you stop ENTER Key from my Alert being caught by the control that initiated the Alert?

I am having an issue where I show an AlertBox message when the user hits ENTER and the focus is in a text area. The pop up works fine, but when the user hits enter the Alert closes as expected, but the TextArea listener receives the ENTER event from the Alert and pops the dialog up again. I have tried a number of ways to catch and eat...