This repository was archived by the owner on Mar 23, 2019. It is now read-only.

Description
Originally filed by siddh...@gmail.com on 2011-04-25T05:31:41
What steps will reproduce the problem?
- When swf file is loaded in top of mainApplication Swf (or Wrapper file) file.
- When moving from Flex 3 to Flex 4
What is the expected output? What do you see instead?
We should be able to see the window shade component ( button) .
We are not able to see the button
Error message is displayed
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at flexlib.containers::WindowShade/createOrReplaceHeaderButton()
at flexlib.containers::WindowShade/createChildren()
at mx.core::UIComponent/initialize()
at mx.core::Container/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
What version of the product are you using? On what operating system?
Flex builder 4.0 and SDK 4.1.0
Please provide any additional information below.
My Wrapper file (Main Application.mxml )
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="actionScriptFunction()" >
<fx:Script>
<![CDATA[
import flash.external.*;
import mx.controls.Alert;
import mx.core.FlexGlobals;
public function init(event : Event):void
{
myLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
private function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
}
public function actionScriptFunction():void
{
myLoader.source = FlexGlobals.topLevelApplication.parameters.automationswfurl; <!-- + "?" + urlVars.toString();-->
}
]]>
</fx:Script>
<mx:SWFLoader id="myLoader" width="100%" height="100%" loadForCompatibility="true"
preinitialize="myLoader.loaderContext = new LoaderContext(false, ApplicationDomain.currentDomain)">
</mx:SWFLoader>
</s:Application>