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: ,

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: , , ,

Set useHandCursor = false for button to disable events behind it

Posted in Problems on January 31st, 2009 by eccheung4

I had this problem in Flash, which entailed disabling some dynamic buttons that had mouseover,mouseout and click events when they were moved under a certain area. This was easily solved by creating an invisible button and setting the property useHandCursor = false. So if you want to disable anything that moves under some area, you can just create a button and set its useHandCursor = false and anything below it will not work. I’m pretty sure I came across this problem before because it seems so familiar. Hopefully this post will help me remember how to solve it and others if they come across this problem as well

Tags: , , ,