actionscript

How can I export part of a Flex Application to a SWF?

I have a Flex App that allows you to dynamically build an animation. It has a UI and a display of the resulting animation, which is a custom Class extending UIComponent. Is there some way to allow users to save/export the dynamically generated Component to a SWF, for reuse in other Flash/Flex Apps? ...

Javascript to flash communication

Hello, I am trying to call a Actionscript function from javascript but I am having problems in Internet Explorer. I am using Swiff.remote in mootools 1.2.1 to call the actionscript function ie: Swiff.remote(playSwf.toElement(), 'sendResult', result, plays, name); This all works fine in FireFox, Safari and Opera but I'm getting an "un...

Suggestions for (semi) securing high-scores in Flash/PHP game...

...I have read a few threads on here that have discussed various methods and was just looking for some feedback on a proposed solution we came up with. In one of the threads a comment was posted recommending a public/private key which sounded great, this is what we were thinking... Client Side - 1. Key is stored inside of Flash swf whi...

Vector Shape on Stage Appears Over Dynamic Textfield

The subject pretty much explains it all. I start on frame one of a MovieClip with just a Bitmap covering the whole stage. Then when a user clicks a button, it goes to frame two and a vector shape is on the stage covering part of the image. At the same time, through code, I place an input Textfield on the stage. Problem is, the dynamica...

Possible to import an image into AS3 without PHP?

In actionscript 3 is it possible to allow a user to upload an image into a flash movie at runtime without POSTing to a PHP script? I dont want to export the image or save it anywhere I just want to be able to display the image in the flash movie fingers crossed ...

Flash TextField HTML - How do I prevent the error dialogue for missing images? (Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.)

I'm using a Flash TextField control to display some HTML content inside a Flash presentation to be shown on a large touch-screen kiosk. Unfortunately, if any image tag in the displayed HTML content points to a non-existent image, a dialogue is shown with the error message Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not ...

What is the best way to display HTML in Flex?

I have HTML that includes symbols such as the Trademark "TM" as superscript (). In normal HTML, I would use "&trade;" or &#153; to display the Trademark TM. However, I can find no way to import HTML like this into Flex and have it displayed correctly. I am having similar issues with the <li> tag. My HTML: <p>This information is intelle...

How to check if two objects are of the same type in Actionscript?

I want to do this in Actionscript: typeof(control1) != typeof(control2) to test if two objects are of the same type. This would work just fine in C#, but in Actionscript it doesnt. In fact it returns 'object' for both typeof() expressions because thats the way Actionscript works. I couldn't seem to find an alternative by looking in t...

How to create a Flash 9/ActionScript 3.0 wizard dialog

I need to create a wizard for a Flash 9/ActionScript 3.0 application. The wizard would be a set of dialogs/windows for each step and the buttons "back/next/cancel" for navigation through the wizard. Within the Adobe CS3 authoring environment there does not seem to be a straightforward way to create a set of dialogs or windows that would...

Flex - Binding ViewStack selectedChild Property Using a String Value

The attached code example (pseudo code) compiles, but throws this Run-Time Error: TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/getChildIndex() at mx.core::Container/getChildIndex()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2409] at mx.containers:...

Actionscript 3 REPL

Is there a REPL (Read-Eval-Print Loop) available anywhere for Actionscript 3? I could not find anything on google, but it would really come in handy. ...

Is there a way to programmatically delete all local shared objects from within flash?

I'm using local shared objects within flash both to store significant amounts of user data, as well as for caching data fetched from the server. However, I'm very concerned about hitting the 100kb default limit. Because the 100kb limit is for the whole domain, I'm concerned that the sum of multiple local shared objecs would sum to more...

AS3 Components in Flash Designer

In an ActionScript 2 project I can create a new MovieClip, right-click on it on the library and select "Component Definition" to add parameters that can be referenced inside the MovieClip. This parameters can be easily changed in the MovieClips's properties. Now, I'm working on an ActionScript 3 project but haven't been able to figure o...

Flex and embedded XML

Hello. I'm using Parsley IoC in my current Flex project. So I'd like to embed the container configuration XML onto the result SWF. How could I load embedded XML file into action script XML object? ...

Actionscript 3 Bind variables

I am trying to set one bindable variable to be bound to another. Essentially I want to create an alias. I would give up, but this seems like something that would be good to know. essentially, I want changes in model.configView to be reflected in view, so that things bound to view.... behave the same as things bound to model.configView...

Effects on htmlText in a TextField

In Flash when you set text in a TextField object with the htmlText property, changing the alpha value no longer works. Is there a way around that? ...

actionscript tdd frameworks

Any list of Testing frameworks for ActionScript 2.0/3.0 around there? ...

What is the Easiest/Best Way to Get an Array of Values from an Array Collection?

I have an Array Collection with any number of Objects. I know each Object has a given property. Is there an easy (aka "built-in") way to get an Array of all the values of that property in the Collection? For instance, let's say I have the following Collection: var myArrayCollection:ArrayCollection = new ArrayCollection( {id: 1, nam...

Showcasing Flex - Tour de Flex

I ran across Tour de Flex a couple days ago. It's a demo that showcases all the Flex controls, with cross-references to source and references. It's a great way to get an idea of the resources available, and how to use them. Not a question, but a useful resource since I've seen a number of Flex/Actionscript questions here. (Note that I'...

Cleanly merge two arrays in ActionScript (3.0)?

What's a nice way to merge two sorted arrays in ActionScript (specifically ActionScript 3.0)? The resulting array should be sorted and without duplicates. ...