actionscript-3

Why i get this error

I have a png image on Library that i have declared it via Properties as Background class which extends BitmapData. When i type: var BMDClass:Class = getDefinitionByName( "Background" ) as Class; i get: variable Background is not defined!! But when i do: trace( getQualifiedClassName( new Background(0,0) ) ); i get: Background ...

Making folder simulation in actionscript 3

Is there a program/method to use with actionscript-3 in order to make a virtual folder hierarchy that contains my images and sounds and traverse it at runtime in order to select what to load on the SWF? ...

How to make a Flash Video start playing on MouseOver, and stop on MouseOut

I'm wondering how I can make a Flash start playing a video on MouseOver, and stop playing on MouseOut. ...

Flex/Actionscript - capturing canvas bitmap with dynamically placed elements.

I'm attempting to find overlap between elements on a flex canvas, an adaptation of http://www.gskinner.com/blog/archives/2005/08/flash_8_shape_b.html The attempt here is to place some text and figure overlap with previously placed text. The simple example below illustrates the problem. Both ImageSnapshot.captureBitmapData(canvas); o...

Is it possible to turn a string into a reference to an object?

I'm wondering, and hoping, if I can access and use a specific instance of an object if I only have the name of the object instance in a string? The code below perhaps explains it a littler better. public function myFunction(){ var myArbItem:mcArbItem = new mcArbItem(); //mcSomeItem has another movieclip on it called 'itemLogo' ...

Create a Graph from points in a Grid that contains holes

I've got a continuous plane (2-D) containing polygonal obstacles. I am uniformly sampling the plane at discrete positions to create a uniform grid of points. The grid does not have points where obstacles lie (i.e. holes where ever an obstacle is) as shown in the image below. (Please view the image at http://i48.tinypic.com/2efnblg.png f...

How can I call an AMF service using Flex and get back an MP3?

My flex 3.5 application has an audio player whose content is accessed by calling an AMF service to get the mp3 data. As far as I can tell, flash.media.Sound is initialized with a URLRequest, so it's not clear to me how I can provide it with data using my RemoteObject. I want to do one of the following things: Provide data to the Sound...

Cropping/Clipping A Sprite

How is cropping/clipping accomplished on a Sprite in Flex? <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="Init()"> <mx:Script> <![CDATA[ public function Init():void { var spr:Sprite=new Sprite(); uic.addChild(spr); ...

Best way to display a custom map in Flash (AS3) ?

I'm trying to take a game map and put it into say Google Maps or Bing Maps or whatever is best for my Flash app. I've tried the Google Maps API but it has some limitations in Flash and I can't seem to find a tile cutter that doesn't mangle the base tiles with compression. Thanks! ...

how to navigate from one mxml to another mxml in flex3

suppose i have 3 buttons(for example say, productin, marketing, sales ) on my main.mxml.. once i click on one button it should take me to abc.mxml page with production data, once again if i click on second button it should take me to the same abc.mxml but with marketing data. same as for 3rd button also, how can i achieve this ? ...

How can i do chroma keying in flex/actionscript

I need to develop a flex component which can take two videos and mix them using chroma keying. Is there library support in adobe flex for chroma keying. How can i get it done . Is there a sample code snippet for reference ...

flex contextmenu component reference

I have a DataGrid with a custom itemRenderer(Canvas) which has a context menu on its right click. I am trying to get the data of the itemRenderer. I tried to find something in event & variables. I also tried with FlexNativeMenu on RIGHT_MOUSE_CLICK. But I didn't find any way out. Please help me in getting the data of the itemrenderer ...

Flex PopupManager Issue

I have been working with pop-up manager lately and have an inconsistency issue. This is created at application level, and then various levels are added to the application requiring the pop-up to be brought to the front. roughly 1 in 5 times the grayish haze will appear (which renders the application unusable) as with any pop-ups, b...

How do I read all images from a folder with as3 for a slideshow

I would like to display all images from a folder in a slideshow without having to specify every file name specifically using CS4 - AS3. ...

How to set focus to a TLFTextfield object.

I have been trying to understand why it will not work for me. Im working on the timeline in FLASH CS5. ...

Is is possible to add member variables to objects at runtime in Actionscript 3?

I have an object of type sprite. I would like to add a new field in the sprite object without deriving the class. I'm not sure is possible. I tried to do object.newField = 'value'; but it's not working. I need it because the Api expect that field in the sprite class. ...

ActionScript ternary operator

in action script str is string var str=(some condition)?" store true":"store false"; when i alert the str am not getting any message .....why am not getting code: [Bindable] public var errVarMsg:String ; errVarMsg=""; errVarMsg=(minfee<=maxfee)?"":"fee min > max\n"; Alert.show(errVarMsg); ...

How get how many video (in seconds) is buffered from MP4 file (Flash, AS3)

Good day! I can get which part of file in bytes is loaded using netstream.bytesLoaded, netstream.bytesTotal, I can get the current playing position using netstream.time. But I want to know how many seconds of video are already loaded (not the length of buffer, which remains constant). The loaded size in bytes is not directly proportio...

Define's in Action script

I'm trying to pass a build number from Hudson into a Flex application. I've found Adobe's document (http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html) on conditional compilation which seems it should solve it but i must be missing something. So in my ant build file i have:- <mxmlc file="${app.dir}/${app...

other ways of getting instances besides getChildByName()

I have many MovieClips and each has a name like "mcDummyClosed" and then and instance name "slideDummyClosed". Another MovieClip has a link to e.g. slideDummyClosed which I then call DummyClosed. I add a MouseEvent.CLICK event to DummyClosed. Now without adding slideDummyClosed to the stage nor any other MovieClip can I with a string co...