actionscript-3

Listen events from loaded SWF?

Hi: I've a simple application with one movie loading another SWF in the same domain. I can access vars and functions in the loaded SWF but can't listen events from a button; receiving the run-time error: Error #1009: Cannot access a property or method of a null object reference The Linkage properties for the button are set Main var a...

HHTTPService Error

I'm trying to debug an issue by going to the most basic of tasks. I have an app written in adobe flex (action script 3) that I want to have interact with a web service. Because it appears I can't access the server, I've created a simple app. Source code for the ActionScript <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns...

Load-completion order affects swf code in Air 1.5 on PC only

Very strange one. Our air application loads multiple swfs, which together make up a lesson. If we load them serial, rather than parallel, the code inside all swfs is broken. (There's a previous stackoverflow q on this issue). If they are loaded in parallel all timeline top level code works. On Mac, all code works, including deeply nes...

Dynamically populate Text Fields in Flash (AS3)

I am trying to figure out how to dynamically populate textfields in Flash. The text in the fields will either say ON or OFF based on the value of bstatus. var bstatus will either have a value of 0 or 1 I have the following textfields listed below. I'm not sure if the syntax is correct, but I was thinking that the text fields would ...

Does Adobe Flex SDK contain a helper function for converting strings to Booleans?

Yes, it is a trivial question. I was just wondering. Does the framework have a helper function that does something like this: switch (value) { case "true": return true; case "false": return false; default: return Boolean(value); } ...

Issue trying to get a example Parsley app working

I'm getting started on a new project at I'm trying to get an Parsley example to work. Here is the demo url: http://files.152.org/flex_examples/parsley/ View source is enabled I have parsley registered in the app and can get the albums in the left column loaded. The part I'm stuck at is trying to get a message to PictureTile.as so images...

ActionScript 3: how to get the class by just having the name

hi, i am trying te recieve the class with only having the name of the class so example: var className:String = "TheClass"; var theClass = new className(); is this possible? ...

keep Ratio in full screen - Extract Ratio from a movie (mp4) flash player

Hi guys This is what i'm trying to do , get the Ratio 4:3 9:16 etc from an mp4 movie (h264) so when ill open it in fullscreen using a flash player / action script 3 it will still keep the ratio. regards ...

When to consolidate code duplicates

We're using a code static analysis tool (Sonar) to detect duplicate code on our project. It appears that there are a great many instances of duplicates in the code but most of them are less than 10 lines and occur only once. In the 'opinion' of the Stackoverflow community, Where should you draw the line at consolidating code duplications...

How to addCuePoint in as3 with netstream?? i do not want to use FLVPlayback component..

Hello. Is it possible to add cue points using as3 and I will not be using FLVPlayback component. I want my flv or netstream object to call a fucntion after 7 or 16 second or at any specified time during playing. i found addAsCuePoint the only way to do it. If there is any other way to accomplish this task then i will not be using cue...

Converting array of objects to array of arrays

Hi, I have a Array of objects which is something like this : SomeObject (Array) [0] (object) id = 1 name = 'one' [1] (object) id = 2 name = 'two' I need it to be An Array of arrays , something like this : someobject (array) [0](array) id = 1 name = 'one' [1](array) id = 2 name = 't...

Flex: Setting a style that is not suported by a component

Dear Friends, I am not very good in 'style' in flex. I am wondering if flex enforce style settings and throws compilation errors if a style that is applid to a component that is not supported by it. Has any one tried it before ? Please help me if you have any idea in this regard. Thanks in advance. ...

Update client status to server on "onbeforeunload" event

I have a flash application that needs to send a http request to the server which will disconnect the existing session immediately. I have a tried a few options but none is reliable. Option #1: On "onbeforeunload" event send a http request from inside the flash applications. Fallacy: This does not work because as soon as the browser is ...

Map with Advanced datagrid in flex

I had a map like Map** helloMethos() { } I need to display the values to the advanced datagrid with the Map. I had searched, Advanced Atagrid supports only list of Arraycollection to display the values in grid. is it Correct? Please help me out if am wrong. thanks Ravi ...

flashvars help, dymanically load an XML file

Hay, i have a flash movie which loads a static XML file, the script for this looks like list = "list.xml"; var listXml:XML = new XML(); listXml.ignoreWhite = true; listXml.load(list); I want to be able to change this 'list' variable dynamically, perhaps using flashVars. like this var flashvars = { xmlpath: "list.xml" }; Any i...

Flex: Can List be used to display control in equally sized tiles

Dear Friends, In one of the application I am working, List has been used. I am required to display items in the form of tiles. I do not want to change the component as of now. Is there any way to achieve this layout in list only. Please let me know if you have any idea in this regard. Thanks in advance. ...

AS3 Performance: Many Arrays vs One Array + 'is'

I have quite alots of display objects to manage during runtime, so Im currently using Arrays to manage them. But the problem is I have few many types of displays objects(eg. Tile, Npc and Building) which are basically MovieClips linked to the library. Each display object plays different role where it will be checked on enter frame, a loo...

flex 3 : sorting date column in datagrid

How to sort date column in datagrid with date format of 'DD/MM/YY'. please give me sample. Thanks in advance ...

is it possible to export XML data from a swf file

is it possible to export XML data from a swf file thanks in advance ...

What's the AS3 equivalent for MovieClip.CreateEmptyMovieClip?

I have some older AS2-style Haxe code which uses flash.Lib.Current.CreateEmptyMovieClip() to create a slideshow of disk-based images. It creates a new clip for holding each image and simply fades each image in and out with alpha levels. Compiling it with -swf -swf-version 8 creates an SWF file fine and this works in the browser. Howeve...