Jump to content
Search Community

Can i ask about LoaderMax?

Jens test
Moderator Tag

Recommended Posts

Hello Sirs & Ladies, 

 

I am an advanced Flex Developer and i am not a Flash Developer. I want to ask about Flex SDK 3.6.0 Alpha because it works for external swf applications. Spark Components won't work from external swf when i am using MDIWindow / MDICanvas  than i call SystemManager with Object(sm_instance.application).variablename or Object(sm_instance.application).functionname()

 

I have created flash-based Desktop with custom external swf application like our desktop loads same application example Notepad or TextEdit or GEdit and any programs.

If you want check my post from stackflowover and adobe-forum

 

spark component frameworks can not load which MDIWindow has components like TextArea or any components and event from external swf application was stopped and crashed and MDIWindow was nothing openned.

 

MX Components work for external swf application fine. This is awesome. and it is very better than spark components.

 

I tell my workstation with flash-based desktop:

MainDesktop.swf

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
				xmlns:flexlib="http://code.google.com/p/flexlib/"
				creationComplete="creationCompleteHandler(event)" layout="absolute">
	<mx:Script>
		<![CDATA[
			import mx.controls.Alert;
			import mx.events.FlexEvent;
			import mx.managers.SystemManager;
			
			[Bindable]
			private var extSM:SystemManager;
			
			[Bindable]
			private var extSM2:SystemManager;
			
			private var _externalSwfLoaded:Boolean;
			
			[Bindable]
			public function get externalSwfLoaded():Boolean
			{
				return _externalSwfLoaded;
			}
			
			public function set externalSwfLoaded(value:Boolean):void
			{
				_externalSwfLoaded = value;
			}
			
			protected function creationCompleteHandler(event:FlexEvent):void
			{
				var context:LoaderContext = new LoaderContext();
				context.applicationDomain = ApplicationDomain.currentDomain;
				loader.loaderContext = context;
				loader.load("PropretiesApp.swf");
				
				loader2.loaderContext = context;
				loader2.load("EditorApp.swf");
			}
			
			protected function loaderCompleteHandlerFromPropreties(event:Event):void
			{
				extSM = loader.content as SystemManager;;
				//    Set the swf loaded flag if you have the SystemManager
				if (extSM)
					externalSwfLoaded = true;
				
			}
			
			protected function loaderCompleteHandlerFromEditor(event:Event):void
			{
				extSM2 = loader2.content as SystemManager;;
				//    Set the swf loaded flag if you have the SystemManager
				if (extSM2)
					externalSwfLoaded = true;
				
			}
			
			protected function loaderIoErrorHandler(event:IOErrorEvent):void
			{
				trace(event.toString());
				Alert.show(event.type + ":" + event.text, "IO error occured");
				
			}
			
			protected function openPropreties(event:MouseEvent):void
			{
				Object(extSM.application).openPropretiesWinCall();
				canvas.windowManager.add(Object(extSM.application).propretiesWindow);
				
			}
			
			protected function openEditor(event:MouseEvent):void
			{
				Object(extSM2.application).openEditorWinCall();
				canvas.windowManager.add(Object(extSM2.application).editorWindow);
			}
			
		]]>
	</mx:Script>
	<flexlib:MDICanvas left="0" right="0" top="0" bottom="40" id="canvas">
		<mx:SWFLoader left="0" right="0" top="0" bottom="0"
					  id="loader" trustContent="true"
					  complete="loaderCompleteHandlerFromPropreties(event)"
					  ioError="loaderIoErrorHandler(event)"/>
		<mx:SWFLoader left="0" right="0" top="0" bottom="0"
					  id="loader2" trustContent="true"
					  complete="loaderCompleteHandlerFromEditor(event)"
					  ioError="loaderIoErrorHandler(event)"/>
	</flexlib:MDICanvas>
	<mx:Button left="10" bottom="10" label="Open Propreties" click="openPropreties(event)"/>
	<mx:Button left="137" bottom="10" label="Open Editor" click="openEditor(event)"/>
	
</mx:Application>

EditorApp.swf ( Sub application )

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundAlpha="0">
	<mx:Script>
		<![CDATA[
			import flexlib.mdi.containers.MDIWindow;
			
			[Bindable]
			public var editorWindow:EditorWindow;
			
			public function openEditorWinCall():void
			{
				editorWindow = new EditorWindow();
			}
			
		]]>
	</mx:Script>
	
</mx:Application>

for component EditorWindow

<?xml version="1.0" encoding="utf-8"?>
<ns:MDIWindow xmlns:mx="http://www.adobe.com/2006/mxml"
			  xmlns:ns="http://code.google.com/p/flexlib/"
			  xmlns:ns1="*"
			  width="600" height="390" layout="absolute" title="Editor">	
