Murray Furtado
unread,Nov 12, 2012, 5:25:15 AM11/12/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to soci...@googlegroups.com
Hi I'm trying to embed the Miner in an air app. However if I copy the code from your turorial I get a runtime error:
Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.
at spark.components.supportClasses::SkinnableComponent/addChild()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:1123]
If I then refactor this to use this.addElement(IVisualElement(new TheMiner())); I get the following error:
[trace] TheMiner : Starting TheMiner 1.4.01
[Fault] exception, information=TypeError: Error #1034: Type Coercion failed: cannot convert com.sociodox.theminer::TheMiner@223c881 to mx.core.IVisualElement.
at IndigoAir/OnAddedToStage()[C:\LGIM\Development\Flex Development\indigo\indigo-air\src\IndigoAir.mxml:68]
Is there any way to resolve this in an Air app, or do I have to use the preloadSWF approach?