1 Reply Latest reply on Oct 12, 2010 9:28 AM by Flex harUI

    Error #1007 when component is changed but skin is not



      I am writing a media player component and I get the following error on Flash Builder 4 every time I run the application after making a change to the component code without making any changes to its skin:


      TypeError: Error #1007: Instantiation attempted on a non-constructor.
      at mx.preloaders::Preloader/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\p reloaders\Preloader.as:253]
      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\managers\SystemManager.as:1925]
      at mx.managers::SystemManager/initHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\m x\managers\SystemManager.as:2419]


      After getting this error, if I make a change to the Skin file (for instance, type a space character), save, and re-try, the application runs fine. If I go back and change only the component code again, I get the error. So it seems that I need to force a compilation of the skin every time I change that component (?)

      Has anyone experienced anything similar?


      More details: I am using the VideoPlayer component and its skin as models to write a media player. I replaced the osmf.swc that came with the sdk with the newer osmf 1.0. The component/skin were initially copied from the VideoPlayer component/skin and their code changed. The VideoDisplay component used was replaced by a UIComponent that has a MediaPlayer as child.

      I would appreciate any ideas.