actionscript-3

How to pass a property to an event with a Button

I'm generating buttons dynamically that I want it to call a method like this: private function fetchTheDay(day:String):void { ... } But I wasn't sure how to make the button pass the string to it button.addEventListener(MouseEvent.CLICK,fetchTheDay); buttonVGroup.addElement(button); trying to do something like this didn...

ActionScript shiftKey Not Working In Full Screen Mode?

i've drawn an ellipse sprite and added it to the display list of a container, which is added to the display list of the stage. to move the sprites with the keyboard arrows, it appears that my shiftModifier:Number variable is not working when the stage's display state is set to full screen. shiftModifier works as it should when the stag...

Drawing outlines around organic shapes

One thing that seems particularly easy to do in the Flash IDE but difficult to do with code is to outline an organic shape. In the IDE you can just use the inkbucket tool to draw a stroke around something. Using nothing but code it seems much trickier. One method I've seen is to add a glow filter to the shape in question and just mess wi...

SWF only working in debug folder.

If I copy all the files from the debug folder and paste it somewhere it stops working gives me a sandbox error. ( I am not using any absolute paths) and everything seems to be fine in debug folder. Any Ideas? It's a actionscript project in flex builder. ...

Problems with listening for an event in child object in Actionscript

I have two classes. The first one (the starting class): package { import flash.display.Sprite; import flash.events.KeyboardEvent; import tetris.*; public class TetrisGame extends Sprite { private var _gameWell:Well; public function TetrisGame() { _gameWell = new Well(); addChild(_gameWell); } } } The second...

How should a programmer go about getting started with Flash/Flex/ActionScript?

What is the shortest path between zero (ie no flash related development software on my computer or information about where to obtain it or get started) to running a "hello world" ActionScript? I'm hoping for an answer that gives step by step instructions about exactly what software is needed to get started, an example of some "hello wor...

Flex: Why is line obscured by canvas' background

I want MyCanvas to draw lines on itself, but they seem to be drawn behind the background. What's going on and how should I do this? Main.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:my="*"> <my:MyCanvas width="300" height="300" id="myCanvas"></my:MyCanvas> <mx:Butto...

Why is TextFormat.size an object?

According to the ActionScript 3.0 documentation, the TextFormat classes size property is an Object. Why is this? Clearly this is a number! When I check its type (using typeOf()), it returns Number. So whats the deal? ...

Best tutorials or sites for Actionscript 3.

This is semi-redudant, but the other entries on here didn't yield anything. I know a bit of AS3, but only from copying segments and attempting to figure it out. Is there any online resources for going through from the beginning and UNDERSTANDING everything, allowing me to more creatively interpret and learn it? Anything is appreciated...

Positiong loaded object based on root stage instead of MC that is loaded from root.

I have a root stage, and a MC that is called from the root stage.Now from that MC, i will called in another MC2, and I wanted to placed the MC in the center of the stage. The reason I could not use normal ADDED_TO_STAGE at MC and define the center is because MC is not place in the exact position of the root stage (as in x, y=0). So if I ...

Issue changing the depth of an onscreen object through actionscript

Hi, Hi my designer made a fla file where he has animated layers loads of them. All the images inside those animations are loaded from outside the swf. Now, the issue is at one point in time I want some of the objects to go under another object ( current their on top) . If I do this visually the images inside the swf(loaded) are lost....

I have some questions about building an AIR app for use with a connected projector.

For an app I'm working on, I'd like to have a control panel window and a video output window to use for projecting video with an attached projector. I have built many Flash applications but this will be my first time using AIR so I have some questions. Is it possible to have two seperate windows as part of one AIR application? Can one ...

How to set focus and insert caret in an empty text field in AS3

stage.focus = textField; textField.setSelection(0,0); is not working for me. ...

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller error - AS

I have this code snippet inside a function that checks if an object exists on stage and removes it: public function closeContent(e:MouseEvent):void{ removeChild(txt); removeChild(ldr.content); removeChild(_closeButton); container_mc.visible = false; statusText.text=""; if (contains(submitButton)) { removeChild(submitButton);...

Open tab from TabNavigator with actionscript in flex

A short question: I've got a TabNavigator with multiple canvas children. How can i open one of the children with actions script (imagine it as a tab with an intro and after login the tab with content needs to be opened). I have tried this.parentDocument.tabs.selectedIndex(1); but that doesnt work. ...

Flash Photo Uploader - Take photo from web cam

Are there any examples of Flash + Javascript libraries which allow you to display a variable-sized Flash movie in your page that captures Webcam snapshots (still frames), and submits them to your server in a JPEG format? Currently I know of: jpegcam Thank you ...

Is there a way to use AS3's Sound Object methods on an FLV

I'm recording and playing back mic input using Flash Media Server, and even though it's just audio, we're saving the output as FLV. I'd like to get a waveform of the recorded audio. Ideally, since we already have a lot of saved/recorded audio, I'd like something that can take a loaded FLV and get the waveform, as opposed to generating it...

Papervision3D: mouseEnabled = false on DisplayObject3D

How do I make a DisplayObject3D have mouseEnabled = false. I have a Sprite behind the Papervision3D scene listening for mouse events and so i need to let it pick up those mouse events through some of the DisplayObject3D objects. I've tried adding the DisplayObject3D to a separate ViewportLayer and setting thats mouseEnabled to false bu...

Need help understand MVC implementation within Actionscript 3 AS3, please..

Hello Everyone, I am learning MVC implementation with ActionScript 3.0. So far, I have done alright but have couple of questions that can make this learning process very pleasant for me. I would highly appreciate your help and wisdom. Let me explain how I am implementing a simple MVC implementation: My Flash Movie is called FusionMVC....

flash cs4: change the look of a button after it's been pressed

Hi. I'm trying to create a top panel menu that contains 5 buttons. I configured Up and Over state for each button. how can I configure that one the button is clicked, the look of the button will change to the look i configured in Over state. Each state contains a different image. Is there a way to change the look of the button to t...