CustomEvent TypeError: Error #1034: Type Coercion failed

Posted in Flash, Problems on April 1st, 2010 by eccheung4

TypeError: Error #1034 Type Coercion failed: cannot convert com.events::CustomEvent@###### to com.events.CustomEvent.
at flash.events:EventDispatcher/dispatchEventFunction()
….blah,blah,blah,blah

This was an error I was getting and I couldn’t figure out what was causing it. Turns out its a simple fix. I was loading a swf that dispatches a CustomEvent. To get rid of this error I just needed to import the CustomEvent Class in the main class that is loading the other swf.

import com.events.CustomEvent;

Then somewhere in you main class, you add

CustomEvent;

Tags: ,

Access the protected TextField in TextInput control for Flex

Posted in Flash, Flex on July 26th, 2009 by eccheung4

The other day, I was struggling trying to get access to the textfield of a TextInput Control, which was protected. I needed it because I was loading an AS3 swf into a flex project and it needed to be passed a reference to a textfield to interact with it, but in flex it was a textinput control which contains a textfield. You can’t ues textInput.getTextField() because its protected.

To make it work you simply add:

import mx.core.mx_internal;
use namespace mx_internal;

I found out about it in this forum thread
http://www.actionscript.org/forums/showthread.php3?t=173666

Tags: , , ,

www.thearmyexperience.com Redesign

Posted in Flash, Papervision3d on June 25th, 2009 by eccheung4

thearmyexperiencecenter

Just launched a redesign of http://www.thearmyexperience.com/careers/. We were able to use much of the old code and turned the 3D helix into a 3D Wall instead. I worked on converting the 3D helix into the 3D wall and another designer/developer animated the wall.

I also worked on adding interactivity to the Watch Soldier Profiles section. The last 16 or so videos are interactive with 2 info windows per video. A button pops up at a certain time period during the video allowing the user to click on it to open an info window. This capability was also added into the Locate Global Bases which uses Google Earth (Fort Benning, Georgia and Fort Hood, Texas are the only 2 that have this currently. You can check it out by clicking on the Lifestyle button after clicking on the base).

Tags: , ,

InsideRIA: Facebook Application Development with AS3 Series

Posted in Flash, facebook on April 17th, 2009 by eccheung4

InsideRIA started a new series of articles covering Facebook Application Development using the new Facebook ActionScript 3 library. They always produce great articles and I’m sure this will be a great series with 20 articles to come!

InsideRIA: Facebook Application Development with AS3

Tags: , , ,

Facebook Connect and Flash AS3

Posted in Flash, Flex on March 26th, 2009 by eccheung4

Obviously Facebook is popping up everywhere and I’m sure a lot of companies will be looking to integrate it with flash. Pieter Michels has started a great effort in bridging Facebook Connect and Flash using Actionscript 3. He provides a simple example using Flex and AS3.

Pieter Michels post on Facebook Connect to Actionscript 3
Pieter Michels Code Library at github as FBFlashBridge

Example of Facebook Connect with Flash at http://connect.redbullusa.com/

http://developers.facebook.com/
Facebook Connect Wiki
Facebook Developer Forum

UPDATE 3/30/09: I just noticed this post while looking through Facebook documentation. Looks like Adobe and Facebook are officially working together to support Flash and Facebook.

ActionScript 3.0 Client Library for Facebook Platform - revamped open source version by Jason Crist
Adobe Developer Connection for Facebook - materials and samples

Tags: , , , ,

Army Experience Center Career Navigator

Posted in Flash, Papervision3d on March 12th, 2009 by eccheung4

Army Experience Center Career Navigator
Forgot to mention there was an recent update to the Career Navigator for the Army Experience Center. I worked on making the Papervision 3D helix loop around and adding in the job titles on the planes and various other bug fixes and improvements.

Text in Papervision 3D - Clearing Things Up - This post by Andy Zupko helped with making the text a bit clearer on the planes (basically you need to use a larger textfield and change some settings) - check out his post and demo if your text is unclear on planes.

Tags: , ,

ComboBox Problem - not displaying correctly when loaded in parent swf

Posted in Flash, Problems on February 27th, 2009 by eccheung4

I remember this previous problem with a ComboBox not showing up properly when a swf is loaded into a parent swf and the problem came up again as I was updating a project to AS3.

Main reason for problem (according to yarcub):
“The component uses system fonts and masks only work on embedded fonts.
Finally the FP10 new text engine will fix a lot of those issues.”

Here’s more info on the problem and possible solutions:
http://www.gotoandlearnforum.com/viewtopic.php?f=29&t=19118

Tags: , , ,

WARNING: Text field variable names are not supported in ActionScript 3.0.

Posted in Flash, Problems on February 15th, 2009 by eccheung4

I’m working on converting a AS2 project to AS3 and this error showed up. “WARNING: Text field variable names are not supported in ActionScript 3.0.” I had trouble finding the problem, but it turned out I just had to change the publish settings back to AS2 first then I could delete the text field variable being used for the text field. You can’t change or even see that there is a text field variable when the publish settings are AS3.

Tags: , , ,