actionscript-3

Color detection in AS3 possible?

Hey, i was wondering what do the AS3 experts would do to detect a color with the webcam (red) and draw a sprite on those color boundaries. Thanks in advance. ...

AIR nativeprocess performance

Is AIR nativeprocess able to receive message from Java program and process every line of message as fast as possible in milliseconds? Does it has a miss read or delay? ...

Set the variables only once on Actionscript 3 game?

Hello I'm trying to create a simple game. I've set up a layer "actionscript", where I put all the code in. Then I have a image, instance name is "player". Here's my code: stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyDown); var power = 5; var friction = 0.95; var xspeed = 0; var yspeed = 0; function KeyDown(keyEvent:KeyboardEvent...

Textmate + Actionscript 3 - Load custom flex compiler config

Hello, I need to load a custom compiler config when compiling my project with textmate (as3 project) How can i do this? ...

AS3 remove MC from dynamic path reference with removeChild

I'm not even sure if the title reflects what I want to do. Here's backstory. I have a movieclip with 5 'holder' movieclips in them. They are my containers for dynamically added movieclips. The parent containers has an instance name of pyramid, the holder instance names are labeled after the 6 food groups, i.e., 'grainholder', 'fruithol...

AS3 trace, specially errors message to a textbox

I'd like to be able to redirect the traces, and even more then traces the flash error reports to a text-box inside my flash app, so I can see the bug report in a computer that doesn't have flash-player debugger version or flashbug installed. Any error message that comes on in my app should show in this textbox. How can I do this? ...

How to increment a global variable inside a function ???

The variable currentIndex is declared globally and initialized with a certain value say '0'. How do I hold the value of currentIndex which is incremented every time the function is called? In the given code, every time the function is called, the value is reinitialized. function nextSong(e:Event):void { sc.stop(); currentInd...

How to trigger a function only once in case of a mouseEvent ...

I am trying to make a simple mp3 player using flash. The songs are loaded using an XML file which contains the song list. I have "play" button with the instance name "PlayBtn". I have an actionscript file named "playctrl", the content of which are listed below: package classes { import flash.media.Sound; import flash.media.Sound...

Populating textbox using flex

In the below code.If buttom 'A' is pressed the text box should be populated with A, and if button 'B' is pressed it should be populated with B and so on.. Can this be done.Also if any one could point me to flex examples would be much helpful.Thanks.. s='A'; for(i=0;i<button.length;i++) {...

what are the advantages of using mxml over actionscript in a flex application?

they both seem to accomplish the same things with different syntax, whats the point of using two different technologies. Please highlight every possible benefit of using mxml. Also are there scenarios when one is more beneficial than the other and why. Please clarify this runtime behavior of mxml vs AS3 as discussed in Oreilly Flex 4 Co...

ActionScript - Tween With Zero Duration?

i have a tween function which fades in a display object over time. when i set my tween duration to 0 nothing happens. isn't the tween suppose to animate in 0 seconds (or frames) to emulate no animation at all? new Tween(this, "alpha", None.easeOut, 0.0, 1.0, 0, true); ...

Incrementing a global variable in a function which is called multiple times ...

I am trying to make a simple mp3 player using flash. The songs are loaded using an XML file which contains the song list. The following code is inserted into a new keyframe. import flash.media.Sound; import flash.media.SoundChannel; import flash.events.*; import flash.events.MouseEvent; import flash.net.URLRequest; import flash.xml.*;...

What do you think about NResponder?

Hi, I was on the point of start using AS3 Signals for my new project because Native Events has a bad reputation, and then I found this: http://code.google.com/p/nineveh-responder/ But I couldn't find more information (in addition to official docs and tuts). What do you think about NResponder? OT: I can't create the tag "NResponder" in ...

Make flash-movie full browser size?

Hey I'm trying to create a small flash-app, which needs to run as big as possible on the browser. For example regexr and Grooveshark work this way. However, if I use the File -> Publish Settings and there set the width and height 100%, it resizes to full browser, but... When I use stageHeight and stageWidth, they don't change. I only h...

Need an easy example of actionscript 3 and facebook API integration

Hello guys, im programmer in PHP, AS2, AS3 and others, i want to develop a flash application for facebook, i know a litle bit about how to start with the API configuration and that kind of thinks, i know how to integrate PHP scripts with flash (but in AS2). So, i cant find a good (and simple) example of an app made in flash (AS3) who in...

How to add scripts (AS3) to a project ???

I am using Adobe Flash CS3 with Actionscript 3.0. What are the different ways to add scripts to a project except adding the script to a new keyframe? ...

interested in zeroMQ but client binding options prove limiting

Hi, This is related to an earlier question I had asked about what sort of middleware one can use for developing a client/server app. Among the options suggested, I was intrigued by zeroMQ and its capabilities. Since morning, I have been researching on using zeroMQ for my application. However, since my client is a Adobe AIR/FLEX, I see...