actionscript-3

bitmapdata record video

is there any sample on using array bitmapdata to record video from webcam and generate flash movieclip file? i want to record sound as well without using red5/flash streaming server ...

Watching a bindable property

In my flex app I have a public bindable property. I want it so that every time the value of that property changes, a function gets triggered. I tried using ChangeWatchers, but it seems those only apply to built-in components like a text box change. I would like to do that same behavior with a property that changes at runtime. ...

Adobe Flex - any way to automatically change font size to fit in its container?

I have a component in Flex, and part of that component is a label. Is there a way to automatically adjust the font size to fit into its container? ...

Flash: How to change a text fields' textFormat on the fly/per action in AS3?

Hi :) my question today is how to change a textFormat on a textfield. I have a textFormat that has white text and one that has green text, on a button rollover I need to swap that textFormat on my textField to one that has green text. The textFields are getting their .text data from an Array to complicate things... Arrays, Text Forma...

funny behaviour with tabNavigator

I have a tabNavigator in my flex app. I am using: tabNavigator.getTabAt(indx).y to get the y-position of each tab. For some odd reason the y-position comes out to be different for tabs that have visited by the user, as compared to un-visited ones. I am using a creationpolicy = "all" on the tabNavigator. Not sure why this is happening. An...

Actionscript 3 Date adds 1 month

Hi I'm having a problem setting a date in as3 here is the code i'm using var endDate = new Date(2009,9,10); trace (endDate); the trace statement always shows the date as 1 month further on the the date I have added eg 10th Oct 2009 instead of 10th september 2009 Is there a way around this? ...

Add movieclips (and controlling them) in a datagrid in AS3

I created a column in a datagrid which displays a movieclip (every row the same movieclip appears. How can I control which frame is displayed in each row? using this.parent from inside the movieclip doesn't work. What's the path to the specific row in which a movieclip resides? Thanks ...

IE refresh breaking Flash

I have isolated an issue I am having with Flash in IE7+ but don't know how to fix it. The issue is when you first go to the flash website in IE everything works fine, but when you refresh nothing appears. I am dynamically loadng in XML and have added the caching fix found here so I have eliminated that bug. What I have discovered is that...

Actionscript 3: make certain objects in child A appear above child B while others appear under child B

Imagine I have a background and I want to show the background under the player object. This can be done with ease: var player:Player = new Player(); addChild(player); var background:Background = new Background(); addChildAt(background, 0); However, imagine in this background I have transparent clouds which have to appear above the sh...

effcient Event dispatchinging in Actionscript 3

I have 6 instances of a moiveClip. when one is clicked, i need to write a function that affects all other instances of the movieClip, and not affect the one being clicked. What is the most efficient way of doing this? Im thinking something to do with event class for sure.aa ...

adobe air - Is there anyway to get OS open a file, their native applications?

In adobe air, is there anyway to get OS open a file, in their native applications? What about in Flex 4? ...

How much resources does an unremoved event listener consume?

Let's say I've got an event listener function that is listening for an event that will never be called again throughout the lifespan of the program. The listening object will never need to be garbage collected. How much memory does this use? If it's negligible, I'd rather not remove the listener because having the removeEventListener() ...

Flash Hates Me. Error #1009: Cannot access a property or method of a null object reference

I simply create a movie clip, put it on the stage and give it an instance name of char. Here's my document class, simple as can be: public class Test extends MovieClip { public function Test() { char.x = 1315; char.y = 459; addEventListener(Event.ENTER_FRAME, mouseListen); ...

Actionscript 3: Socket not keeping up

I have a program made with flash/ac3 that connects with a java server. Using the following code: socket.addEventListener(ProgressEvent.SOCKET_DATA, onReceive); The socket receives messages just fine, however, when I start to send a lot of messages after each other things go wrong. Even when I only print the message I receive at least ...

post fla to youtube

may i know is it possible to post fla file pro grammatically to youtube? can elaborate how? ...

Is it possible to intercept attribute getting/setting in ActionScript 3?

When developing in ActionScript 3, I often find myself looking for a way to achieve something similar to what is offered by python's __getattr__ / __setattr__ magic methods i.e. to be able to intercept attribute lookup on an instance, and do something custom. Is there some acceptable way to achieve this in ActionScript 3? In AS3 attrib...

Flex Error #1014: Class flash.net::NetStreamPlayOptions

I have a pure ActionScript project. I'm using Flex Builder on a Mac, Flex SDK 3.4 and I've even added the playerglobal.swc from the Flash folder to the project's library path. I get autocomplete when I add import flash.net.NetStreamPlayOptions; import flash.net.NetStreamPlayTransitions; But when I run the movie, I get: VerifyError: ...

as3 - controlling flicker when scaling up a button or movieclip

This is a situation I run into a lot but never seem to find a good solution. I have movieclips that I scale up slightly on rollover, but if you hover over the edge of the movieclip it just sits there and flickers, continuously receiving mouseOver and mouseOut events. How do you deal with this? Again, it's usually a problem when tweening ...

Having problem in using Timer

I am using a timer function in Flex but it gives me a run time error. my code looks like this: import flash.utils.Timer; public function fnname():void { if(x==150) { while (y==0) { x ++; Timer(100); } } } the error i get is: Error #1034: Type Coercion failed: cannot convert 100 to flash.utils.Timer...

How to know what class is referenced by a Class object?

We have the Class object (an object that reference a Class) so you can create objects from that Class object: var classObject:Class = package.to.class.AClass; var objectFromClass:AClass = new classObject(); Now, I want to know what object is referenced by classObject. For example: function Creator(classObject:Class):AClass { // h...