actionscript-3

Sending an E-mail with attachment with PHP from Flex

Hey, I've made a custom compontent wich mails your own drawings to you. But I have a problem to send an e-mail with attachment. I use the HttpService to send the data to the php-file, but I always get the Fault message (form phpFault()). This is my code in Flex: <mx:Script> <![CDATA[ import mx.rpc.events.FaultEvent...

AS3 Listener across object instances - possible / good or bad practice?

I have a question regarding as3 listeners, and instances of a class. The main question: is there a way to dispatch an event from the button instance in such a way that the other button instances can listen (without the need for a listener in the document class) Lets say i have a document class and a button class. The document will have...

Resources for Learning ActionScript 3.0 as a Professional Programmer

I will be teaching myself ActionScript 3.0. I'm a professional programmer with great knowledge of C++, C#, Objective-C and Java. Is there any good source for learning the language that doesn't take a lot of space teaching the reader OOP and other beginner level information? More like "classes in ActionScript differs from classes in C++ i...

How to change the pixels in an image

Hi, i actually try to do the following: I have loaded an external image in a bitmapdata object and create a bitmap from it which i attach it to a sprite/MovieClip in order to have mouse events on it. Now under the previous logic i loaded two images (let's say circles) of the same size one that has a particular color and is covered by its...

What are the key differences between JavaScript and ActionScript 3?

I know both languages are from the same ECMA standard. It seems that the two are becoming very similar with JavaScript adding event listeners and the such. I was wondering what the differences are? ...

Confirming Google Analytics Install in Flash Environment using AS3 Mode

Just created a new GA account and initialized my tracker in AS3. How can I confirm that it is installed and working correctly? In GA web view it shows "Tracking Not Installed" but when I use the "visualDebug" parameter (set to true) in Flash, it appears to be sending OK via trackEvent. Would it not show up as installed since it's not on ...

Failing to import a class in ActionScript

Here is the error I get: 1046: Type was not found or was not a compile-time constant: fbAPI. Here is my MXML: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="startGame();"> <mx:Script> <![CDATA[ import fbAPI; public function startGame(...

Flex: Copying bitmapData of a loaded image into another SWFLoader

I have 2 SWFLoaders like so: <mx:SWFLoader width="10" height="10" complete="imageLoaded()" id="ldr_src" source="img.jpg" scaleContent="true"/> <mx:SWFLoader id="ldr_target" scaleContent="true"/> private function imageLoaded():void{ var bm:Bitmap = new Bitmap(ImageSnapshot.captureBitmapData(ldr_src); ldr_target.source = bm; } ...

Creating a custom file format for Adobe Air

I'm just starting out with my first Adobe Air project (I'm a pure AS3 developer by trade). I'm planning to build an image editor which supports layers. I'm wondering what the best way would be to store an entire project including layer data (images) to a users hard disk. I'm wondering if there is any pros/cons in creating a custom file ...

Amazon S3 Integration

Hello, I am trying to integrate S3 with one of my content management systems. The idea is that I want to have document control features. The system is quite unique in that it handles thousands of sites, then each site can have any number of contributors or authors who have permission to upload documents and files to the document contro...

(mx.core.UITextField is flash.text.TextField) returns false. How is that possible?

I'm traversing the children of an SWF loaded using flash.display.Loader, in an AS-only project under FlashDevelop. Calling flash.utils.getQualifiedClassName(obj) on the object returns "mx.core::UITextField" and while it is a subclass of flash.text.TextField, Calling (obj is flash.text.TextField) returns false. Any insights on that? Am ...

Flex/AS3 incompletely decoding WSDL XML on one particular operation. How on earth do I remedy this?

I am currently consuming a WSDL in Flex, that is on the back-end served by .NET. ALL of the operations seem to work fine, except one, whose result object is not being properly parsed by AS3 for some odd reason. I have inspected the response XML in Fiddler/Charles and the data is there, but in NOT in the result in the Flex variable inspec...

Need help with Sprouts (Ruby + RubyGems + AS3) - can't rake

So I'm trying to use Sprouts for AS3. I've installed Ruby and I've installed RubyGems, and I'm able to create a new project using "sprout -n as3 MyProject" - that builds fine. However, when I enter into that folder and type "rake" it errors out with the message "Could not find RubyGem win32-open3 (= 0.2.5)" I've googled around a little...

Putting Class Documents Together, as3

The code for the counter was easy to follow, but I'm stumbling through this next phase. Getting a counter display "images" instead of dynamic text. One of my mentors gave me the code this way. I've got a working example, but I messed it up. Can someone explain how to put this together? Documents numbers.fla NumberDocumentClass.as...

AS3 - get access to the internal bitmap used by CacheAsBitmap ?

is it possible to get access to Flash's internal bitmap cache of an object when CacheAsBitmap is on ? eg, something like: var bmd:BitmapData = someDisplayObject.getCachedBitmapData(); if (bmd != null) trace("stoked!"); else trace("bummer. got to bmd.Draw(someDisplayObject) ourselves."); seems unlikely, but thought i'd ask. t...

gotoAndStop(); flashdevelop or flex

I have a custom class that embeds a movie clip. When I try to use parent class's such as gotoAndStop(). It ignores the method. I would like to know what I am doing wrong. below is my code. I call the method in my constructor Thanks! game object class package com.objects { import com.eapi.IGameObject; import flash.display.Movi...

Selecting and Setting Style to DataGridColumn after passing the DataProvider

I have a Datagrid thats being populated by different Arrays... (headers/columns change for the same DataGrid)... I would like to Select a Column of the Datagrid after it was generated by the Dataprovider and Bold it, and place it as the 'last column" This is what I have.... and throwing an error: private function populateGrid(evt:Obje...

Is there a way to listen for changes in a flash.display.DisplayObject visibility in a loaded SWF?

I'm loading an external SWF (pre-made by an other department of the company I work for) using flash.display.Loader. I then traverse the display list, register all objects and listen for added/removed events to handle future changes to the list. var obj:DisplayObjectContainer = loadEvent.currentTarget.content as DisplayObjectContainer; v...

How do you scale a dynamic textfield in flash from the center point using as3?

I'm trying to make a text effect where on every frame the textfield increases in size and decreases in opacity. I'm using the scaleX and scaleY properties of my dynamic textfield to enlarge, but it's doing so keeping the left registration point fixed. I want to make it scale up radially outward, or with the center point fixed. Can any...

Generate SVG from dynamic text

Is there a way to save text from a dynamic text field into some kind of SVG format? ...