actionscript-3

Flex: Changing Control Properties based on contents of a Databinding event

I'm trying to set up a form that presents a combobox when an ArrayCollection it's bound to has several items, and doesn't present one when it's empty or only has one item. I've tried doing this by creating this class, but unfortunately, the data provider I've bound to is never not empty at the time the setter executes. Is there a differe...

How does object initialization occur when deserializing binary objects in Flex?

The jist of what I'd like to know and focus on understanding, is details on how binary deserialization occurs in Flex 3. When is the constructor called, when are properties set, are private members serialized or does all deserialization occur on and through setters, etc? I'm having a hard time finding information on this. In a Flex 3 ...

Flex - How to access component inside another component in MXML?

I have two components. One is called "InsideComp" and one is called "OutsideComp". OutsideComp has InsideComp as one piece of its component, and in my main MXML file, I have embedded an instance of OutsideComp. How do I access a public variable of InsideComp within my main MXML file? In Actionscript, I could just do something like: Ou...

Actionscript 3 ContextMenu closed event?

There is an event which is dispatched when the context menu (right click menu) in actionscript for flash has been opened: ContextMenuEvent.MENU_SELECT Now, is there an event which is dispatched when the menu has been closed? ...

Adding key board shortcuts to a flex application

I have a flex app with lots of custom components, like custom buttons, comboBoxes etc. I am trying to add keyBoard shortcuts to the flex app. In doing so, I added a key-down listener to the app to listen for ctrl+shift key combination like this: this.stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown); then I dispatch a cust...

How to anti-alias a collada model in papervision3D?

How to anti-alias a collada model in papervision3D? I've tried searching everywhere but didn't find any ways to anti-alias models. I've also tried blurring it a little as an anti-alias method but that only f-s it up and makes it look worse. How do I do that properly? ...

How can I tell if an instance implements an interface in ActionScript 3.0

I am overriding the addItem() function of an array collection and I would like to detect if the added item implements a particular interface. Previously I used the, is operator to detect the class type, but now that I am using an interface for classes I would rather test to see if the object implements the interface. I expect I could j...

Flash: Is it possible to record the user voice & act on it?

Hi Is it possible to record the end user by mic? And what kid of actions can I do with the recording? Can I get for example the volume of the sound (decibels) in real time? Can I save the record on a file? Thanks. ...

Suggest a good MVC framework for AS3

I am looking for a framework that can simplify the task of creating new Flash apps. But I don't want to go the Flex route because it's way too top-heavy for the simple widget apps that I need to create. (The payloads often exceed 300k with a Flex app and it can be difficult to control the timeline and animation, etc.) When I Google the ...

How to take a screencap of a SWF and download it to user's desktop with AS3?

Does anyone know how to take a screencap and download it to desktop in AS3? I know there is a great BitmapDataExporter in AS2 by Mario Klingenman but it doesn't work in AS3. ...

Flex: Getting "a bunch" of data from Flex into an HTML page?

I've got a bunch (say, 1k) of data in Flex, and I want to get that data to an HTML page, where some JavaScript will slice-and-dice the data and generate a report. What's the simplest way to get it there? I've considered passing it as part of the url, for example: navigateToUrl("report.html?data=" + serialized_report_data) But, apart...

playing multiple videos in flash as3

I have a blank project that simply plays two video files. No matter what I try, the second video gets sized to the same as the first. Please tell me this isn't a Flash bug and that there's something I can do to accomplish this. Here's my document class: package{ import flash.display.*; import flash.media.*; import flash.net...

Where does actionscript 3.0 pick up its params from?

in AS2.0 you would include key->val style params in the param embed and object strings and then when running the SWF you would pick them up via the _root object. So in your HTML you would say foo=bar and then in your movie you could go and retrieve _root.foo Obviously they've removed _root altogether in AS3.0 and I'm now at a loss as t...

Moving AS3 forward?

Hi I use AS3 quite a lot for work, but I come from a Java/C/C++ education and find the language quite restrictive. There seems to be two fundamental camps in the AS3 world: The non-technical creative camp who want to get things working without to much trouble and computer science forced on them The Technical camp (possibly coming fr...

AS3/CS4 removed TextField reappearing after tween finishes

I load a swf via the Loader() class. As the swf is loaded I loop through all the children of root and remove any TextField with removeChild(). This works initially - the TextField is removed. But as a tween in the loaded swf finishes and loops, the removed TextField somehow reappears. The TextField is Dynamic text. If I remove some Stati...

Actionscript 3 animation using png's, reload or hide?

Hi, using flash and actionscript 3 I want to use a lot of png's as animation. I currently use a Loader object to load these images. But now I am wondering what the best way would be to show these animations: 1. Every time a have to show a new png, I could use the loader to load it, just having one loader: var image:Loader = new Loade...

Creating Dynamically Flex Custom ItemRender (Constructor)

Hi, am creating some Advanced Datagrid with actionscript. I have created an actionscript class where I extend the VBox object: package core { import mx.containers.VBox; import mx.controls.TextInput; public class customItemRender extends VBox { public function customItemRender(_TextInput:TextInput, _TextInput2:TextInput) { ...

call() of function with arguments

I have a component that I hand over a function public var func : Function; Now the function is a function that has parameters in its signature public function myFunction(s : String) : void { doSomething(s); } from my component I can call the function with func.call(); Can someone tell me how to invoke the function with its p...

Papervision3D; rotate child objects within camera view

Hi all, It's my first time with Papervision3D and I have created a slide show of images that is skewed on the y-axis. Smallest photos on the left, and they increase in size going to the right. So they zoom from left to right, smallest to biggest. I have a tooltip that pops up when you hovers over the photo, but the tooltip also gets...

Imported a class and make it part of my game

Hello all I was hoping to get some help with inported this class to a little game AS3 allowDomains:Array is a list of the allowed domains My Question is where an how to write this Array and where to place it so all get compiled with Flash CS4. class below. package com.ikonicstudios.utils { import flash.display.DisplayObject; ...