actionscript-3

How to save ByteArray to HardDrive from Flash swf?

How to save ByteArray to HardDrive from Flash swf? So... I have a generated if flash ByteArray Now I want to save it to Hard Drive. How to du such thing? ...

xml and external swf documents

My XML scripts work fine in the local swf. If I load an external swf, can I still retrieve XML data from the same way. What problems will I encounter with XML and externally loaded swf files? Based on looking at my sample code, some response about XML problems would be appreciated. Thanks. VARIABLE TYPES var timer:Timer = new Timer(...

Algorithm to generate all possible letter combinations of given string down to 2 letters

Algorithm to generate all possible letter combinations of given string down to 2 letters Trying to create an Anagram solver in AS3, such as this one found here: http://homepage.ntlworld.com/adam.bozon/anagramsolver.htm I'm having a problem wrapping my brain around generating all possible letter combinations for the various lengths of ...

[AS3] BitmapData cut-off

Hello, I am writing a MovieClip rasterizer which rasterizes all the frames in the specified movieclip. Here's the code for rasterizing: for ( var i:int = start; i <= end; i++ ) { //goto the next frame clip.gotoAndStop( i ); //get the bounds bounds = clip.getBounds(clip); //create a new bitmapdata container bitmapData = new Bitma...

Flash AS3 undefined property MouseEvent in document class

Hi guys, this is my first time trying to use document classes in AS3 and im struggling. I am trying to add event listeners to a 2 levels deep movie clip, waiting for a click however i am getting the following error. ERROR: Access of undefined property MouseEvent package { import flash.display.MovieClip; import flash.media.Soun...

flash as3 document class and event listeners

I think i have this document class concept entirly wrong now, i was wondering if someone mind explaining it.. I assumed that the above class would be instantiated within the first frame on scene one of a movie. I also assumed that when changing scenes the state of the class would remain constant so any event listeners would still be r...

Actionscript classes to 1 SWC file

I'm using Flash Builder 4 (the version after Flex Builder 3, so very similar to Flex Builder 3) and have a bunch of actionscript classes that I frequently need to reference. I have them in a separate folder/package to keep things clean. I know that it's possible to create a SWC from these actionscript files. My question is how do I do ...

navigateToUrl AS3 is not opening a web browser

I have a textField on my stage named 'adBuy', which when clicked I want to open up my browser with the defined in URL request. However when I click on the 'adBuy' textField on my SWF it opens Coda, the piece of software I'm using to write this small piece of code? I am puzzled. Here is my code: adBuy.defaultTextFormat = adFormat; adBuy...

actionscript calling javascript with Security Exception

I have a swf hosted at domain A, and I have a html at domain B My swf is able to be loaded from accessing the html at domain B. However, the swf gets a SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://domainA.com/TrialApp.swf cannot access http://DomainB.com/. The as3 is just the below: External...

SWC Loading issue

Hi, Is it possible that even if I'm using a class from a swc it does not get merged into my SWF? I have the SWC as external but as soon as I use any of the classes my swf size jumps. Secondly, if I'm making a preloader should I load the classes and swc in the mainproject or load the compiled swf ? ...

Good MVC framework for AS3

Do you know a decent MVC framework for AS3? I am currently looking into PureMVC but I need some reassurance that it's the best choice. Do I really need to use a framework? or would it be better for me to implement MVC myself? ...

Tween library for AS3

Could someone recommend me of a good Tween library for AS3 (for use with Flash, not Flex) ...

How do you combine a Move and Rotate effect in Flex 3?

I realize you can make one of each effect, set the same target, and hit .play();, but this produces weird results (acknowledged by Adobe, fixed in Flex 4). I'm trying to have an object move from the top of the screen to the bottom while it rotates around it's own center. When called independently, both of these effects work perfectly. ...

actionscript3: reflect-class applied on rotationY

Hi, I'm using a class which applies a visual reflection-effect to defined movieclips. I use a reflection-class from here: link to source. It works like a charm except when I apply a rotation to the movieclip. In my case the reflection is still visible but only a part of it. What am I doing wrong? How could I pass/include the rotation to ...

How to send Data from HTML Form to Flash SWF?

So I have a html form. I need to send its data to flash on submit buttom push. How to du such thing? We have this HTML form <form> First name: <input type="text" name="firstname" /> <br /> Last name: <input type="text" name="lastname" /> </form> We want ON Form items values change to recive tham in Flash app (Via JS for example) ...

AIR SQLite IN expression not working

Hi, I'm having a problem with an expression in my sql statement in SQLite for Adobe AIR basically I have this sql = "UPDATE uniforms SET status=@status WHERE customerId IN(19,20)"; updateStmt.parameters["@status"] = args[1]; updateStmt.execute(); if I run the above code it works, updating the status when the id are 19 and 20 but if...

flex image component

hi, I want to display a png with flex's builtin image component. There's a specific x, y that I want this image to be displayed. How do I do it? I am pretty new to flex. ...

Custom broadcast events in AS3?

In Actionscript 3, most events use the capture/target/bubble model, which is pretty popular nowadays: When an event occurs, it moves through the three phases of the event flow: the capture phase, which flows from the top of the display list hierarchy to the node just before the target node; the target phase, which comprises the targe...

Creating gif/bmp files with flex

public function bmdToStr(bmd:BitmapData,width:int,height:int):String { var encoder:JPEGEncoder = new JPEGEncoder(); var encBytes:ByteArray = encoder.encode(bmd); return ImageSnapshot.encodeImageAsBase64(new ImageSnapshot(width,height,encBytes,"image/jpeg")); } As of now, I am creating JPEG image from bitmapdata as above. ...

ReferenceError: Error #1008 Class is ambiguous

I have a As3 file and I get a runtime error: ReferenceError: **Error #1008**: Tooltip is ambiguous; Found more than one matching binding. I have a class named Tooltip and also a symbol in library with linkage class: Tooltip and Base Class fvg.Tooltip (fvg is the name of the package). Why I get this conflict? ...