actionscript-3

How do I get the domain of the page that's loading my swf when I don't have script access?

I need my swf to be able to see the domain of the page that it's loaded on. Normally to to this I would just look at window.location over ExternalInterface, but in this particular case the swf is going to be embedded with allowscriptaccess="never", so that's not going to work. Is there an actual api that will give me that or do I have to...

ActionScript: how can I get xml nodes by attributes

I have XML below <node id="id1"/><node id="id2"/>... <edge id="eid1" fromId="id1" toId="id2"/> <edge id="eid2" fromId="id3" toId="id1"/> <edge id="eid3" fromId="id2" toId="id4"/> Now I need get all edge base on nodeId, nodeId = id1 -> eid1, eid2 nodeId = id2 -> eid1, eid3 nodeId = id3 -> eid2 nodeId = id5 -> Null ...

increase display speed of full screen adobe flash player application

HI. I'am under ubuntu 10.04, live CD. I run my adobe CS3 application in the stand-alone flash player V10. screen resolution : 1280x1024 I've set the /etc/adobe/mss.cfg file parameters. But, in full screen, the display performances are divided by 2!!! Is there a solution ? - Ubuntu optimisation ? - new flash player version ? - CS3 par...

Is it possible to export a MovieClip or Graphics object to a vectorial format?

I want to export some vectorial drawings to a vectorial format (eps, svg,...) from a Flash application. Everything is vectorial in my application so it should be possible to do it, but I can't find a solution... Is it possible? How? ...

EventDispatcher undefined in Flex 4 class

Hi all, My class in ActionScript works perfectly, it all it's job but my only concern is that I have a textfield binded to a getter property and although this initially works perfectly, whenever the property updates the value will not change on the textfield =( public function get XMLCollisions():String { var s:String = new String();...

How to anti-alias a dynamically loaded PNG in Flash

Hello everyone, I have a Flash file that I use to load in transparent PNG's (line-drawings), and use Flash to allow the user to select the color of drawing, and instantly change the color. This is all working like it should be. I am using the UILoader component to load in the image that I recieve through flashvars, and then change the ...

Is it possible to improve the performance of this drawing technique?

Am currently working on a tool created by a colleague of mine and would like to improve performance. Basically, it's a tool for drawing on screen and uses a combination of Sprites and the Graphics class to draw a line segment every time the mouse is moved when the mouse button is down. Here is the drawing bit: // on MouseMove protected...

Adding a Preloader in CS5 as3 project

I am Working on a cs5 as3 project and in that project i have writen all code in the frame1 of main timeline (there is no package/class in the code) The code in the main timeline is very complex in which i am loading external images and xml's and many more things . i have not written any code in the action layer. Now i want to add Prel...

When using PopUpManager to instantiate an mxml component, How can I call a public function of that component to pass the component data?

Basically I am poping up the following component: PopUpManager.centerPopUp(PopUpManager.createPopUp(this,RegionExperienceDetailPopUp,false)); I need to call RegionExperienceDetailPopUp.generateData(passIntArray); What is the syntax to do this? ...

Trim whitespace around a transparent PNG

So, I've managed to get myself stuck in a situation where a database full of images ( transparent images of various products ) needs to be placed on the stage, all of which need to be aligned the same by the products height. My problem is that the png's of products are 'floating' and I have no control of where about's in the png it will...

AS3 clone MovieClip

The below is my code for trying to clone the MovieClip and it doesn't work. We should see two cirles if the codes is working correctly. /*The original MovieClip*/ var circle:MovieClip = new MovieClip(); circle.graphics.beginFill(0xAA0022); circle.graphics.drawCircle(40, 40, 40); circle.x=10 addChild(circle); /*CLONE the MovieClip - IT ...

FLEX/amfPHP ActionScript error 2048

Hello guys. Sorry about the mishmash of words in the title, but that's how confused I am. I can't even summarize the error I'm getting in a simple sentence. This flex/amfphp application works fine on my computer, even though it accesses an Oracle database on another server. However, when I try to access it from another computer, this is...

Audio not playing in Flash AS3

Hi guys, I've been trying to play an external sound file in Flash and failing miserably. The code couldn't be simpler: var s:Sound = new Sound(); var req:URLRequest = new URLRequest(MovieClip(root).videoLink); var context:SoundLoaderContext = new SoundLoaderContext(3000, true); s.load(req, context); var my_channel...

textfield.text not showing every characters.

Hi all, I have a setup a PageHolder class (based on MovieCLip) that displays a doted area with a (page) number in the middle. Now attempting to populate my LayoutPane, I create new instances of of PageHolder whose constructor is tasked to set the text value of its only Texfield to the value specified in the new PageHolder parameter. T...

Skinning a Button component in pure AS3 / Flash?

Hi, I'm trying to "skin" my Flash application's buttons using either ActionScript or Flash Professional, without having to rely on Flex code or libraries. Right now my buttons have no skins at all, though there is black text where the label is, so I know they're there. I've tried using the getStyle and setStyle methods, but can't get ...

AS3: Run methods in an ordered sequence

Hi: I have a class with several methods I must run in an specific order. So, I created a kind of chain where each one calls the next in its last sentence (sometimes with calls, sometimes dispatching events): internal function a(evt:SwapEvent):void { //started from custom event ... b(); } private function b():void { ... bTime...

Actionscripts 3 Clone MovieClip

How do we clone a copy of an "Instance name"? Thanks guys //The test_close is an instance name which I drew on the canvas. var cloneMe:MovieClip = new MovieClip(); cloneMe.graphics.copyFrom(test_clone.graphics); //here is my clone codes addChild(cloneMe); trace(cloneMe.getBounds(cloneMe)); ...

Components for actionscript 3

I need to make something like this window that is called TweenLite/Max Explorer in the middle of the page of this site: http://www.greensock.com/tweenmax/ .I also use flash-cs4 and actionscript 3. Is there something that i can use or i have to program from scratch? Basically i need the selectable grid in which i can embed buttons and whe...

Drag and Drop UI in flash

What is the best GUI widget kit to implement a drag and drop interface in Flash. I hope to have a list from where block like items are dragged and their arangement on a continuum is serialized. Similiar to how one would compose a song or a video out of blocks. ...

Publishing SWF that uses Flex SDK

When i test the flash application from inside the flash-cs4 it works fine, but when i try to export the movie, it gives an error: You have used a feature that requires the Flex SDK: Embed metadata Please set the Flex SDK path if necessary and add it to the library path for this file. The Flex SDK folder contains the bin, frameworks, li...