Skip navigation
Currently Being Moderated

AS3 Flash pro  Banner Ad

Jul 5, 2012 10:03 AM

Tags: #error #flash #as3.0



TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@2d093e41 to fl.motion.AnimatorFactory.






// ......



   function(event: MouseEvent) : void { URLRequest( root.loaderInfo.parameters.clickTAG), "_blank");





When I publish and open the HTML in browser the mouse pointer doesn't change from arrow to hand indicating link, but if I click on it it does go to the url.



  • Currently Being Moderated
    Jul 5, 2012 10:53 AM   in reply to POLMXN

    If invisClick is a MovieClip, you need to set it to behave like a button ( as in invisClick.buttonMode = true;). 


    You should not be nesting that function in the event listener.  Keep the function outside and just reference it by name in the listener.

    Mark as:
  • Currently Being Moderated
    Jul 5, 2012 2:55 PM   in reply to POLMXN

    First, you should not ignore error messages -  there is nothing normal about them, especially the 1009 error - it indicates some object your code is targeting does not exist. 


    Go into your Flash Publish Settings and select the option to Permit Debugging.  What that will do is add information to the error message, particularly the line number of the offending code. 


    Since your code above does not include a function named clickHandler, that could be related to the problem... you might have some old code that needs to be removed.

    Mark as:
  • Currently Being Moderated
    Jul 5, 2012 3:30 PM   in reply to POLMXN

    I don't think line 4 is the problem, but it is the source of the error message because clickTag is not instantiated at that point. 


    Line 3 is not correct whatever it is trying to do.  My guess is that instead of what you show it should be more like...


    var clickTAG:String = root.loaderInfo.parameters.clickTAG;

    Mark as:
  • Currently Being Moderated
    Jul 5, 2012 4:06 PM   in reply to POLMXN

    If you still get the error, there is still something wrong, but without showing the entire error message I can't help.


    If invisClick is a MovieClip symbol, you haven't showed anything being done to make it behave like a button, so I cannot say if that's why.  My earlier reply addressed how to make it so.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points