actionscript-3

AS3: Compare Two Arrays, Get Uncommon Values

I have a simple problem that I'm having trouble thinking around: var oldValues : Array = [ 4, 5, 6 ]; var newValues : Array = [ 3, 4, 6, 7 ]; I want to get the values from newValues that aren't in oldValues - 3, 7 I want to get the values from oldValues that aren't in newValues - 5 A way of getting both sets of values together would ...

LocalConnection working in local browser but NOT in remote site

Really puzzled by the flaky behavior of LocalConnection. Using a debug utility(LuminicBox) that uses localConnection to work. When the page containing the swf is loaded in a browser locally , localConnection works. When the identical page and swf are viewed 'live' on a remote site, localConnection fails. Anyone encounter this?? ...

Synchronize the Playing of Multiple Video Files in Flash AS3

Hello, I would like to have one controller to sync and control multiple video objects(start/stop simultaneously). Is this possible? ...

Adobe Flex: Why do I get intermittent SecurityErrorEvents on some browsers?

Hi everyone, Our flex app talks back to its originating server over a TCP-socket connection. This requires an allowance from the server in question and thus we've set up a socket policy server at the host (source code at pastie.org/791060). This has worked fine on many permutations of Firefox, Safari, Windows and Mac OS X, but then yes...

there is a way I can bind a flex property to a flash property??

Hi, I'm wondering if there is a way I can bind a flex property to flash property?, the flash property is inside a swc file created in flash with the Flex Component Kit for Flash Professional, I can manipulate the flash component as a regular flex component, but I want to bind their properties, is there a way?? thanks!! ...

as3, function active after 3 seconds

Hi, I have 2 functions going in as3: function blueDownBounce (e:MouseEvent):void { var blueDownY:Tween = new Tween(blue, "y", Regular.easeOut, -49, -19, 1, true); } blue.addEventListener(MouseEvent.MOUSE_OVER, blueDownBounce); function blueUpBounce (e:MouseEvent):void { var blueUpY:Tween = new Tween(blue, "y", Bounce.easeOut, ...

AS3 unloading swfs loaded with Loader::load()

Hi folks, I'm using Loader::load() successfully to load swfs into my main swf and then I add them as a child of a Sprite. When other events occur I want to remove the swfs as needed. I have looked at unload() and at removeChildAt() without success. I only added the addChild() call to try to pin down the loaded instance so I could ...

as3 tween position relative to current position

Hey, I have a tween set on a timer: var manTimer:Timer = new Timer(1000,14); manTimer.addEventListener(TimerEvent.TIMER, moveMan); function moveMan(e:TimerEvent):void { var manX:Tween = new Tween(man, "x", Regular.easeOut, 0, -40, 1, true); } I just need to make the tween's position relative to it's current position, as opposed t...

as3 conidtional statement not working

Hey, In my code here: var manTimer:Timer = new Timer(1700,5); manTimer.addEventListener(TimerEvent.TIMER, moveMan); function moveMan(e:TimerEvent):void { var manX:Tween = new Tween(man, "x", Regular.easeIn, man.x, man.x - 100, 1.5, true); } function startMan(e:MouseEvent):void { manTimer.start(); var manX:Tween = new Tween...

Flex Matrix rotate Image n degrees

How can I rotate an Image eg. 180 degrees clockwise using the Matrix I can use the following code to rotate the image 90 degrees, but it is incremental, meaing var matrix:Matrix = new Matrix(); matrix.rotate(Math.PI/2); matrix.tx = imgControl.content.height; var bitmapData:BitmapData = new BitmapData(imgControl.content.height, imgCo...

Duplicating an imported graphic in Flash

I'm loading a graphic via the Loader Class. Now I need to use it both as the original image and a thumbnail of that image. Alas, there is no "duplicateMovieClip" or anything like that in AS3 If I addChild it to the normal view and then to the thumbnail only the thumbnail is shown and vice versa. I google for this and found several solu...

Box2D in Flash runs quicker when drawing debug data than not

I've created a small game with Box2d for AS3 - I have sprites attached to the stage that take their position from the underlying Box2d world. These sprites are mostly PNGs. When the game runs with DrawDebugData() bening called every update, it runs nice and smoothly. However when I comment this out, it runs choppily. In both cases all m...

As3 reading xml, creating objects and storing them in an array

Hi, I have a xml with the following structure: <NODES> <NODE> <NAME> </NAME> <IMG> </IMG> </NODE> <NODE> <NAME> </NAME> <IMG> </IMG> </NODE> </NODES> And im getting it into flash as so: var loader:URLLoader = new URLLoader(); ...

Resizable MovieClip Component?

Hi, I was wondering if any one can be kind and help me, I was looking on google about a class or component in as3 that allow me to load an assets like a swf or image an give me so sort of handlers to change the size of the asset loaded, you know like in flash when you want change the size of a symbol you have a little squares handlers th...

Get Current Browser URL - ActionScript 3

Hello, I'm trying to get current browser url. already tryed with External Call, and didn't work... And with loaderInfo.url i receive the current SWF url. Thansk ...

starting with flex - please let me know if the direction is right (ActionScript vs MXML separation)

Hi, I've just started learning flex using OReilly "Programming Flex 3.0". After completing three chapters and starting fourth (ActionScript), and not having enough patience to wait till completing chapter 22 I started to practice :) One bit that I have most worries about right now is the the dual coding mode (MXML vs ActionScript) P...

How to enable html content on top of flash content without using the "transparent" wmode parameter or how to optimize framerate when using the "transparent" wmode parameter for a flash object?

I'm developing a Flash application which is communicating with Javascript to allow more features such as custom html input etc., by placing an absolute positioned div on top of the flash application and controlling it's position etc. with Flash & Javascript. Because these html elements have to appear above the flash content, I figured ...

Problems with playing a sound in AS3 from a page that is not in the same directory as the SWF?

Hey Overflow. Long time listener, first time caller. So here's what I've got: I'm trying to create a sound player in Flash/AS3 that will take an external MP3, load it in, and play it with Sound(). Your typical music player, nothing super fancy. The problem is that it works and everything, just fine, throws no errors... until I link it ...

Where we can get Adobe® Stratus 2 examples on "Swarming", Live Application-Level Multicast, Distributed Data Storage?

When and where will see (ore already can get) Adobe® Stratus 2 examples (with source) on "Swarming", Live Application-Level Multicast, Distributed Data Storage? ...

As3 Errors 1046 type not found if I specify a document class

Hello. In my as3 code using Flash cs3, everything works fine without any document class. I can use event handlers and they work. But, once I attach a document class, I start to get this error: 1046: Type was not found or was not a compile-time constant: KeyboardEvent. Could somebody explain why this occurs? This is what my document cla...