actionscript

How to invoke an ActionScript method from JavaScript (HTMLLoader) object in AIR?

So I have an Application Sandbox HTMLLoader object which I create in AIR and simply want to call ActionScript methods from JavaScript. In Flash, this is accomplished through our trusty ExternalInterface.addCallback() function. However in AIR, things are quite a bit different, and I just can't seem to get it to work. Here is a simplified...

How can I test a SWF URL before Loading Styles From if (or catching the error)?

I am trying to use the following code to load styles from an external SWF, but I keep getting an ActionScript error when the URL is invalid: Error: Unable to load style(Error #2036: Load Never Completed. URL: http://localhost/css/styles.swf): ../css/styles.swf. at <anonymous>()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\sty...

Play video from local file using Adobe AIR

I'd like to play videos, as well as display images and possibly other flash content using adobe air, and reading from the local file system. I've been searching APIs and I have not yet been able to connect the dots. I know of flash.filesystem.File and flash.filesystem.FileStream and have experimented with loading and reading files. I be...

How do Google Maps do their panoramas?

How do Google Maps do their panoramas in Street View? Yeah, I know its Flash, but how do they skew bitmaps with Correct Texture Mapping? Are they doing it on the pixel-level like most Flash 3D engines?, or just applying some tricky transformation to the Bitmaps in the Movieclips? ...

What is the best way to associate an Event with a Class in ActionScript / Flex 3?

ActionScript 3 / Flex 3 - Adding custom events to a class Say I have the following Event: import flash.events.Event; public class SomeEvent extends Event { public static const EVENT_ACTION:String = "eventAction"; public function SomeEvent(type:String) { super(type); } override public function clone():Event { ...

How to make cross-domain communication between JavaScript and Flash?

How do I open 'cross-domain security', so the JavaScript on the page can freely communicate with the SWF, even when this is hosted on another domain? I know for certain that this function communication is blocked by default, but by playing around with a file called "crossdomain.xml" and the actionscript 3 function: system.Security.allow...

ActionScript 2 vs ActionScript 3 performance

Any benchmarks of Integer, Array, Function, Class, etc, performance in these 2 languages (compilers)? Comparisons would also be helpful. ...

ActionScript 2 boxing performance

I heard that AS boxes and un-boxes values every time arguments are passed into/out of functions. A. Therefore, would this be faster? var val = doWork(50,"hello", 2048); function doWork (param1,param2,param3){ t.text = param2; return param1+param3; } B. Or this? var val:Number = doWork(50,"hello", 2048); function doWork (para...

URLLoader gets stuck when polling

Update: somehow this works when running flash in browser, but doesn't work if you run from IDE. You might want to try running in browser if you have the same problem. I am making a chat application that repeatedly reads a text file from my server using Flash & Actionscript 3.0. I am opening the file with URLLoader, and it works fine at ...

Lost ability to Tab through TextFields with Components

I have 8 TextFields placed on the stage. I have a tab order setup and was able to get to the next field by pressing Tab. After adding 2 components (UIScollBar and Button) to the stage, I have somehow lost this ability. How can I get it back? ...

Interacting with actionscript 2.0 using javascript

As the title says... I'm trying to interact with my flash movie's actionscript via javascript. Specifically I'm trying to send text to my flash movie. I've come across a couple sites that had some walkthroughs but I for the life of me could not get them to work. From the adobe site. http://kb.adobe.com/selfservice/viewContent.do?externa...

Checkstyle for ActionScript (Flex)

HI, I'm currently working on a project that uses Flex and Java. In Java we easily enforced a coding standard with Checkstyle, and we want to do this for Flex. Does anybody know of a tool similar to Checkstyle that would allow coding standard checks? (I've googled for this but found only one project written in python and it seams abandon...

How do I change text color using flash actionscript 2?

How do I change text color using flash actionscript 2? ...

Recommendations for an HTML-Friendly RichTextEditor for Flex & AIR?

As a side project, for "fun," I'm rewriting my blog and CMS in Flex and AIR respectively, and while I'm pretty well satisfied with the design thus far, the one major pain point remains working with (which is to say performing CRUD operations on) legacy HTML content, and rendering that HTML content decently in both the browser and the Fla...

Get bounds of filters applied to Flash Sprite within Sprite

I have a Flash library with Sprite symbols composed of other sprites with design-time applied filters. I'm embedding those symbols into a Flex application like so: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&gt; <mx:Script> <![CDATA[ [Bindable] [Embed(source="Resources.swf", symbol="Squ...

Flash if statement satisfies true and false

I have the following code: if(pickedUp == true){ trace("released and picked up" + pickedUpNum); this.storedClick = false; this.onMouseMove = null; this.onMouseDown = null; this.onMouseUp = null; this.onEnterFrame = this.refresh; pickedUpNum++; if( pickedUpNum > 60) pickedUp = false; } if(pickedUp == false){ trace("released and...

Lingo call to ActionScript not working

Hi, I have a Flash sprite in my Director project. Under the Properties of that sprite, under both the Member and the Sprite tabs, it has as its name "Assessment". In my Lingo script, I have the following call: sprite("Assessment").displayGrade(75, 3, 4) where displayGrade is a function defined in the Flash object's ActionScript as a ...

Matching web service results to requests in Flex

A little (!) bit of background before I can get to the question : I have an accordion control loaded with an array of grids, each of which is lazy loaded with arrays of things. I'm using an auto-generated web service proxy to retrieve these lists. I'd like for the user to be able to change the selected child in the accordion without hav...

flex3 function not returning String properly

hi guys, im trying to return a string value from a method inside my script tag however it always returns an object and i cant get at the string value. Here is the code: i retrieve the object returned from a webservice call;; private function getNameResults(e:ResultEvent):String{ var name:Array = new Array(e.result); var...

Has anyone turned Flash Page Flip into a draggable Pick Up Paper?

I am trying to turn the the flash page flip (source: http://76design.com/shiftcontrol/index.php/2005/07/03/dynamic-page-flip/) into a single page that can be lifted up, dragged around, and set back down. All looking very realistic. Does anyone think they can accomplish this? Or have you seen this modification anywhere? Thanks ...