You're the best!  I thought the only way to do this was via 
transitions/effects tags.  This is much simpler/smoother.

Thanks!

--- In flexcoders@yahoogroups.com, "Varun Shetty" <[EMAIL PROTECTED]> 
wrote:
>
> Hi,
> 
> i am sorry.. i didnt see this reply.
> 
> here.. check this code for anim with tweener.
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute"
> frameRate="60">
> <mx:Script>
>     <![CDATA[
>         import caurina.transitions.*;
>         private function movePanels(xPos:Number):void {
>             Tweener.addTween(panelsBox, {time:1, x:(xPos+10),
> transition:'easeInOutSine'});
>         }
>     ]]>
> </mx:Script>
> <mx:HBox width="{Application.application.width}" height="{
> Application.application.height}"  horizontalScrollPolicy="off"
>     paddingBottom="10" paddingLeft="10" paddingRight="10" 
paddingTop="10">
>     <mx:HBox id="panelsBox"
>         paddingBottom="0" paddingLeft="0" paddingRight="0" 
paddingTop="0">
>     <mx:Panel id="panel1" x="10" y="10" height="{
> Application.application.height-20}" 
width="{Application.application.width-20}"
> horizontalAlign="center" verticalAlign="middle" title="Panel 1">
>         <mx:Label text="Panel 1 X Position: {panel1.x}"/>
>         <mx:Button label="Move to Panel 2" click="movePanels(-
panel2.x)"/>
>     </mx:Panel>
>     <mx:Panel id="panel2" title="Panel 2" x="{ 
panel1.x+panel1.width+40}"
> y="10" height="{Application.application.height-20}" width="{
> Application.application.width-20}" horizontalAlign="center"
> verticalAlign="middle" >
>         <mx:Label text="Panel 2 X Position: {panel2.x}"/>
>         <mx:HBox>
>             <mx:Button label="Move to Panel 1" click="movePanels(-
panel1.x
> )"/>
>             <mx:Button label="Move to Panel 3" click="movePanels(- 
panel3.x
> )"/>
>         </mx:HBox>
>     </mx:Panel>
>     <mx:Panel id="panel3" title="Panel 3" 
x="{panel2.x+panel2.width+40}"
> y="10" height="{Application.application.height-20 }" width="{
> Application.application.width-20}" horizontalAlign="center"
> verticalAlign="middle" >
>         <mx:Label text="Panel 3 X Position: {panel3.x}"/>
>         <mx:Button label="Move to Panel 2" click="movePanels(- 
panel2.x)"/>
>     </mx:Panel>
>     </mx:HBox>
> </mx:HBox>
> </mx:Application>
> 
> 
> Change the 'time' value to control the speed.
> 
> and instead of 'easeInOutSine'
> you can use the following parameters.
> 
> "linear", "easeInSine", "easeOutSine", "easeInOutSine", "easeOutInS
ine",
>             "easeInQuad", "easeOutQuad", "easeInOutQuad",
> "easeOutInQuad", "easeInCubic",
>             "easeOutCubic", "easeInOutCubic", "easeOutInCubic",
> "easeInQuart", "easeOutQuart",
>             "easeInOutQuart", "easeOutInQuart", "easeInQuint",
> "easeOutQuint", "easeInOutQuint",
>             "easeOutInQuint", "easeInExpo", "easeOutExpo",
> "easeInOutExpo", "easeOutInExpo",
>             "easeInCirc", "easeOutCirc", "easeInOutCirc",
> "easeOutInCirc", "easeInElastic",
>             "easeOutElastic", "easeInOutElastic", "easeOutInElastic
",
> "easeInBack", "easeOutBack",
>             "easeInOutBack", "easeOutInBack", "easeInBounce", "ease
OutBounce",
>             "easeInOutBounce", "easeOutInBounce"
> 
> 
> 
> umm.. do not forget to have the tweener classes in ur project 
folder.
> 
> regards,
> Varun Shetty
> www.paranoidart.com
> 
> 
> On Jan 24, 2008 10:39 PM, jovialrandor <[EMAIL PROTECTED]> wrote:
> 
> >   Varun, this is exactly what I needed! A few questions.
> >
> > 1. Do you have examples of tweener class for movements?
> > 2. Can I set the speed of the movement in the following example?
> >
> > Thanks!
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com>, "Varun
> > Shetty" <varunet@>
> >
> > wrote:
> > >
> > > here... try this out.. mebbe this is something u required.
> > >
> > > the stuff u required just intrigued me.. so .. jus made one..
> > >
> > > Although, I hate the basic flash fx api's... i would rather use
> > the tweener
> > > class for movements.. but ..i jus didn't want you to see 
another
> > bunch of
> > > code make this simple for you.. btw. resize the window and try
> > moving too.
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > layout="absolute">
> > > <mx:Script>
> > > <![CDATA[
> > > private function movePanels(xPos:Number):void {
> > > myMovPans.end();
> > > myMovPans.xTo = xPos+10;
> > > myMovPans.play();
> > > }
> > > ]]>
> > > </mx:Script>
> > > <mx:Move id="myMovPans" target="{panelsBox}"/>
> > > <mx:HBox width="{Application.application.width}" height="{
> > > Application.application.height}" horizontalScrollPolicy="off"
> > > paddingBottom="10" paddingLeft="10" paddingRight="10"
> > paddingTop="10">
> > > <mx:HBox id="panelsBox"
> > > paddingBottom="0" paddingLeft="0" paddingRight="0"
> > paddingTop="0">
> > > <mx:Panel id="panel1" x="10" y="10" height="{
> > > Application.application.height-20}"
> > width="{Application.application.width-20}"
> > > horizontalAlign="center" verticalAlign="middle" title="Panel 
1">
> > > <mx:Label text="Panel 1 X Position: {panel1.x}"/>
> > > <mx:Button label="Move to Panel 2" click="movePanels(-
> > panel2.x)"/>
> > > </mx:Panel>
> > > <mx:Panel id="panel2" title="Panel 2"
> > x="{panel1.x+panel1.width+40}"
> > > y="10" height="{Application.application.height-20}" width="{
> > > Application.application.width-20}" horizontalAlign="center"
> > > verticalAlign="middle" >
> > > <mx:Label text="Panel 2 X Position: {panel2.x}"/>
> > > <mx:HBox>
> > > <mx:Button label="Move to Panel 1" click="movePanels(-
> > panel1.x
> > > )"/>
> > > <mx:Button label="Move to Panel 3" click="movePanels(-
> > panel3.x
> > > )"/>
> > > </mx:HBox>
> > > </mx:Panel>
> > > <mx:Panel id="panel3" title="Panel 3"
> > x="{panel2.x+panel2.width+40}"
> > > y="10" height="{Application.application.height-20}" width="{
> > > Application.application.width-20}" horizontalAlign="center"
> > > verticalAlign="middle" >
> > > <mx:Label text="Panel 3 X Position: {panel3.x}"/>
> > > <mx:Button label="Move to Panel 2" click="movePanels(-
> > panel2.x)"/>
> > > </mx:Panel>
> > > </mx:HBox>
> > > </mx:HBox>
> > > </mx:Application>
> > >
> > > regards,
> > > Varun Shetty
> > >
> > >
> > > On Jan 17, 2008 7:09 AM, Hem S <hemflex@> wrote:
> > >
> > > > Irrespective of screen resolution the components can be moved
> > from
> > > > outside of the flex application.
> > > >
> > > > <mx:Move
> > > > id="moveIn" xFrom="{-can.width }" yFrom="0" 
duration="1000" />
> > > >
> > > > <mx:Move id="moveOut" />
> > > >
> > > > <mx:Button click="can.visible=can.visible?*false*:* true*"/>
> > > >
> > > > <mx:Canvas id="can" width=" 400" height="400" visible="false"
> > showEffect="
> > > > {moveIn}" hideEffect="{moveOut }">
> > > >
> > > > <mx:List/>
> > > >
> > > > </mx:Canvas>
> > > >
> > > > --
> > > >
> > > > Regards,
> > > >
> > > > Hemadri S
> > > >
> > > > www.hemadri.info
> > > >
> > > > On Jan 16, 2008 5:18 PM, jovialrandor <jovialrandor@> wrote:
> > > >
> > > > > How can I specify any Flex component to move out of the
> > screen if i do
> > > > >
> > > > > not know the screen resoluction of the end user beforehand?
> > > > >
> > > > > Is there some Move value like '-1' that indicates to move 
out
> > of any
> > > > > size screen?
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >  
> >
>


Reply via email to