actionscript-3

actionscript: change a sublcass variable from the superclass

This is basically the opposite of what I was trying to do earlier. I just need to know how to change a subclass variable from it's superclass. So if I were to make an object in a class how would I dynamically change a variable in that object from the original class that I made it in? Suppose this is the main function of my main class: ...

Loading assets from external swf

I'v been searching online for 5 hours, trying every example I see now. I simply can't take it anymore. The task is seemingly simple, but in application is next to impossible from my experience. I am trying to load assets from an external swf. As in: I drew a square in flash Made it into a symbol made sure to check the "Extract for Act...

How to adjust numToChar to support any key (AS3)

I have a flash conversion function that I call like this: var key:String=numToChar(keyboardEvent.charCode); currently the function (see below) supports limited US character set, how to enhance this function as much as possible easily without hardcoding? I want to make the function to support all standard western keycodes (available...

I need a way out

public class NCell { private var _player: NPlayer; public function set player(value: NPlayer):void { this._player = value; } public function get player():NPlayer {return this._player} } public class NPlayer { private var _cell: NCell; public function set cell(value: NCell):void { if (this....

How to block Actionscript 3.0 embedded YouTube videos ads?

Hi, I follow this steps and manage to play videos on my flash movie, http://code.google.com/apis/youtube/flash_api_reference.html Now I wonder if is possible to block the ads? any help will be much appreciated Cheers ...

how to calculate the xmldata?

Hi, i'm getting the xmldata from the httpservice (using cgi) and i have not set resultformat(it is coming as an object only),the xml data in this format <root> <employee name="xxx" age="xx" gender="xxx"/> <employee name="xxx" age="xx" gender="xxx"/> <employee name="xxx" age="xx" gender="xxx"/> </root> when i was tried to count the emplo...

How to call "this" from an anoymous method?(flex, as)

Hi: This is my code: public function setPaneContent(names : Array, parent : AbstractPane) : void { //.... okButton.addEventListener(MouseEvent.CLICK, function okMouseClickHandler(e : Event) : void { parent.addNewPane(valuesPane, parent); PopUpManager.removePopUp(/*need to put "this"*/); ...

action script 3.0 a string variable that should have only number.

in action script var x:String="123abc" i have to check any character is there in that string i.e here abc is that string so i give alert that ....i was trying to say that a string variable but that can contain only numbers ...

Setting a default skin for a custom component in Flex 4

How do you set the default value of skinClass for a custom component in Flex? I've extended the DropDownList with my custom component, but I would like to specify a default skin to go with it instead of always setting the skinClass value for each instance. ...

embedding flash using AC_FL_RunContent slighlty crops flash in IE8 only

Hi Has anyone encountered a bug when using AC_FL_RunConten to embed flash? In IE8 it seems that the flash is slightly cropped on all 4 sides. Is there a known workaround? ...

Compiling with mxmlc vs Flash

I have some ActionScript code that I got from some website. I've tried to compile the code and it seems to have compiled with no errors. However, it doesn't work as expected and I am wondering how I can debug this? It seems that the website uses Flash to compile it because there's a .fla file located as well. Does anyone have any idea?...

Flex AsyncToken implementation on Rails

Hi there, i'm using a Rails backend with my App and getting a AsyncToken returned from it (a DB-Call to be specific) As far as i know the AsyncToken returns a result event when done loading all data from the request, this way its possible to make sure all data was loaded before executing some function which uses the data. i tried the ...

XML, TypeError: Error #1088: The markup in...

Hey all, Can anyone see whats wrong with either the code to grab the XML or the XML file itself? It looks well formed to me and I don't see the cause of the error: A TypeError has occured: TypeError: Error #1088: The markup in the document following the root element must be well-formed. var file:String = 'config.xml'; var...

Loading issue thumbnails

I'm having issue while loading thumbnail, I set an interval of time for each thumb to load on stage. Some of them can't load sequential in order, they are missing, are lagging... Actually, I set a preloader to the file size but since I load dynamically from XML, file size is smaller. Does anyone know a solution to solve that issue? It'...

Using flash.ui.Mouse inside a class named Mouse, possible?

Hey all, I have a class called Mouse (tracking button states in a game). I want that class to be able to show and hide the mouse cursor. Whenever I try to use flash.ui.Mouse.show() or flash.ui.Mouse.hide() I get the error: "Access of undefined property flash.". I can't import flash.ui.Mouse for obvious reasons. Is there a way to mak...

How to get local symbol coordinates from actionscript?

I have a symbol originally created at [-100,-100] coordinate (left top corner). Now I put an instance of this symbol on a stage at [0,0] stage coordinates (by dragging it with a mouse in IDE). Having this instance can I still determine original [-100,-100] position from actionscript somehow? (myInstance.x returns stage coordinate). What...

Flex - sorting a datagrid column by the row's label

I'm creating a table that displays information from a MySQL database, I'm using foreignkeys all over the place to cross-reference data. Basically I have a datagrid with a column named 'system.' The system is an int that represents the id of an object in another table. I've used lableFunction to cross-reference the two and rename the co...

Shared Whiteboard with AS3. Code

I am building a shared whiteboard and I cannot get the shared whiteboard to be shared. I have successfully created a shared method and I see the shared object in the Admin Console that it is there and connected but can't see the drawing on a different browser. I am posting the entire actionscript code. Please help me if you can. Will be ...

define a class implements ICollectionView, which can use as ComboBox or DataGrid's dataProvider(not build-in class)

recently, I research for the collection framework, and find LinkedSet(AS3Commons collection framework,it is a good opensource framework) written in ActionScript, but it can't use as dataProvider in ComboBox or DataGrid, because only implements ICollectionView can use as dataProvider. So I want to try if a class implements ICollectionVie...

On 'this' keyword inside the closure

I know 'this' differs outside and inside of the closure. But why numChildren and this.numChildren differs inside the closure? Or why numChildren is same outside and inside? var _this:Sprite = this; trace("[outside]this: " + this); trace("[outside]numChildren: " + numChildren); trace("[outside]this.numChildren: " + this.numChildren); (...