Weblog


Flex And Flash
What is Flex? Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems.


Create a simple Sliding Menu Bar with Flex and ActionScript

In this tutorial, you will learn how to create a menu with a point underneath it that moves left and right based on which button the user is click. This tutorial is created with Flex and ActionScript 3.



please use this image for point



the code is given below


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%" >

<mx:Move duration="800" id="moveb" target="{point}"/>

<mx:Script>
    <![CDATA[
        import mx.controls.Alert;
        private function buttonmove(e:Event):void
        {
            moveb.xTo=e.currentTarget.valueOf().x;
            moveb.yTo=e.currentTarget.valueOf().height;
            moveb.play();
        }
    ]]>
</mx:Script>
    <mx:VBox  horizontalAlign="left" verticalGap="0" >
    <mx:HBox  >
       
        <mx:HBox   click="buttonmove(event)" id="a" backgroundColor="red" height="30" width="100"/>
        <mx:HBox  click="buttonmove(event)" id="b" backgroundColor="black" height="30" width="100"/>
        <mx:HBox  click="buttonmove(event)" id="c" backgroundColor="green" height="30" width="100"/>
        <mx:HBox click="buttonmove(event)" id="d" backgroundColor="yellow" height="30" width="100"/>
        <mx:HBox  click="buttonmove(event)" id="e" backgroundColor="blue" height="30" width="100"/>
    </mx:HBox>
    <mx:HBox width="100" id="point"  horizontalAlign="center"  >
        <mx:Image  source="../point.png" />
    </mx:HBox>
    </mx:VBox>
</mx:Application>








POSTED BY Abhilash ,WEB and UI Designer AT 6/11/2008 6:40 AM 0

COMMENTS





» POST A COMMENT  |  DIGG IT


« BACK HOME









MY PROFILE
Name: Abhilash ,WEB and UI Designer
Location: India ,kerala ,cochin ,Aluva ,Kadungalloor
Hi,my name is Abhilash S, I am a web designer and coder from Kerala India. I specialise in web and UI designing ,however my skills set also includes web design and coding/development in standards complient XHTML/HTML, tableless CSS,Adobe Flex . abhilathi[at]gmail[dot]com



certification

RECENT POSTS
Web Desktop Application Framework
Adobe ConnectNow
Flex Ajax Bridge
Flash Player 10
AIR Application sample


Search All about Adobe Flex





Technorati Profile
Add to Technorati Favorites