actionscript

Possible to pass parameters to a skin?

I have 2 skins, almost identical, but differ in 1 small way that can be accounted for if I could pass a Boolean to the skin while assigning it to the host component (a button). <s:Button skinClass="MyBtnSkin" /> Is there a way while assigning the skin to the button, I could also pass a parameter to the skin somehow? ...

ScrollPane has type of "movieclip" in attached movieclip

var spw:MovieClip = contentsLayer.attachMovie("ScrollPaneWrapper", "ScrollPaneWrapper123", contentsLayer.getNextHighestDepth()); var sp_:ScrollPane = spw.sp; Here typeof(sp_) == "movieclip" and I can't set any content to it. I've tried exporting it for ActionScript, exporting the wrapper movieclip "ScrollPaneWrapper" and "E...

How do I 'addChild' an DisplayObject3d from another class? (Papervision3d)

Hi All Im kind of new in the whole papervision scene. For a school assignment I'm making a panorama version of my own room using a cube with 6 pictures in it. It created the panorama, it works great. But now I want to add clickable objects in it. One of the requirements is that my code is OOP focused. So that's what I am trying right...

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...

How to do the auto update of Flash player version through actionscript 3

package { import flash.system.Capabilities; import flash.display.MovieClip; public class VersionCheck extends MovieClip{ public function VersionCheck():void { var versionNumber:String=Capabilities.version; trace("versionNumber: "+versionNumber); trace("-----"); // The ...

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...

PNGs alpha transparancy in AS3 - Unknown file-type

Hello there! After whittling down of the options we've encountered a problem with PNG's and ActionScript 3 (AS3). When loading a PNG 8 or PNG 32 with alpha transparancy we're getting the following error reported in Flash:- "Error #2124: Loaded file is an unknown type" Now, we're dealing with some legacy images, and it appears as thou...

Loaded AS2 SWF into AS3 SWF as AVM1Movie doesn't run any actionscript in the AS2 SWF

I appreciate loading AS2 into AS3 is never going to be fun, but unfortunately I have to on this one. I'm using the Loader Class in AS3 to load an external AS2 SWF onto the stage as a AVM1Movie Object. Anything that is placed on the stage in the AS2 FLA displays fine, but no ActionScript runs at all. The loaded AS2 SWF has one layer, on...

Hide the last children of an XML data provider (not to be displayed in mx:Tree)

Hi there! I have an hierachical XML data, and I want to display it as a tree. The XML data is something like this: <services> <service name="TestService" endpoint=""> <method name="sayHi"> <parameter name="firstName" /> <parameter name="lastName" /> </method> <method name="sayGoodbye"> <parameter name="...

How do I force all Tree itemrenderers to refresh?

I have item renderers in an mx.controls.Tree that I need to refresh on demand. I have code in the updateDisplayList that fires for only some of the visible nodes no matter what I do. I've tried triggering a change that they should all be listening for; I have tried clearing and resetting the dataProvider and the itemRenderer properties....

Do superfluous calls to addEventListenter("event", thisSpecificFunction) waste resources?

I have ItemRenderers that need to listen for events. When they hear an event (and when data changes), they dispatch an event with their current data value. As item renderers are reused, each of them is going to add its callback in set data(value...)and pass the callback function in the event as well as the current data value. So, the l...

maya export to flash 10

Adobe released flash 10 with 3d support but I can't seem to find any good information on how best to export a model from Maya to Flash. Is there a tutorial on how to do this? thanks! ...

Flex Catch Keydown

I want to handle the keydown event globally in my application and as such have added the event handler to the top most DisplayObject in the display list. However, the event doesn't seem to fire unless the cursor focus is on a Textbox or Datagrid or the like. How can I have key presses handled globaly by the application? ...

flex actionscript not uploading file to PHP page HELP!

hello, please help! I am using actionscript 3 with flex sdk 3.5 and PHP to allow a user to upload a file -that is my goal. However, when I check my server directory for the file... NOTHING is there! For some reason SOMETHING is going wrong, even though the actionscript alerts a successful upload (and I have even tried all the event lis...

set movie clip "on-top"

I want to do a effect like the switching windows from Win 7 [Win]+[Tab] keys pressed. I created two "windows" (movie clips) and when I click on the 1st it displays on top of the other, but the problem is when I click on the 2nd I can see the 1st one displayed in it. Is there any way that i put a movie clip on top of the other. Thanks ...

Passing GET variables from Flash to PHP with Chinese characters

Hi Everyone, I'm calling a php file from Flash and adding variables afterwards like so: http://www.randomwebsite.com/something.php?title=爸爸 It works fine if I copy and paste this directly into the web browser, however if I call it through flash, the address bar would end up like this: something.php?title=?? Is there anything I can do ...

ComboBox, is there an event for item hover?

I'm using the <s:ComboBox> flex component which I suspect is very similar to the mx one <mx:ComboBox> What I'm trying to do is listen to the event of the mouse moving between the items of the list. There's a change event, but it kicks in only when the item is clicked/selected from the list. What event would I need to listen for when i...

Air/Flex concatenating a variable with a property

I have three text boxes on the stage id=red, blue, green same as the keys in my cars Object/Array <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" ...

ActionScript: Using 'in' on protected/private variables?

Is there any way to mimic the in operator, but testing for the existence of protected or private fields? For example, this: <mx:Script><![CDATA[ public var pub:Boolean = true; protected var prot:Boolean = true; private var priv:Boolean = true; ]]></mx:Script> <mx:creationComplete><![CDATA[ for each (var prop in ["pub",...