header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
ram
Points:0
Posts:0

12/29/2009 11:37:20 PM

Title: zoom effect


hi.. i have problem in zoom effect... i m having lot of buttons for menu like flower means rose lily etc and i was load varieties in rose using xml... i followed above concept for all flowers loading... and i was applied zoom effect for xml loaded panel..the panel was moved each clicking of button while its zooming...if i continuously click all the button means the panel gone somewhere..how to solve this problem...

var zoom_eff:Zoom=newZoom();
zoom_eff.zoomHeightFrom=0;
zoom_eff.zoomWidthFrom=0;
zoom_eff.zoomHeightTo=1;
zoom_eff.zoomWidthTo=1;
zoom_eff.target=itemView;
zoom_eff.duration=500;
zoom_eff.play(); 
i used this code for zoom panel of items...



1
Chirloki
Points: 0
Posts:0
12/29/2009 11:58:43 PM



use
zoom_eff.stop();
before you play the effect. So that it does not play in multiple instances.

2
ram
Points: 0
Posts:0
12/30/2009 12:31:27 AM



where ever i add stop when i click button its moved position and went somewhere can u please give some sample code.......

3
Chirloki
Points: 0
Posts:0
12/30/2009 1:35:33 AM



Like this just add before you play

var zoom_eff:Zoom=newZoom();
zoom_eff.zoomHeightFrom=0;
zoom_eff.zoomWidthFrom=0;
zoom_eff.zoomHeightTo=1;
zoom_eff.zoomWidthTo=1;
zoom_eff.target=itemView;
zoom_eff.duration=500;
zoom_eff.stop(); 
zoom_eff.play(); 

4
Chirloki
Points: 0
Posts:0
12/30/2009 1:40:40 AM



one more thing , declare the var zoom_eff out side the function like this so that the when clicking fast the previous zoom can be referred and stopped before playing the new one
//Declare this var outside function

private	var zoom_eff:Zoom= new Zoom();

private function addZoomOutEffect():void{
zoom_eff.zoomHeightFrom=0;
zoom_eff.zoomWidthFrom=0;
zoom_eff.zoomHeightTo=1;
zoom_eff.zoomWidthTo=1;
zoom_eff.target=itemView;
zoom_eff.duration=500;
zoom_eff.stop();
zoom_eff.play(); 
}

5
ram
Points: 0
Posts:0
12/30/2009 1:57:16 AM



thanks Chirloki ...its working....


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 7+4 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions