actionscript

Where to learn ActionScript 3.0?

I was just informed that I need to learn Actionscript for a project. I don't even have flash on my machine yet and I need to give a presentation on tuesday on how we will be building this. So, its time for a little cramming, where can I study up on some actionscript? ...

ActionScript 3.0 + Calculate timespan between two dates?

In ActionScript 3.0, is there an automatic way to calculate the number of days, hours, minutes and seconds between two specified dates? Basicly, what I need is the ActionScript equivalent of the .NET Timespan class. Any idea? ...

Flash/Actionscript2 - Can't get comboBox "change" event to fire

I'm trying to use the combobox component for Flash. I can't get the change event to fire. My code is pretty much straight of of the adobe site (link below). The box gets populated but changing the value produces no trace output. What am I doing wrong? Thanks http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.h...

Positioning flash content using CSS

I have a generated HTML page with flash content in it. I am trying to reposition the flash content and make it "absolute". I have tried to wrap the object tags with a div tag, but to no avail. Can anyone tell me how to do this? Removing the generated positioning attributes does not work. See relevant code below (it is not very neat, bu...

How do you trigger javascript functions from flash?

How do you trigger a javascript function using actionscript in flash? The goal is to trigger jQuery functionality from a flash movie ...

How do I change the colours of a textarea in actionscript?

I create a TextArea in actionscript: var textArea:TextArea = new TextArea(); I want it to have a black background. I've tried textArea.setStyle("backgroundColor", 0x000000); and I've tried textArea.opaqueBackground = 0x000000; but the TextArea stays white. What should I do? ...

Opening a page using actionscript in a custom frame

Is it possible to open an html page using navigateToURL and specifying a named frame in your html document. For instance, if you have an iframe on the page called "Steven", can you call navigateToURL("someURL","Steven"); instead of something like navigateToURL("someURL","_self"); I have tried this and it opens the URL in a new wind...

How do I embed a Google map into a Flash website?

I would like to include a Google map in a Flash site I am building. I would like to retain as much of the zoom, print, copy/send url, direction functionality as is practically possible. Please could somebody advise the best way to do this? Thanks. ...

Flash: How can I force a movieclip to stay inside constraints

I have a flash program that loads movie clips dynamically and sometimes they want to use more than the space that I give them. Ideally I'd like to force them to only show content in borders I give them. The reason I want this is that my program has a user interface that sometimes gets covered up by this behavior. I'd like to avoid rewrit...

How to access AS3 URLLoader return data on IOErrorEvent

I'm writing an actionscript library for an api. I use a URLLoader object to load data from the api. The problem I'm having is that whenever the api returns an http status in the 400s, actionscript treats this as an io error. This is all find and good, however, it seems like there is no way to access any data that was returned if this ...

Libraries for text animation in Flex / Actionscript ?

Are there any good libraries for cool text animation effects for use in Actionscript (for use in an intro screen or banner). I've given up tryin to use Flash itself because that takes forever, and I dont know which of the many flash text animation tools to choose from. I'd like to be able to dynamically product cool text effects with d...

Good examples or documentation of XIFF implementation?

XIFF is an implemenation of the XMPP protocol in actionscript. So far, all the examples and documentation I have seen are sparse. Does anyone know a good explanation of the most recent version of XIFF and/or good examples of working Flex/AIR applications? ...

Are browser based online games possible?

I'm not talking about BB-type text based but rich rpgs with spriting, etc. With the current advancements in javascript for rich browser interfaces, would it be possible to create semi-massive multiplayer online games running on our browsers within the near future? We could say that if we really want games we must stick with c++, but I'...

Scope problem - Controling a movieclip inside a button with actionscript

Hello everyone, I'm trying to show/hide a movieclip (or graphic) symbol that is on a layer of a button symbol using actionscript 2. Here's what I tried in the actions for the button: on (release) { this.button_name.movieclip_name._alpha = 0; trace(this.button_name.movieclip_name); } and the trace returns undefined... so I think I'...

What is the difference between the onMouseUp/Down and onPress/Release events in Flash?

In Flash, there seem to be two sets of mouse click events: onMouseUp, onMouseDown onPress, onRelease Is there any actual difference between these events? I can't tell from the documentation, and I haven't noticed anything in actual usage, but it seems odd to have two different sets of names for the same basic events. Am I missing s...

Actionscript - combining AS2 assets into a single SWF

Hi guys, I have a flash project that I'm trying to export as a single SWF. There's a main SWF file that loads about 6 other SWFs, and both the main and the child SWFs reference other external assets (images, sounds, etc). I'd like to package everything as a single .swf file so I don't have to tote the other assets around with the .swf...

Is it possible to read only the first line of a file with Actionscript?

I've got a PHP-based site where we allow users to upload a comma-separated text file of data to be imported by some server side scripts. However, sometimes we need to adjust the column order of the data that is uploaded, and it would be immensely helpful if we could identify the columns in the CSV file before the upload takes place. The...

XMLSocket working in firefox but not IE

I'm helping a customer who has a problem with a flash app. The flash app uses an XMLSocket to connect to a service running on localhost. It works fine under firefox. It uses the following line to setup the security policy: System.security.loadPolicyFile("xmlsocket://localhost:10032"); Running the flash app under firefox, the service ...

How do I get from an instance of a class to a Class object in ActionScript 3?

How do you get an instance of the actionscript class Class from an instance of that class? In Python, this would be x.__class__; in Java, x.getClass();. I'm aware that certain terrible hacks exist to do this, but I'm looking for a built-in language facility, or at least a library routine built on something reliable. ...

Flex: Call function from included component

This is similar to my previous posting. But this time I want to call a function that exists on the main mxml page. This is my main mxml page: main.mxml <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*"> <mx:Script> <![CDATA[ public function changeText(currentText:String):void{ ...