actionscript-3

How can I get values from Flash Authoring in JSFL via XMLUI ?

I want to set a variable from a flash file so that I can access if from JSFL in a Command. I am using a element in JSFL's XMLUI: Here's the JSFL: fl.getDocumentDOM().xmlPanel(fl.configURI + 'Commands/ATest.xml'); fl.trace(fl.xmlui.get('secretword'));//this traces undefined The XMLUI: <dialog buttons="accept,cancel"> <textbox id="...

Why is my object reference null when trying to reference an mx:Canvas from ActionScript?

Hi everyone, this is a follow up question from this one, I don't want to keep going in the comments and preventing people from getting hard-earned reputation... :) In my Cairngorm command class, to get it to compile I needed to tell it what myCanvas was, so I used this line: var myCanvas : MyCanvas = new MyCanvas; I'm guessing that's...

Timer alert - FIX

I have a timer alert: private var cheat:Timer; private function init():void { cheat = new Timer(2000, 1); cheat.addEventListener(TimerEvent.TIMER_COMPLETE, cheatProtection); } private function showAlert():void { cheat.reset(); cheat.start(); } private function alrt_close(evt:CloseEvent):void { cheat.stop(); } priv...

How to access Child variables after they've been created

I'd really appreciate a point in the right direction, actionscript and flashbuilder are pretty new to me and i feel my knowledge has some pretty fundamental gaps in it still and I'm struggling to plug them. Anyway. So I have some rather simple circles based on an AS class called CircleA: > Package components { >     impo...

How to read or extract cuepoints created live, with Nestream.send() in Flash Media Server?

Im doing live streaming directly from webcam like Ustream.TV. Im using Flash Media Server 3.5, and I record cuepoints of broadcaster with the method ns = new NetStream(); ns.send('functionName' , 'value'); I publish the content and record it in a .flv file. However when I download this FLV file and extract the metadata with tools like ...

How can I add a pre-loader to an existing complex flash project.

I have a pretty complex flash project that I need to add a pre-loader to. Currently all the items we have are in the Library inside the .fla file. I've been reading a few of the pre-loader blog entries and tutorials and getting nowhere. I've tried to create another .fla file that loads the compiled .swf file of the complex project and ...

AS3: URLStream saving files to desktop?

hey guys, i found a few scripts online and combined them to this. I want to download files from the web to my local harddrive. Any idea what i'm doing wrong? var fs:FileStream; var stream:URLStream; var _output:Boolean = false; init(); startDownload('http://www.teachenglishinasia.net/files/u2/purple_lotus_flower.jpg'); function init()...

video metadata - duration not always accessed

I'm creating a video player in an environment where stream.bytesTotal isn't available. I need to use the duration metadata encoded in flv files to extrapolate for things such as the play progress, and the time display. The problem is when loading an flv the metadata, including the duration, fails to be accessed 2 out of 3 times. Here is...

Why does as3crypto say "Invalid padding value"?

What is the cause of the error "Invalid padding value" in as3crypto? Error: PKCS#5:unpad: Invalid padding value. expected [153], found [25] at com.hurlant.crypto.symmetric::PKCS5/unpad() at com.hurlant.crypto.symmetric::CTRMode/decrypt() at com.hurlant.crypto.symmetric::SimpleIVMode/decrypt() at com.mycompany.myproject::...

Flash CS4 pass variable from javascript function to actionscript and back

I want to pass the result of a js function into actionscript when the js function is called from actionscript. The js parses a url and returns the var in the url. In actionscript the functions are declared: function gup(name1:String) :void { flash.external.ExternalInterface.call("gup", name1); } function printAlert(group2:String) :voi...

Moving objects with Timer

I have this class named MovingObject which extends the MovieClip class. This class will be instantianted for several times. Inside this class is a Timer that handles the speed of the objects moving. There is another class called TheStage and this is where I will instantiate MovingObject (s). public class MovingObject extends MovieClip{...

Objects with Timer in AS3

I have this class named MovingObject which extends the MovieClip class. This class will be instantianted for several times. Inside this class is a Timer that handles the speed of the objects moving. There is another class called TheStage and this is where I will instantiate MovingObject (s). public class MovingObject extends MovieClip{...

How to assign URLVariables result to a String Variable?

In the following example (yes, I am coding on my timeline while I try to work this out - I know, I know) I am loading an SWF in an HTML page and then directing the SWF to get the query parameters from the current URL. The query parameter will contain the source for the video to play. This seems straight forward to me but I cannot get my...

Unable to reload the swf again in my flex applicaion (AIR)

Hi, In my flex application I am showing a titleWindow as popup which has a swfLoader and it loads one swf file. My application and the loaded swf file communicate with the help of LocalConnection. And here is the flow. When the popup opens, I create a connection. connection:LocalConnection = new LocalConnection(); connection.client ...

AS3 photoshop brushes

Hi, I'm searching for a way to build a photoshop like drawing tool in ActionScript 3. Especially I want to build something like the brushes in photoshop. So that you can use different PNG's as a brush. I tried it with saving a brush in photoshop as a transparent png, import it into my AS3 project and with a mouse move event, draw the p...

Adobe AIR Updater Problem

Hi everyone, i just wanted to update an AIR Application for a client. But when the update framework (i'm using the ApplicationUpdaterUI) has downloaded the AIR file and wants to install it, it says that the AIR file is damaged. When i'm installing the downloaded file (copied it from the #ApplicationUpdate dir) by hand everything works f...

Font embedding does not work or?

So - I have this weird problem. I have a major project, no details needed except that it is split to many SWFs, and so - I would like to use a Shared Library to embed the fonts. Done - sl_fonts.swf loaded, fonts - checked and working, the rest of the SWFs are loaded AFTER (checked by a preloader). Now - again, I traced the result of th...

onResult HTTPService

I have a HTTPService: <mx:HTTPService id="scoreService" url="http://" method="POST" result="onResult(event)"> <s:request xmlns=""> <name>{..}</name> <score>{...}</score> </s:request> </mx:HTTPService> And a script for (event): private function onResult(e:ResultEvent):void { ...

How do I fix this potential bug with the Button Component in Flash ?

I need to use the Button component from the UI Components Panel in the Flash IDE, with the toggle property set to true. If I use it with a timeline script it works great. If I use within a class(a Document Class), the selected property is reversed (I get true when it's not toggled and vice versa). Also if I set toggle to false in the...

Moving Libs from Root to /libs

Hi there, righ now i'm using Flex 4.1 libs, when compiling Flex puts all used libs into the root of the application, however - i don't want them there, i want them to be inside Flex_root/libs. Anyone a clue where i can change the lib location? ...