[Flashcoders] Mouse Over animation not firing because my mouse is already over the object

2009-07-14 Thread zurie


I have a series of frames with navigation that covers the left 50% and
right 50% of the images. 

When I click the navigation it fades 1 picture out and a new one in, but
the mouse events are not firing the mouseover animations because my mouse
is already over the button. I have to pull my mouse OUT of the screen and
then back in to make the animation trigger. How am I able to tell if a
mouse over is triggering without actually pulling the mouse OUT and then
back in? AS3. 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] e.target subobjects how do I refrence??

2009-05-12 Thread zurie
This is the code I used to solve it.  I used currentTarget, and I had my
movieclips already on stage, so I guess I didn't need to refrence them as
MovieClips?  either way it works...  do i need to set my type to the var
myObj?  it works regardless.

function leftmenu($e:MouseEvent ):void {
  var myObj = $e.currentTarget;
  trace($e.type +  :  +$e.currentTarget.name ) ;
if ($e.type == mouseOver) {
TweenMax.to(myObj.menuSquare_mc, .3, {alpha:.06, 
delay:0,
ease:Sine.easeOut});
TweenMax.to(myObj, .3, {x:60, delay:0, 
ease:Sine.easeOut});
TweenMax.to(myObj.menuSquare_mc, .3, {x:-60, delay:0,
ease:Sine.easeOut});
}
if ($e.type == mouseDown) {
trace($e.currentTarget.name);
}
if ($e.type ==mouseOut) {
TweenMax.to(myObj.menuSquare_mc, .3, {alpha:0, delay:0,
ease:Sine.easeOut});
TweenMax.to(myObj, .3, {x:30, delay:0, 
ease:Sine.easeOut});
TweenMax.to(myObj.menuSquare_mc, .3, {x:0, delay:0, 
ease:Sine.easeOut});
}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] e.target subobjects how do I refrence??

2009-05-11 Thread zurie
Liutoday, you sent me this line of code below.  Unfortunetally in AS3  
it fails.
a) where is the var _obj   you have a underscore, and then in tweenmax  
you have obj with no underscore? is this correct?
b) you have _obj as a Button...  these are movieclips.  they have a  
name Btn for refrence, but they link to a menusSquare_mc  which is a  
movie clip...  can you re-write it with MovieClip
c) you have e.target space Button;  this line throws a error.  why  
the space, and why the word Button?


1086: Syntax error: expecting semicolon before Button.

If i remove the Button, I get this error...

1046: Type was not found or was not a compile-time constant: Button.

if i CHANGE button to MovieClip (which is what it is suppose to be...)  
I get this error.


1118: Implicit coercion of a value with static type Object to a  
possibly unrelated type flash.display:MovieClip.


liutoday
Sun, 10 May 2009 18:59:46 -0700

function down(e:MouseEvent):void{

  var _obj:Button = e.target Button;

 TweenMax.to(obj.menuSquare_mc, .3, {alpha:.06, delay:0,
ease:Sine.easeOut});

 }




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] e.target subobjects how do I refrence??

2009-05-07 Thread zurie


I have a loop that is assigning event listeners to target. My targets
are named btn1, btn2, btn3, etc etc. 

inside each btn, I have a movie clip called menuSquare_mc which I want
to animate. how can I target menuSquare_mc of each button using only 1
function??? 

function down($e:MouseEvent ):void { 

 trace($e.type +  :  +$e.target ) ; 

 if ($e.type == mouseOver) { 

 TweenMax.to($e.target.menuSquare_mc, .3, {alpha:.06, delay:0,
ease:Sine.easeOut}); 

}  

} 

the above code fails... I want it to say btn1.menuSquare_mc,
btn2.menuSquare_mc, etc) using just 1 function...  

in fact, my idea would be to use if $e.type == mouseDown do another
function just like the over and one just like the out.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Creating for loops for event listeners

2009-05-01 Thread zurie


Is there a better way to write Event Listeners for a large number of
buttons that increment the names by 1? example:
solution_button1.addEventListener(MouseEvent.MOUSE_DOWN, s_btn1_down);
solution_button2.addEventListener(MouseEvent.MOUSE_DOWN, s_btn2_down);
solution_button3.addEventListener(MouseEvent.MOUSE_DOWN, s_btn3_down);
solution_button4.addEventListener(MouseEvent.MOUSE_DOWN, s_btn4_down);
solution_button5.addEventListener(MouseEvent.MOUSE_DOWN, s_btn5_down);
solution_button6.addEventListener(MouseEvent.MOUSE_DOWN, s_btn6_down);
solution_button7.addEventListener(MouseEvent.MOUSE_DOWN, s_btn7_down);
solution_button8.addEventListener(MouseEvent.MOUSE_DOWN, s_btn8_down);
solution_button9.addEventListener(MouseEvent.MOUSE_DOWN, s_btn9_down); 

 can the above be accomplished with a for loop? what about more than one
event over, out, down, click. can those also be automated or would I need 4
loops for that.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AS3 - Help me remove the previous image

2009-03-24 Thread zurie


http://rafb.net/p/NZxD3554.html [1] 

my code is pasted above for easy reading.  

In AS3 I am trying to remove the previous image. In AS2 I could type
my_mc.unloadMovie(); but in AS3 I ned to refrence the child? I am not 100%
sure as to what to do. I tried to write a way for it to find the previous
image but it didn't work out so well...  

Line 80 and 90 were a attempt but they just don't seem correct... I'd
rather remove the image at line 103 right before I load the new image, but
was unsuccessful. any ideas? Thanks!

Links:
--
[1] http://rafb.net/p/NZxD3554.html
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders