actionscript-3

How to mass import FLVs into Flash

Right now importing an FLV and embedding it in the timeline of a movieclip is a pretty slow process as it involves going through the wizard. Is there an efficient way to do a mass import of FLVs and have each of the FLV be embedded in individual movieclip? (NOTE: I understand the implication of embedded FLV and other options but let's ...

reading simple INI file with AS3

What AS3 class should I use to read a simple property/ini file into memory to configure some settings such as colors easily for the project. format could be key=value <newline> I like to access it with this kind of API: trace ( Settings.get("key") ) ...

Flex/AS3 Drag Drop - Custom Drop Feedback

Hi I am using a HorizontalList component to display a list of images, you can drag images from another component to join the list, this all works fine. If I do list.showDropFeedback(event) I get an unsightly black bar at the top of images in the HorizontalList - what I really want is a line to the left/right of the image, where the new...

any flash speed meter component?

Is there any free and good looking (automobile) speed meter component for AS3/Flash ? ...

Flex and fake Mxml initialisation without actually showing the component, (more insise)

Hello, I have a TitleWindow mxml class wich has several components, and listeners. On its creationComplete and init state i add some listeners which listen for events on its gui. This TitleWindow is only shown when the user click on a "button", i made TitleWindow a singleton with the following code: public static function getInstanc...

as3 Access to undefined property?

Hello, Can someone help me to find out why I'm getting the error message "Access to undefined property: removeChild(goBack)" on the following snipped? BTW, this is for flash CS4 function nameOfFunction() { var goBack:backButton_mc = new backButton_mc(); goBack.x = 10; goBack.y = 700; goBack.back_text.text = myXML.*[buildingName]....

E4X conditional call is not returning anything with only 1 match?

ok here is my code: var xml:XML = <xml> <typeA amount1="500" amount2="300" amount3="250" date="2008-02-17"/> <typeA amount1="500" amount2="300" amount3="250" date="2008-02-16"/> <typeA amount1="500" amount2="300" amount3="250" date="2008-02-17"/> <typeB amount1="500" amount2="300" amount3="250" date="2008-02-18"/> <...

How do I remove an event listener from an anonymous component?

Say I have an event listener tied to a component and I want to remove the event listener from the component so it can be garbage collected. The problem is I don't know what kind of object it is or what event listeners it has. Basically how can I find out what event listeners an object has and how can I remove one or all of them? ...

In Flex, what's the best way to remove a swf that was authored in Flash CS3?

So, I have an application where I'll be loading any number of swfs into a SWFLoader and removing them at runtime. The issue is - they are all timeline based movies authored in Flash CS3. I have very little control over what is in the movie other than the authors are not able to program any interactivity (i.e. no event listeners) but I w...

Why is AdvancedDataGrid not updating when the HierarchicalData dataProvider is updated?

I have an AdvancedDataGrid (ADG) with a HierarchicalData dataProvider: <mx:AdvancedDataGrid xmlns:mx="http://www.adobe.com/2006/mxml" dataProvider="{__model.myHierarchicalData}" displayItemsExpanded="true" sortExpertMode="true" dropEnabled="true" sortableColumns="false" draggableColumns="false" resizableColumns="true"...

Focus is stolen from Interactive Flash object by 3rd party Flash adds

I have developed a simple interactive Flash game, but now it appears that sometimes Flash Adds (3rd party ones displayed by facebook) somehow steal the focus from my flash application (by mistake?). My app has textfield() where the focus should remain until game is over. My flash object uses urlrequest/javascript to ask for focus at st...

Object Focus problem with Safari and Chrome browsers

I have the following javascript being called to request a focus when page is loaded. This code works 100% OK with Firefox and IE7, but Chrome and Safari do not seem to move the focus at all. How to make it work with all browsers? document.getElementById("MyFlashFile").focus(); ...

Is it possible to pass a type as a variable in Actionscript?

The actionscript I want to write looks like this: public function API(requestClass:Type=URLLoader) { var req:URLLoader = new requestClass(new URLRequest("some url")); req.load(url); //etc } so that I can test the API class by passing in a mocked subclass of URLLoader. This doesn't appear to be possible in Actionscript's type sys...

Flash Site Architecture - one swf vs many?

I'm about to start building a site entirely in flash (per the client's request), using AS3, and was wondering about best practices for doing so in terms of application architecture. The site isn't too large--think homepage, persistent nav, 8 subsections or so, each with their own content but similar design between subsections. In the pas...

AS3 How to remove previous loaders

In Flash CS4, I'm creating a photo gallery. My goal is to load different thumbnails from a number of images. I have managed that when one clicks an image, a number of thumbnails are being displayed, but when one clicks another image, the new thumbnails are placed on top of the old ones. Can someone help me on how to get rid of the old th...

FLEX: Make LineChart DATATIP constrain to vertical axis.

When making a line chart, Lets say its for business sales for different depts and horizontally is days and vertically is dollars. When you hover over a line it tells a dataTip tells you the sales for that dept. on that day. I want it to show all the depts at the same time, so say you hover over day 3, I want the dataTips for all depts on...

How can I send a ByteArray (from Flash) and some form data to php?

I have a sketch pad made in Flash AS3 like this one here: http://henryjones.us/articles/using-the-as3-jpeg-encoder I want to send the jpg to the server and some data from a html form field with php. Is there a way to force the Flash movie to deliver the image file when one presses the submit button? ...

How to discover a LocalConnection connection name?

I'm developing a Adobe Air application that should make use of a SWF file using LocalConnection. I've never used LocalConnection before, but from what I understood from the online reference, I need to specify the same connection name on both the sender and the receiver. Since I don't have access to this component source code, how can I...

Drawing a rectangle on a flex canvas is there a better way than ...

Hello, To draw a "selection rectangle" from the mouse down , mouse move then remove it on mouse up i currently do the following: My board is a canvas, On mouse down i create a new UIcontainer i set his borders. I update his width and height related the the mouse move position, on mouse up i remove this child UIcontainer. Do i have to ...

Is it possible to define a generic type Vector in Actionsctipt 3?

Hi i need to make a VectorIterator, so i need to accept a Vector with any type. I am currently trying to define the type as * like so: var collection:Vector.<*> = new Vector<*>() But the compiler is complaining that the type "is not a compile time constant". i know a bug exists with the Vector class where the error reporting, reports ...