</ns:MDIWindow>

And PropretiesApp.swf ( sub application )

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
				layout="absolute"
				backgroundAlpha="0">
	<mx:Script>
		<![CDATA[
			import flexlib.mdi.containers.MDIWindow;
			
			import mx.controls.TextArea;
			
			import net.sourceskyboxer.PropretiesWindow;
			
			[Bindable]
			public var propretiesWindow:PropretiesWindow;
			
			public function openPropretiesWinCall():void
			{
				propretiesWindow = new PropretiesWindow();
			}
		]]>
	</mx:Script>
	
</mx:Application>

For component PropretiesWindow:

<?xml version="1.0" encoding="utf-8"?>
<ns:MDIWindow xmlns:mx="http://www.adobe.com/2006/mxml"
			  xmlns:ns="http://code.google.com/p/flexlib/"
			  width="340" height="340" doubleClickEnabled="false" horizontalScrollPolicy="off"
			  layout="absolute" resizable="false" showControls="false" title="Propreties"
			  verticalScrollPolicy="off">
	
	<mx:Script>
		<![CDATA[
			protected function donePropretiesClick(event:MouseEvent):void
			{
				this.close(event);
			}
		]]>
	</mx:Script>
	
	<mx:Button right="5" bottom="5" label="Done" click="donePropretiesClick(event)"/>
	<mx:Form left="5" right="5" top="5" bottom="30">
		<mx:FormItem width="100%" label="Name:">
			<mx:TextInput width="100%"/>
		</mx:FormItem>
		<mx:FormItem width="100%" label="Icon:">
			<mx:HBox>
				<mx:TextInput width="100%"/>
				<mx:Button label="..."/>
			</mx:HBox>
		</mx:FormItem>
		<mx:FormItem width="100%" label="Path:">
			<mx:HBox>
				<mx:TextInput width="100%"/>
				<mx:Button label="..."/>
			</mx:HBox>
		</mx:FormItem>
		<mx:FormItem width="100%" label="Filename:">
			<mx:HBox>
				<mx:TextInput width="100%"/>
				<mx:Button label="..."/>
			</mx:HBox>
		</mx:FormItem>
		<mx:FormItem width="100%" label="View:">
			<mx:Label width="100%"/>
		</mx:FormItem>
		<mx:FormItem width="100%" height="100%">
			<mx:Text width="100%" height="100%" text="Text"/>
		</mx:FormItem>
	</mx:Form>
	<mx:Button right="64" bottom="5" label="Verify"/>
	
</ns:MDIWindow>

and runs applications.

 

Any pictures for example:

805831-PIC.png

805832-PIC.png

805833-PIC.png

 

Did you see any pictures?

 

Is it good? But how do i use LoaderMax when i won't like add SWFLoader and SystemManager for next swf file than LoaderMax can work for SystemManager instance?

 

f43Ge.png

 

But LoaderMax can use any different swf applications when i manage same openned MDIWindow ( sub application )

 

Is it possible for one or more swfs for one SystemManager?

 

I would like to ask about Loadermax or SWFLoader?

If i manage same sub apps ( example : PaintApp.swf, CalcApp.swf and any <name>App.swf on my MainDesktop than i don't need add line for AS3?

 

And i am trying for creating shutcuts on MainDesktop like our desktop by any operating system?

 

// Edit:

 

If i don't need call any SystemManager Instance than i use only SystemManager like example Object(sm_instance.application).AppInitalize() for all external swf application which i click sub application and MainDesktop will open any application like i want......

 

Thank you for supports and improvements

 

Regards and best greeting from Germany :)

 

Jens

Link to comment
Share on other sites

I'm really not quite sure how to answer (or what you're asking). It seems like you threw a lot of information into one post, along with many questions. Maybe it would help if you just isolated things and created 1 post for each question to keep things more focused and understandable. 

 

Also, we are not Flex developers (frankly, we try to avoid Flex as much as possible, as there are quite a few bugs in the framework and it tends to be very large), so we probably can't give you good answers for Flex-specific questions. 

  • Like 1
Link to comment
Share on other sites

Hello GreenSock, 

 

i am sorry because i am not advanced speecher for English. Sorry English is bad :( I am deaf. :( Did yoo not understand yet than i can give you my project for Flash Builder 4.6 with over-updated Flex SDK 3.6.0a with playerglobals.swf 12, Adobe SDK 4 :) 

 

But i don't need Adobe Air 4. only Flash Player 12

 

Download Project

 

Ops, i am sorry because you are not Flex Developers. ****. No way :( I am searching for advanced Flex developers :( It is ok. No problem. I have tested LoaderMax with Flash Builder 4.6. But your framework works fine under spark component and mx components :)

 

Thanks best regards, Jens

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...