topical media & game development
student-mma-16-MMA.mx
student-mma-16-MMA.mx
[swf]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:f="flexlib.controls" layout="absolute"
xmlns:ns1="*" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#1F1F1F, #565656]"
mouseUp="mv.onMouseUp(event)">
<mx:Script>
<![CDATA[
private function fadeIn(img:Image):void {
img.removeEventListener(Event.ENTER_FRAME, doFadeOut);
img.addEventListener(Event.ENTER_FRAME, doFadeIn);
}
private function doFadeIn(e:Event):void {
e.target.alpha += .2;
if (e.target.alpha >= 1){
e.target.removeEventListener(Event.ENTER_FRAME, doFadeIn);
}
}
private function fadeOut(img:Image):void {
img.removeEventListener(Event.ENTER_FRAME, doFadeIn);
img.addEventListener(Event.ENTER_FRAME, doFadeOut);
}
private function doFadeOut(e:Event):void {
e.target.alpha -= .1;
if (e.target.alpha <= 0){
e.target.removeEventListener(Event.ENTER_FRAME, doFadeOut);
}
}
private function switchPage(page:Object):void {
var pages:Object = content.getChildren();
for(var i:int = 0; i < pages.length; i++)
pages[i].visible = false;
page.visible = true;
}
]]>
</mx:Script>
<mx:Style>
Text {
color:#cccccc;
}
</mx:Style>
<mx:Grid x="0" y="0" width="100%" height="100%">
<mx:GridRow width="100%" height="100%">
<mx:GridItem width="100%" height="100%" horizontalAlign="center" verticalAlign="middle" paddingTop="20">
<mx:Grid width="1250" scroll="false">
<mx:GridRow width="100%" height="100%">
<mx:GridItem width="100%" height="100%">
<mx:Canvas width="100%" height="100%">
<ns1:student_mma_16_Logo></ns1:student_mma_16_Logo>
<mx:Image id="menu" source="student-mma-16-img-menu.png" x="408" y="25"/>
<mx:Image source="student-mma-16-img-menu-over.png" id="browse" buttonMode="true" click="navigateToURL(new URLRequest('@mx-@mx-student-mma-16-MMA.html'), '_self');" alpha="0" rollOver="fadeIn(browse);" rollOut="fadeOut(browse);" x="408" y="25"/>
<mx:Image id="menu2" source="student-mma-16-img-menu2.png" y="139" x="408"/>
<mx:Image source="student-mma-16-img-menu2-over.png" y="139" x="408" id="mediaplayer" buttonMode="true" click="switchPage(pMediaplayer);" alpha="0" rollOver="fadeIn(mediaplayer);" rollOut="fadeOut(mediaplayer);"/>
<mx:Image id="menu3" source="student-mma-16-img-menu3.png" y="256" x="397"/>
<mx:Image source="student-mma-16-img-menu3-over.png" y="256" x="397" id="finalApp" buttonMode="true" click="switchPage(pFinal);" alpha="0" rollOver="fadeIn(finalApp);" rollOut="fadeOut(finalApp);"/>
<mx:VBox y="400" width="100%" horizontalAlign="center">
<mx:Canvas id="content" x="0" width="100%">
<mx:VBox id="pHome">
<mx:Text text="" color="#CCCCCC" fontWeight="bold" fontFamily="Verdana" fontSize="16" visible="true"/>
</mx:VBox>
<mx:VBox height="100%" width="100%" horizontalAlign="center" id="pMediaplayer" visible="false">
<mx:Text text="Media viewer: Slideshow" color="#CCCCCC" fontWeight="bold" fontFamily="Verdana" fontSize="18"/>
<ns1:student_mma_16_SlideShow width="472" height="295" id="mv"/>
<mx:Text text="Mouse over the top and bottom of theplayer to show the drawing and slideshow controls."/>
</mx:VBox>
<mx:VBox width="100%" horizontalAlign="center" id="pFinal" visible="false">
<mx:Text text="Final application" color="#CCCCCC" fontWeight="bold" fontFamily="Verdana" fontSize="18"/>
<mx:Text text="Documentation coming soon."/>
<mx:Button label="Launch">
<mx:click>navigateToURL(new URLRequest("student-mma-16-Final.swf"), "_new");</mx:click>
</mx:Button>
</mx:VBox>
</mx:Canvas>
<mx:HBox x="116" y="673">
<mx:Text text="Multimedia Authoring 2009 Group 16" color="#FFFFFF" fontWeight="bold" fontFamily="Verdana" fontSize="17"/>
<mx:Text text="Richard van Willegen" color="#CCCCCC" fontWeight="bold" fontFamily="Verdana" fontSize="16"/>
<mx:Text text="rwn200" color="#CCCCCC" fontWeight="bold" fontFamily="Verdana" fontSize="16"/>
</mx:HBox>
</mx:VBox>
</mx:Canvas>
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
</mx:Application>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.