actionscript-3

How to dynamically load a progressive jpeg/jpg in actionscrip-3 using Flash and know it's width/height before it is fully loaded.

Hi, I am trying to dynamically load a progressive jpeg using actionscript 3. To do so, I have created a class called Progressiveloader that creates a URLStream and uses it to streamload the progressive jpeg bytes into a byteArray. Everytime the byteArray grows, I use a Loader to loadBytes the byteArray. This works, to some extent, becau...

Flex: Datagrid, break line in case of very long string

Hi, I am trying to implement simple chat application using flex. In it all my chat messages are stored as array collection items, where each item is a string (correspondent to one chat message). I am using datagrid to display all messages. One message goes to one cell of datagrid. Here how it looks: http://img.skitch.com/20091129-qt3g...

Requesting pages and reading results with Flash

I have a Flash object hosted on foo.com. When I run it, I want it to send a HTTP request to foo.com, and retrieve the results along with HTTP headers. How would one achieve this with Flash? (AS 3) ...

When a SWF is loaded into another. Can the main SWF read the loaded one to retrieve its contents and modify them?

Give this scenario: I have a cool graphic in Illustrator or Flash. The graphic represents a figure, with various elements inside, shapes, lines, gradients, etc. I export it to a swf file and I can view my nice graphic if I open it. I have a (pure) as3 application, which loads swfs. Then... Can I manipulate the contents of the loade...

How does Jaycut (online video editing tool) work?

Jaycut is a flash-based online video editing tool. It's surprisingly capable, what I'm wondering is how they achieve this in Flash/Flex. They allow mixing of video, audio and applying transitions and that seems a lot to do in AS3. I wondered if perhaps the mixing is done on the server when you click "preview video", but even then it stil...

fillRect, performance?

Hi! I'm writing my first flash as3 game engine and there is a function call that have made me concerned over the performance. Every frame i fill my "render bitmap" with black color using the fillRect function before i render the other sprites on it. And then just for fun i skipped the the fillRect function just to see how much perform...

Why do I get an error when I try to access a public function of a class? (Actionscript 3)

Hi, I'm currently building the damage mechanic for my game. Two classes handle this, the 'hurt' class, and the 'collision' class. The hurt class passes an instance of itself to the 'hurtCollision' method of the collision class, so that the collision class can detect a collision between the player and that instance of hurt (which is a di...

List of Actionscript 3 events

Is there a way to get a list of events available in Actionscript 3? Like MouseEvent.CLICK and Event.ENTER_FRAME but the full list to look at. I tried searching the manual on Adobe's site, but just couldn't find it. I'm using the flex plugin inside Eclipse if that makes any difference. ...

yield control to child SWF's

I have a function (call it funcX) that at certain times is being called on the enterFrame event. At those times it is extremely computation intensive and is for example using 70% of the available processing power of the computer or more. Scroll events and other input events in the swf page are still being processed just fine. However,...

Creating a repeatable, random looking distribution of objects in Flash

I'm trying to scatter movie clips around the stage using Actionscript 3 in a way that looks as though they were randomly placed there, like photographs spread out on a table top. I tried using a spiral type arrangement, but found it too uniform, and also a circular distribution, but found that too random. The other factor is that i'd l...

Flash adding \r to input textbox, is this normal?

Hi there, I am setting a string variable to the value of a input box in my movie but Flash also seems to be adding a \r (Carrage Return) to the end of it's value. This is not something i am typing. Is this normal or am i doing something wrong, i can't seem to find where it is coming from. If this is normal, what is the best way to pre...

how can i split date form Date of string formate using flex ?

my date of string like (2009-12-03 21:05:00) date with time . so i used to store var newdate:Date=new Date(Date.parse(startdate)); but shows some errors. and also i tried to split string(date) used date function like var datenumber:Number= (new Date(Date.parse(startdate))).getDate(); not get the date how can i split particular date ...

Tree dataTipFunction tooltip Change position,Flex3

Hi, I am doing dataTipFunction on Tree in Flex3 Air, At present the tooltip hides the present node, i need to reposition the tooltip above the node, how can change the x,y position of the tooltip. Thanks in Advance ...

Hi, flash as3 - any 1 know how 2 get the browsers search history similar to the below sample done in html...

In regular html I can put a simple text input with name q and when I double click I get the internet explorer past searches...I like to do this in flash as3, any 1 know how? The html sample is as follows: <html> <head> <title>View</title> </head> <body> <form> <input type="text" name="q" size="30" /> </form> </body> <...

Sample Rate in Flash AS3 and Flash Player 9.

Hi,I want to get the sample of any mp3 sound file in AS3? How can I get that? ...

Flex: What is the best way to place an image in specific coords on canvas

Hi, I know that the question may seem very easy. I am trying to display an image on canvas. I need to do it in AS, and also I need to locate image in specific coordinates. Could you please suggest how to do it ...

Dependency Injection framework suitable for as3 games and regular rich media sites

Hi all, Doing a bit of research on dependency injection frameworks for AS3 to retain loose-coupling of classes and boost our re-usability of code. I've been looking heavily at RobotLegs. There's a whole lot I still don't understand about the framework but it seems ideal for our regular Rich Media apps but has anyone used this framework f...

Greensock library, which is the best option, TweenLite, TweenNano, TweenMax, TimelineMax?

Hi all, i am new in flash development, i heard that Greensock lib is the best one. But when am trying to download its really confusing. there are a lot of names like * TweenNano * TweenLite * TweenMax * TimelineLite * TimelineMax * Tweening Platform v11 Which is the best or full featured lib.. where do i get the download link for th...

Type cast error in dispatchEvent

I have three classes: A, B, C. class A dispatches a event, class B will handle this and then dispatch it C. However, I got this weird type casting error in B's dispatchEvent function, which looks like follows: public function handler(event:SomeEvent):void { removeEventListeners(); dispatchEvent(event); } If I change ...

high performance encryption in adobe air / flash

When looking for encryption related classes/functions in action script / air / flash, I saw the as3crypto project. This one provides a v. nice set of options, but I am a bit concerned on what the numbers presented means when these are used to decrypt a local media file when its selected about to be played. I am looking for security vs...