this["var"+"name"] in java
In AS3 I can write this["foo"] for acces to varible foo. I can construct any string in brackets. Is there a way to do this in Java? ...
In AS3 I can write this["foo"] for acces to varible foo. I can construct any string in brackets. Is there a way to do this in Java? ...
I am just trying to add a "Hello World" or a program that draw a circle to a brand new project in Flash Professional CS5. So the project file is has a .fla extension And I think the code is supposed to be added to the "action" of frame 1? But I don't see any place where I can open up a box to type in any code? How can that be done? ...
Need auto scroll when new message arrives. ...
I'm attempting to read a property on a series of Sprites. This property may or may not be present on these objects, and may not even be declared, worse than being null. My code is: if (child["readable"] == true){ // this Sprite is activated for reading } And so Flash shows me: Error #1069: Property selectable not found on fla...
Within the container "BubbleContainer" I have multiple "Bubble sprites". Each bubble's graphics object (a circle) is updated on a timer event. Let's say I have 50 Bubble sprites and each circle's radius should be updated with a mathematical formula. How do I organize this logic? How do I update all Bubble sprites within the BubbleCont...
The following is entirely a math question. As we know, PerspectiveProjection delivers perspective transformations in 3D represented by the interdependent values of fieldOfView and focalLength according to the following formula: focalLength = stageWidth/2 * (cos(fieldOfView/2) / sin(fieldOfView/2) Q: How to get the visible on-scree...
I don't know if this is too difficult or too easy. My custom component is trying to listen to the main application's state changes using StateChangeEvent.CURRENT_STATE_CHANGE, but it's reporting its own state changes. Any idea how I could do this? ...
Implementing google map in Flash cs4 seems very different in terms of its code used. How could I apply mouseevent to a marker? GEvent.addListener(marker, "mouseover", function() {markerClick()}); return marker; function markerClick():void { trace("You clicked the map."); } ...
Hello! I'm a design student currently dabbling with Arduino code (based on c/c++) and flash AS3. What I want to do is to be able to write a program with a voice control input. So, program prompts user to spell a word. The user spells out the word. The program recognizes if this is right, adds one to a score if it's correct, and correct...
For a CDROM i'm working on, i'm looking for a method to display images with a lightbox effect. What is the best way to do it with AS3? Is there an AS3 lightbox script available? ...
I am displaying some HTML text in an Adobe AIR Application that I do not want the user to be able to cut and paste. How do I make the HTML control disallow highlighting of the HTML without disabling the ScrollBars. mouseChildren=false works but disables the scrollbars which is unacceptable. Right now I have: <mx:HTML location...
I have a rectangle of any arbitrary width and height. I know X,Y, width, and height. How do I solve the upper right hand coordinates when the rectangle is rotated N degrees? I realized if it were axis aligned I would simply solve for (x,y+width). Unforunatly this doesn't hold true when I apply a transform matrix on the rectangle to rotat...
I have a difficult problem with a recursive function. Essentially I need to 'slow down' a for loop within a function that repeatedly calls itself(the function); Is this possible, or do I need to somehow extract the recursive nature of the function? function callRecursiveFuncAgain(ob:Object):void{ //do recursive stuff; for (var i...
I am loading one swf into another using the Loader class, but when the child swf finishes loading and is added to the display list, its Document Class is not instantiated. I have a few trace statements that should execute when the object is created, but nothing is happening when loaded into the parent SWF. When I compile the child SWF on...
I follow some sample code which uses trace("Hello World"); to print out something in ActionScript 3.0, in Flash Professional CS5. But nothing seems to get printed out (in a browser). Is the trace() function deprecated / removed? ...
I am trying to create a custom object in AS3 to pass information to and from a server, which in this case will be Red5. In the below screenshots you will see that I am able to send a request for an object from as3, and receive it successfully from the java server. However, when I try to cast the received object to my defined objectType...
I want to dynamically load .swf file in a player(like FLV player of as3) in as3.When I shall click on an image the corresponding video will be played on the player on right side(like you tube). Is there something (like FLV player) for .swf files with play, pause, resume, scrubber options to play in web? ...
I'm trying to mask an FLV with a PNG alpha channel. I'm using BitmapData (from a PNG) but it's not working. Is there anything I'm missing? Cut up code below: var musclesLoader:Loader = new Loader(); var musclesContainer:Sprite = new Sprite(); var musclesImage:Bitmap = new Bitmap(); var musclesBitmapData:BitmapData; var musclesVideo:Vid...
Hi all, I have a project i need to update form AS2 to AS3 as i need some of the new functions available for vertical centering of text. My current AS2 code on the time line is as follows. var dataField = _root.dataField; var dataType = _root.dataType; var dataPage = _root.dataPage; var dataVar = _root.dataVar; _root.mc.onRelease =...
For e.g. function showIt():void { something.visible = true; } function init():void { time1 = flash.utils.getTimer(); showIt(); time2 = flash.utils.getTimer(); } <mx:st id="something" visible="false"/> <mx:Button click="init()"/> In the above code, I want to measure the time taken to display st on screen. Is it enough to...