actionscript-3

detect change in Flex Form elements (textinput, textarea, combobox, checkbox..)

I have various (read lots of..) flex forms in my app, and I now want to create a system by which the user is notified that he hasn't saved if he modifies anything in the form... now.. I don't want to rewrite every form I have.. is there some nice way to implement this? Extending the TextInput (and others..) classes somehow? thanks ...

Flex Panel doesn't call focusInHandler() when it gets focus.

I want to be notified when a FLex Panel gets or loses focus. I've overridden the focusInHandler() and the focusOutHandler(), but they don't get called when I click on the panel. The panels style changes indicating that it has the focus, but the handler doesn't get called. What am I missing? ...

Datagrid selected row at a certain column as3

I need to get the value of a certain column in the selected row via AS3, how can I do this? It keeps returning null when I try grid.SelectedItem.text... Thanks for the help! I need to be able to reference the column by name, in this case "ID". EDIT: Does this require an event or something? Shouldn't there be a method for this built i...

Loading external images from another domain

Hi Is it possible to load an image(jpg, png, gif) from another domain and manipulate the pixels? I guess when the image is downloaded/copied it is in my domain. Using the Loader and add the content to an Image component I get an error in my debugger. I guess there are some cross domain polices at work here. But I need to be more sure ...

Convert an XML node to a MovieClip

I have an xml document that I would like to use to show MovieClips in my .fla: <linkedMovieClip>TestClip</linkedMovieClip> In my .fla, I created a symbol called TestClip and select Linkage > Export for Actionscript and named it TestClip. My code in my Document class traces the xml: var t:*= getDefinitionByName(String(slideItem.linke...

Calling javascript from flex

I am using ExtrernalInterface.call(javascript_function, args); to call javascript functions from Flex. But this fails in case of browsers that have javascript disabled. Is there any other way to call javascript functions from flex? ...

Font Embedding in Flexbuilder Vs. CS4

I have an all-AS3 Flex project in which I embed fonts. I'm trying to run this project from CS4. However, for some reason the text isn't showing up at all. The code in the Flex AS3 looks like this: [Embed(source='C:/WINDOWS/Fonts/ArialBD.TTF', fontWeight = 'bold', fontName='ArialBold', unicodeRange='U+0020-U+0020,U+0021-...')] //a ...

stopping on the last frame (flash)

I want my movieclip to play once and stop on the last frame. I use the following code in the loop of my movieclip class. (this is as3) if(currentFrame == 120) stop(); 120 is the last frame. It plays once. but the problem is it goes back to frame 1 again. is there a better method of stopping a movieclip on a particular frame. ...

Actionscript 3 - load and library image on increment / counter

Hi, I have a very simple flash movie. 24 png images in the Library The image properties are set to 'Export for Actionscript' and the class named 'image1', 'image2' etc Single frame in the timeline I need to dynamically load 'image1' on the stage at the start of the movie. I have been able to do this using BitmapData ojects. On clic...

problems generating ASDoc

Hi I am using ASDocr, which is an Adobe AIR application GUI interface for the command-line Flex asdoc documentation generator. My class uses several external libraries and it is generating a 1046 error when creating the documentation: /Users/mga/Documents/FDT Workspace/vgline/src/com/pingpongestudio/timeline/Timeline.as(1569): col: 39 ...

Flash AS3 error when importing 3D-tweened movieclip

I've been working on an AS3 application and it's nearing completion. At the same time, one of the designers I work with has been building a movieclip in a separate .fla that acts as an intro animation to the application. The intro uses the 3D motion tweening capabilities of Flash CS4 / Player 10, and runs fine in the .fla in which it w...

How do I slowdown an animation in AS3 without decreasing the fps

I have this code that I found online that does an infinite rotating gallery, now my problem is that on enter frame it jumps and too fast. I want it to be as fast at after you hover out of the logo. Here is the code: //Import TweenMax import com.greensock.TweenMax; //Save the horizontal center var centerX:Number = stage.stageWidth / 2;...

Progress bar in a Flash MP3 Player

Hi I have coded a simple XML driven MP3 player. I have used Sound and SoundChannel objects and method but I can´t find a way of make a progress bar. I don´t need a loading progress I need a song progress status bar. Canbd anybody help me? Thanks. UPDATE: Theres is the code. var musicReq: URLRequest; var thumbReq: URLRequest; var ...

Get item by index in a tree control

I'm doing a drag and drop operation on a tree using some help from Adobe's quick Starts: http://www.adobe.com/devnet/flex/quickstart/working_with_tree/ The code suggested is roughly this: var dropTarget:Tree = Tree(evt.currentTarget); var i:int = dropTarget.calculateDropIndex(evt); myTree.selectedIndex = i; var node:XML = myTree.select...

Time-Scaling Movies in Flash

Time scaling movies in After Effects is easy, but how would I do that in Flash? Equations or actionScript would be appreciated. Example My movie's 60 seconds. I want to play the entire movie in 30 seconds. I want to play the entire movie in 120 seconds. How do I rescale my movie using actionScript 3.0. My movies are probably going to a...

what are threads in actionscript functions?

I've seen a lot of other developers refer to threads in ActionScript functions. As a newbie I have no idea what they are referring to so: What is a thread in this sense? How would I run more than one thread at a time? How do I ensure that I am only running one thread at a time? Thanks ~mike ...

Adding Flash Components to Stage Dynamically from AS3 File

When I attempt to create a new flash list component from my as3 file (FrontEnd.as) and add it to the stage, I get the following error: "1046: Type was not found or was not a compile-time constant: List". Below is the code: package { import flash.display.MovieClip; import fl.controls.List; public class FrontEnd extends MovieClip { ...

Set stage vanishing point in Flash via actionscript 3

I'm working with a few designers, each of whom have created 3D animations (using fp 10 capabilities) for use in the same flash application. Each 3D animation is a unique movieclip that will ultimately be part of the same .fla file. The problem I'm having is that each of the movieclips was created in a separate .fla, and each .fla had...

FLEX: XML to data array?

I need to get a grip on arrays and XML data but I'm having trouble understanding how to turn xml data into useful data. I was hoping these forums might provide some insight. I load my XML with this code: //set values for XML data file private var XML_URL:String = "http://www.mysite.com/media/locXML.xml"; private var locXML:XML = new XM...

Differences between Sound.length and SoundChannel.position in ActionScript 3

Hi Can anybody tell me why or what I have to do to fix the following issue? I load a song and when I get the length the song never reach this value. Here is issue document by another guy AS3 – SoundChannel.position never reaches Sound.length And here is my code import flash.display.Sprite; import flash.net.URLRequest; import flash....