Flex : MMS editor

MXML Component


<?xml version="1.0" encoding="utf-8"?>
<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
		 xmlns:s="library://ns.adobe.com/flex/spark"
		 xmlns:mx="library://ns.adobe.com/flex/mx"
		 title="MMS Template Editor">
	<fx:Declarations>
		<fx:XMLList id="menuXML">
			<fx:menuitem label="Template">
				<fx:menuitem label="Save" data="Save"/>
				<fx:menuitem label="Save As" data="Save As"/>
				<fx:menuitem label="Close" data="Close"/>
			</fx:menuitem>
			<fx:menuitem label="Slide">	
				<fx:menuitem label="New" data="New"/>
				<fx:menuitem label="Duplicate" data="Duplicate"/>
				<fx:menuitem label="Delete" data="Delete"/>
			</fx:menuitem>
			<fx:menuitem label="Insert">
				<fx:menuitem label="Text" data="Text"/>
				<fx:menuitem label="Image" data="Image"/>
				<fx:menuitem label="Audio" data="Audio"/>
				<fx:menuitem label="Video" data="Video"/>
			</fx:menuitem>
		</fx:XMLList>
	</fx:Declarations>
	<s:layout>
		<s:VerticalLayout paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"/>
	</s:layout>
	
	<fx:Script>
		<![CDATA[
			import mx.controls.Alert;
			import mx.events.MenuEvent;
			
			import spark.layouts.HorizontalLayout;
			private function itemClickInfo(event:MenuEvent):void {
				if(event.label == 'New') {
					var newPanel:Panel = new Panel();
					newPanel.title = 'New Slide';
					slides.addElement(newPanel);
				}
			}
		]]>
	</fx:Script>	
	
	<mx:VDividedBox width="100%" height="100%">
		<mx:HDividedBox width="100%" height="100%">
			<s:Panel width="400" height="400" title="MMS Viewer">
			</s:Panel>		
			<s:Panel width="200" height="400" title="Property Viewer">
			</s:Panel>
		</mx:HDividedBox>	
		<s:Panel width="606" title="Slides Viewer" id="slides">
			<s:layout>
				<s:HorizontalLayout paddingBottom="4" paddingLeft="4" paddingRight="4" paddingTop="4"/>
			</s:layout>
			<s:Panel title="Slide x">				
			</s:Panel>
		</s:Panel>
	</mx:VDividedBox>
	
	<s:controlBarContent>
		<mx:MenuBar height="100%" dataProvider="{menuXML}" labelField="@label" showRoot="true" itemClick="itemClickInfo(event)" />
		<mx:HBox paddingBottom="5" paddingTop="5">
			<mx:Spacer width="100%"/>
		</mx:HBox>
	</s:controlBarContent>   
</s:Panel>

MMS Template Editor

Advertisements
Tagged

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: