actionscript-3

Connecting a socket through a Proxy in ActionScript 3

1) How would I connect through a proxy if I am using the Socket class to connect to a server? 2) If I am running my Flex application through Flash Player in a webbrowser and my webbrowser is configured to use a proxy, does the socket connection go through the proxy automatically? Ideally, I would like to not have to depend on the web b...

Resizing HBox width to fit content

I have an HBox with a fixed Width and Height and a Border. In that HBox I have a viewStack with a few different views. When the viewStack changes views, I want the HBox container to keep resizing to its content. Currently it stays at the fixed width. Is there any way to do that with an HBox setting? ...

How do I paper-doll my moveclip in AS3?

I'm new to flash and so far it's been going good until now. I'm having a hard time solving this problem: I'm making a game using flash CS4 and AS3. I want to be able to draw my "Hero" (movie clip) and then once my hero picks up a clothing piece in the game I want to be able to paper-doll (put on) that clothing (graphic). So what I wou...

Store variable in Movieclip or Sprite

How can you add data to a dynamically created MovieClip/Sprite so that the data can be accessed later on an event coordinating to that MovieClip/Sprite? Example Code: for(var i:int; i < xml.children(); i++){ var button:MovieClip = new MovieClip(); button.graphics.beginFill(0x000000); button.graphics.drawCircle(100 + 20 * i...

Transparent swf not receiving mouse events in internet explorer

Hi, I'm embedding a flash swf into an html page and setting wmode=transparent. I need this flash movie to still receive mouse over events. In Opera, Safari, Chrome and Firefox this works fine, the html background shows through, and the flash mouse over events are still received. (Sprites react to mouse) In Internet Explorer however, th...

Silverlight 3 (C#) VS Flash 10 ( AS 3)

Hello , i have few questions about FLASH 10 and Silverlight and what should i choose 1) which is lighter ? ( CPU consumption , loading times , speed of executing things etc .. ) 2) which has richer capabilities ( API-s , libraries etc.. ) 3) faster for developing ? 4) what about media handling ( audio/video streaming ) ? 5) d...

Strategy for making LocalConnection ids unique

I'm using a localconnection to allow communication between an actionscript 2 swf and an actionscript 3 swf. Localconnection objects share a global namespace across a user's pc. So, this means, a user can fire up my flash app in one browser, and submit commands, back and forth, which is what i want. But the user can also fire up another ...

How do you do "bouncing" collision detection with Actionscript 3.0? (With Video)

Well first off I'm surprised actionscript 3.0 doesnt have pixel-based collision detection. Anyways I'm using a collision library found here (I'm willing to pick another library if needed) I recorded a video to better show what I'm trying to do, in short I'm making a side scrolling game (like mario) and I want my ground (floor) to act ...

Optimize rendering in ActionScript 3

Hi, I am working on parallax animation(something like - flordearagua.com) which consist 7-10 layers of quite large(1500x800) bitmaps and MovieClips. To archieve parallax, I wrote code to move all layer at different speed which again depends on some parameters like mouse position and acceleration. All upto this working fine. I want to m...

ActionScript 3 MovieClip class linkage

Hi, I'm simply playing around with basic ActionScript 3 using Flash CS3 Pro. I put in a keyframe this very simple code to duplicate n "brander" symbols: for (var i:Number=0; i<20; i++) { var m = new brander("MS_"+i); addChild(m); m.name = "MS_"+i; m.x = 20*i; m.alpha = a; a-=0.05; m.y = 20; } The symbol is...

Rewrite URL-string with String.replace in Actionscript 3

Hello, I'm getting a string that looks like this from a database: ~\Uploads\Tree.jpg And I would like to change it in Actionscript3 to Uploads/Tree.jpg Any idea how I can do this in neat way? ...

as3 loading architecture

Hello I have a large application that needs to ensure that various items are loaded (at different times, not just at startup) before calling other routines that depend on said loaded items. What i find problematic is how my architecture ends up looking to support this: it is either littered with callbacks (and nested callbacks!), or pre...

Actionscript 3: Monitoring the activity level for multiple Microphones doesn't seem to work.

For a project I want to show all available webcams and microphones, so that the user can easily select whichever webcam/microphone combination they prefer. I run into an issue with the microphones listing though. Each microphone is listed with an activity animation and it's name. I am able to list all Microphones just fine (using the Mi...

Flex AS3 DNS lookup

Can a DNS lookup be made with AS3? ...

How to build a ~500 page Flash site

I am about to embark on building a Flash site with approximately 500 pages. The site is an interactive learning type of system, with about 10 "chapters" each containing around 50 "pages". Each page has some sort of animation and interactivity, for example the user might have to decide whether a statement is true or false by clicking on ...

How do I import a library in flash which lies in a higher directory than my .fla

I have a directory structure as follows: Projects -> Libraries -> Box2d -> Collision-> Common -> etc... PlaneGame -> PlaneGame.fla main.as Now I wish to import classes from Box2d but I cannot figure out how to do "up one level" which would be done like "../../something.example" in another language. How can I include classes ...

Profiling ActionScript-3 Code

Is there any way or tool available that can profile AS3 code without using Flex? How can I profile existing project written in Flash CS3 and AS3? ...

Detecting Memory Leaks in ActionScript-3 Project.

Hi! Is there any way to detect memory leaks in Flash ActionScript-3 project? what are the easier ways to achieve this in existing project ? ...

When building custom panels for Flash CS4 IDE, is there a way to attach callbacks to workspace events?

Is there a way for a custom panel for Flash CS4 to register for IDE events? I've built a custom panel for the CS4 IDE, and now I'd like to get a callback anytime the current selection on the stage changes. Is this possible? My backup plan is to have my panel poll the IDE for the selected object several times a second, but this is weak...

getElementById equivalent in Actionscript?

I want to dynamically access a bunch of objects in my mxml. I can construct their name/id. In Javascript I can do "getElementById(ID)" to get the object. How can I do this in Actionscript? I really can't do getChildByName because it is too cumbersome: I have access to object A, which has a child B, which has a child C, which have the c...