actionscript-3

How to tell when the main swf gets fully loaded?

Hi, as I learned the hard way, Flash streams your .swf, that is, it can start playing back the file even if only the first couple of frames are loaded. Normally, when loading an external .swf you would just register a handler to the COMPLETE event of the Loader or URLLoader class and that would be it. Example (exception handling, etc....

Group for Array

Possible to group multiple MC and post it in an Array? exp: array([mc1,mc2,mc3],[ac1],[bc1,b2]) If its possible how could it be achieve in a for...loop function? ...

Emulating Mouse Event AS3

I have a project that involves polling a hardware switch each update and converting its states to a custom events: ToggleSwitchEvent.BackWardButtonDown ToggleSwitchEvent.BackWardButtonUp ToggleSwitchEvent.Click etc .... The hardware switch acts similar to a two button mouse. So I would like to be able to "inject" the custom ToggleSwit...

setting text to flash dynamic text fields from asp

how can I set the text of dynamic text field from the asp page that loads .SWF file ? ...

Pass an ID from main swf to child swf

Hello Friends, I have a main movie clip that loads the appropriate swfs based on the button click. The buttons and the corresponding swfs are loaded through XML. The method I adapted to achieve this can be found here : Sample Code Now, this seems to be working just fine. But, my problem is instead, of calling a separate SWF for each bu...

Add multiple movieclips, not replacing the old ones.

So, in short, my problem is this. I am using a variable which is a movieclip loaded from an external swf. I want to "spawn" multiple instances of the movieclip that all react to the same code, so for example if I say var1.x = 100, they all are at 100x. But my problem is when I run addChild(var1) multiple times(I'm not actually typing in ...

Flash AS3 Tweelite and XML Issue

I have a two frame Flash CS3 animation. On the first frame, I am (successfully) loading four images onto the frame, and rotating through them (successfully) using TweenLite. When the user clicks on a button, a variable (resumeVideoOn) is set to indicate the current image that the user was looking at, and they are taken to frame2 which p...

Writing Local SharedObject in AS3 swf and reading it in loaded AS2 swf

I am trying to share data between an as3 swf and a as2 swf that it loaded. The problem is, I can't seem to get my as2 swf to read the localshared object written by the as3 swf. It simply returns undefined when I try to get a reference to the shared object // AS3 _SharedObj.objectEncoding = ObjectEncoding.AMF0; _SharedObj.data.blah = 's...

Switching Views in Actionscript 3.0 using MVC

Hello, I am working on a Flash/AS3.0 app that I want to use MVC on. The question I have is who is responisble for adding/removing views from the stage? Most examples I find have the doc class add the view, but I haven't seen an example for who notifies the doc class to remove the view. The structure of the app is one screen that sho...

Is it possible to assemble a dynamic movieclip timeline with ActionScript 3?

Basically i'm just trying to create a high-performance AnimatedBitmap Class. I have investigated some Sprite-based AnimatedBitmap classes out there that use timers and some variation of BitmapData.copyPixels() or BitmapData.draw(), but these don't seem to be as fast as simply staggering the assets on a MovieClip timeline and letting the ...

Detect Mouse leave stage while dragging in Actionscript 3

Event.MOUSE_LEAVE is great in Actionscript 3, but it doesn't seem to fire if the user is holding their left (or right for that matter) mouse button down. Is there a way to detect if the mouse leaves the Flash movie while the mouse is held down? Or if it is released outside the flash movie? ...

Do custom Event type identifiers in as3 need to be unique?

Say I have two classes which extend Event: public class CustomEventOne extends Event { public static const EVENT_TYPE_ONE:String = "click"; //... rest of custom event and public class CustomEventTwo extends Event { public static const EVENT_TYPE_TWO:String = "click"; //... rest of custom event Is it ok that they...

Why do components in Flash CS3 fail so hard when loaded with a Loader.

The ComboBox shows up fine when I run a SWF by itself. The rowCount property set in the property inspector works just fine; the dataProvider property populates the box just fine; everything works fine. HOWEVER, when I load that SWF into a parent SWF with the Loader class, everything goes to hell. The ComboBox shows up empty. All the ...

Intro me source on Flash Actionscript 3.0 communicating with ASP.net

As title, any books, tutorials, site that you guys recommend to me on how could AS3 can communicate with ASP.net. ...

Flex: Difference between defining sprite's x, y coordinates, and painting object in some location

I have a task: I need to place about 100 sprites on one canvas (with prepared grid on it). I need to place them as invisible (circles) stones, on the board, and make visible only on mouseover. The problem I come across is following, I can't place those objects accurately into the nodes on the grid. E.g. if I define stones (it's just...

How can I send messages from Red5 to my Flash AS3 App?

I'm a bit confused. I would like to send messages from my Red5 Server to my Flash App... but I don't find any information how to do that... Can anyone help me? ...

Custom (simple) AS3 Class code not executing entirely

Hi there, This problem is probably very simple to solve but it is not clear to me. It may simply be that I am doing something incorrectly. I have studied OOP and AS3 for quite a few hours so I am familiar with the concepts but not the flow. This is a project that I put together in order to reinforce what I have been studying. The goal ...

Securely Connect MySQL via PHP in ActionScript 3 using AMFPHP framework

My Flash movie would like communicate with MySQL server to fetch and save data between MySQL and SWF. I know AMFPHP can help with the communication, but is there a secure way to encrypt the texts sending between 2 sides (other than hashing password in MD5)? As far as I know, by default, AMFPHP sends out data in plain text. Also, I heard...

as3 flash getChildAt(0).someMethod access

I can do this getChildAt(0).alpha = 0; But this throws an error getChildAt(0).gotoAndStop(2); How do I access a movieclip's methods using the display list array? ...

Getting XML data from 3rd function?

I can I get the XML data from 3rd function? package { import flash.display.*; import flash.events.*; import flash.net.*; public class main extends MovieClip { private var myXML:XML; private var myXMLlist:XMLList; private var myLoader:URLLoader = new URLLoader(); public function main():void { loadData(); 3rdfunction(); } pri...