Button moves when effect applies


hello,

 

i'm having little problem effects on buttons. move

 

i'll copy effect code, because first flex project , maybe i'm doing wrong:

<mx:sequence id="buttonanimation1">           <mx:parallel duration="350" >                <mx:zoom  zoomheightfrom="1" zoomwidthfrom="1" zoomheightto="1.5" zoomwidthto="1.5"/>                <mx:fade  alphafrom="1" alphato="0"/>           </mx:parallel>           <mx:parallel duration="100">                <mx:zoom zoomheightfrom="3" zoomwidthfrom="3" zoomheightto="1.5" zoomwidthto="1.5"/>                <mx:fade alphafrom="0.4" alphato="0"/>            </mx:parallel>           <mx:parallel  duration="200">                <mx:zoom  zoomheightfrom="1.5" zoomwidthfrom="1.5" zoomheightto="1" zoomwidthto="1"/>                <mx:fade  alphafrom="0" alphato="1"/>           </mx:parallel>      </mx:sequence> 

does know how fix this?

 

thank you.

hello!

 

i changed code , i'm executing effect when click on button. works ok. makes zoom , fade button doesn't move it's place.

 

something this:

 

<effects:effect id="effect" target="{waterbutton}"/> <mx:button  id="waterbutton" y="51" width="37" height="37" upskin="@embed('../pictures/water.gif')" click="effect.play()" x="810"/ 

 

the problem comes again when want execute function @ same time. if do:

click="effect.play();showgraph()"

or

click="effect.play()" buttondown="showgraph()"

 

where "showgraph" makes visible or invisible panel contains graph.

 

public function showgraph():void{      if(graphpanel.visible==true){           graphpanel.visible=false;      }else{           graphpanel.visible=true;      } } 

 

the code makes graph panel visible, executes effect , when finishes button jumps right , down. don't know why , how solve this.

 

please me, i'm lost.



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Installation database is corrupt

Nogen der kender et simpelt hvidt template med topmenu kun - Joomla! Forum - community, help and support

Error compiling for board Arduino/Genuino Uno.