actionscript-3

how to have a Hover details box in flex 3 similar to ones present in google geomap visualization examples.

Hi all, i want to know if there is a already available hover details component similar to the one shown in google geomap visualizations examples which shows city name and its details, or any other similar component that can be used a hover details box. ...

How can you save time by using the built in Date class?

The intention of this question is to gather solutions to date / time calculation using the built in Date class instead of writing long complicated functions. I’ll write some answers myself, and accept an answer if anyone comes up with something very clever. But this is mostly meant as a collection of solutions, since I often see overly ...

Flash - Scroll area with dynamically loaded movie clips

I'm building a Flash project that creates a menu system with dynamically loaded movie clips for the menu items themselves. I want a scroll bar to appear once the menu has enough items that it's larger than the menu area. I was thinking that I could just put a mask over the menu area and have the movie clip where the controls where load...

matrix text style in action script

Hi, I am working in AS3, and I was wondering if anyone knew how to create a matrix effect (the moving green text lines in the movie) in action script. I have found a few examples online, but none of them seem to work. Thanks. ...

How do I get information about the User's Browser in Flex?

Hi there. I'd like to know what Browser the User is using to view my Flex application. How can I get at the User Agent string and other information? ...

Does Scaleform now support AS3?

Does Scaleform now support AS3? ...

Dynamically load CSS in Actionscript/Flex

Problem Definition: To be able to dynamically load a CSS at runtime to skin a Flex Application. More Information: I've found that loading and applying a CSS is as simple as using "mx:style source="../assets/default.css"". But what I would like to do is something more like (pseudocode): If (condition == 1)<br /> mx:style source="../as...

Saving a file ActionScript 3.0 + Jugglor and JSave

I have a Flash project that I need to have save files to the users local machine. I had thought that Flash included tools for working with files, but apparently this won't be implemented until the Flash Player 10 is around. I'm working with CS3 using ActionScript 3, and I thought that maybe the Jugglor tool JSave might be able to accom...

How do I produce a screenshot of a flash swf on the server?

I'm writing a flash app using the open source tools. I would like to load a data file in to the app and capture a screenshot of the stage on the server. The only part that seems mysterious is running the app on the server. In fact, I don't even care if it's the same app running on the server and in the browser--if I can use the flash sta...

Actionscript 3 : Problem escaping "\\" character in full file path

I am finding this task challenging in AS3. Excuse me if I am missing something basic/simple or some builtin method which can do this. I am not well versed with RegExp. I have a DYNAMIC string representing full file path which looks exactly like "d:\temp\abc.doc". I want to extract the filename part from complete string e.g. abc.doc. ...

confused about HttpService's useProxy (Flex 3)

I have a flex app, where the user can provide a link to a resource. I want to perform a simple validation and check if the url is actually valid (not just structure, but actually test the link to ensure I get a 200 OK). I figured I would just use HttpService and use the HEAD method, but it seems that this is only available when you set ...

draw sprite into bitmapdata with a strange mask

I have run into strange behavior drawing a sprite into a BitmapData. This sprite looks fine when drawn directly to the screen. But when this sprite is drawn into a BitmapData, the sprite is being masked... but there is no such mask applied to that sprite! This "bad mask" can be toggled off and on... by applying / not-applying a differ...

Actionscript 3: get display object at pixel

How can I enumerate display objects under a pixel relative to the stage? Clarification: I want to write a function which get (x,y) as input and returns an array of objects as output. update: I want to avoid looping over all the display objects, to tell which one is under the specified pixel. ...

SWFObject (1.5 and 2.1) does not allow full-screen in IE

Does anybody know why and/or how to work around this without scraping SWFObject? Many thanks, T EDIT : Sorry, my fault the alowFullScreen param was set to "true" instead of "always" ...

How to know if an object is dynamic in AS3

In Action Script 3, you can write a class that defines a dynamic object (MovieClip and Object are two examples), this objects can be modified in run-time. What I want to know if is there some way (in run-time, of course) to know if certain object is dynamic or not. PS: Without making something like this: function isDynamic(object) { ...

Find out the character pressed key

If I add a listener to KeyboardEvent.KEY_DOWN, I can find out the keyCode and the charCode. The keyCode maps to a different character depending on the keyboard. The charCode is just as useless, according to the help: The character code values are English keyboard values. For example, if you press Shift+3, charCode is # on a Japanes...

How do I dispatch a custom event from an actionscript 3 class and listen for it in the document root?

I built a custom event dispatcher that passes variables. I dispatch the event and then I try to listen for the event in my document root, but I never receive the event. How do I bubble the event up to my document class? addEventListener(CustomVarEvent.pinClicked, pinClickedHandler); function pinClickedHandler(e:CustomVarEvent) { t...

Actionscript 3.0: display object walker in strict mode

This is a document class for a display object walker. Make sure to turn off the strict mode (howto here) when testing the class. Also put some stuff on the stage. When the strict mode is turned off the object walker works just fine. However, I want to make it work in strict mode too. I have tried changing the problematic parts, and addig...

Actionscript 3.0: Scope

Tutorials usually don't deal with scope in Actionsript. Can you point me to some documentation and/or explain what should I know about it. I want to avoid problems arising from certain classes are not visible at cretain places. ...

Please help me get my random number generating working in Java

I am trying to make a Java implementation of the Park-Miller-Carta PRNG random number generator (maybe faster?) Below is the implementation of the Random function in ActionScript 3 from here. return (_currentSeed = (_currentSeed * 16807) % 2147483647) / 0x7FFFFFFF + 0.0000000002...