actionscript-3

ResizeEvent Looping?

Hello all, I am having an issue with an actionscript event that I am firing every time a flex component resizes. In the event, I am altering the height of the flash object within its html wrapper via an external javascript function. This in turn causes the component to resize and the event to loop in upon itself and continually add heig...

Flash Builder vs Flexbuilder 3 for Actionscript only projects

Hi Right now Flexbuilder 3 is my editor of choice for all as3, xml ,js editing. I'm not 100% convinced that I need to upgrade to FlashBuilder. Also early betas seemed a bit sluggish compared to Flexbuilder3. Does anyone who has made the upgrade have any convincing reasons? Was it worth it? ...

Applying styles for custom TextArea in ActionScript 3

I have the following code to create and apply a few styles for a custom TextArea in ActionScript 3. public class MyCustomTextArea extends TextArea { override protected function createChildren():void { super.createChildren(); this.styleSheet.setStyle("sup", { display: "inline", fontFamily: "ArialSup", fontSize:"12"}); thi...

setting actionscript 3 superclass variables

In AS3, if I have a class such: public class dude { //default value for a dude protected var _strength:Number = 1; public function dude( ):void { super( ); //todo... calculate abilities of a dude based on his strength. } } and a subclass public class superDude extends dude { public function superDude( ):void { _strength ...

Stylizing/skinning applications in Actionscript-3

Hi, I'm working with a custom component library in Actionscript-3 where the majority of the elements are drawn in Actionscript. I am in the process of planning how to skin my applications as efficiently and robustly as possible. I am looking for any tips, tricks, suggestions or documentation on this subject. I am not sure if providin...

Error #1009 Cannot access a property or method of a null object reference.

Hey everyone, I'm trying to import an external SWF with a scrollbar, calling out to an external .AS, into my main SWF. Someone told me, it's an issue that my scrollbar isn't instantiated yet, but stopped short of helping me how to fix the problem. Here's the error below: TypeError: Error #1009: Cannot access a property or method of a n...

How to use compiled LibPng? (Adobe Alchemy)

How to use compiled LibPng sample? I have compiled it (lib png) now I want to use it with bitmap data. Can any one please share some simple AS code for USING compiled lib png? ...

DisplayObjects as animation frames? AS3

How can I use displayObjects as animation frames? I have six symbols in my library I want to animate with a timer. The advantage would be the ability to change the speed of the animations, and the elimination of the messy timeline. The only drawback is the initial setup of the objects in the library. I've tried switch/case design patter...

SoundChannel, removeEventHandler, AS3

Is there a better way to use the sound channel is AS3? This works, but I hate it when I tap the play button twice and it starts doubling. Please advise. var mySound:Sound = new Sound(); playButton.addEventListener (MouseEvent.CLICK, myPlayButtonHandler); var myChannel:SoundChannel = new SoundChannel(); function myPlayButtonHand...

Unable to use background-position: center for VBox in flex

Hi I am trying to use css to have a background in a VBox which is positioned to the top of the container. my css style looks like below: <mx:Style> .agendaDateVBoxStyle { vertical-gap:0; corner-radius: 10; border-style:solid; border-color: #7191ba; background-col...

Flex/Air/AS3 Selecting and Populating a unFocused tab.

I'm having a problem displaying data from a function to text box within a tab. If you run the code and click "Select Tab 2 and Fill..." I get an error; "TypeError: Error #1009: Cannot access a property or method of a null object reference." I'm guessing this is because "Tab 2" is/was not rendered yet. Now if I run the code, select "Tab 2...

Is there a good way to style an unordered list (loaded from XML) in Flash?

I'm loading the XML into a text field as htmlText. The StyleSheet class in Flash only supports a subset of CSS1–which debuted in 1996!–and doesn't support list-style-type or list-style-image. I'd specifically like to substitute an image instead of the default disc for an unordered list. If you've had success implementing a work-around,...

Populate Tree using data from ArrayCollection

Let's say I had an ArrayCollection like this: public var ac:ArrayCollection= new ArrayCollection([ {item:"dog", group:"Animals"}, {item:"orange", group:"Fruits"}, {item:"cat", group:"Animals"}, {item:"apple", group:"Fruits"} ]); How would I create a Tree component in...

Flash Bitmap Vs MovieClip

What are the Advantages and Disadvantages over the Bitmap and MovieClip in Flash. Give me your thoughts. Thank you ...

Error 2025: The supplied DisplayObject must be a child of the caller

Hi, sorry, new to actionscript 3. I have a display() function for an object rotator(image based like a QT object movie). It first saves the current image in a helper variable and then allocates a new image, from the library, beneath the old one. To get a nice crossfade effect, the old image's alpha is looped down via enter_frame and t...

Problem with Verdana when embedding as resource in Actionscript

Hey I'm usually creating 1 .as file per font and exports these .as files to swf's that I load in to my flash projects. This way I can choose what characters to embed. Now I tested copying my verdana ttf fontfiles from my Windows font folder and embedded this to create a Verdana swf fontfile. When I tested running this I tried with som...

AS3-IntelliJ IDEA debugger: Unexpected debugged player communication problem

For some reason I can't debug my actionscript application in IntelliJ. I keep getting this error in the console: Unexpected debugged player communication problem. I have no idea what causes this! Any ideas? ...

RTMPT and NetConnection.

How i can connect to FluorineFx RTMPT server? And how can i configure FluorineFx RTMPT server? Can i start FluorineFx RTMPT server without IIS installed? Is there any tutorial? ...

AS3 How to instantiate a class with getdefintionbyname and getqualifiedbyclass with TYPED declaration

example: var c : Class = Sprite; //This can be random class such as movieclip/etc var o = getDefintionByName(getQualifiedClassName(c)); this works, but in flash develop, it says that the variable 'o' has no type declaration which basically means var o : SOMETHING = getDefintionByName(getQualifiedClassName(c)); but how do i put th...

soundTransform is muting the sound but sound still plays.

I am using the following code, in the last line when I play the sound I can still hear it even when I have transformed it to 0. var tempTransform:SoundTransform = new SoundTransform(0,0.5); clickSoundChannel = clickSound.play(); clickSoundChannel.soundTransform = tempTransform; clickSound.play(); ...