how to write an elasticity function in MX?This works in 5 - but I want to use dynamic masking also - here's the code (slightly modified from Ilyas Usal. Ilyas is also known as ilyaslamasse )
MovieClip.prototype.move = function (centerx,centery,inertia,k) {
x = -this._x + centerx ; y = -this._y + centery ; xp = xp * inertia + x*k ; yp = yp * inertia + y*k ;
[code].....
then you can set newx and newy how ever you want buttons or timeline.I need it to work in MX ?
Using the elasticity tutorial on here,I made a navigation with bars that enter frame with elasticity. I'm trying to get the rollOver to work so that it shifts a little when the mouse rolls over. What I am having trouble with is the the rollOut... for it to go back to its normal position it jumps to the original position and then does the elasticity, instead of moving to the original from the rollOver position. Hope that makes sense here is a link to what I am talking about: http:[url].....Go to Serve you section (blue), then click on the print button, the rollOver is applied to the info button.
i was trying to reproduce this nifty little effect of a springy rollover on a button, that can go from button to button, and also springs up when nothing is selected.
the effect i'm trying to reproduce is at:[URL]
go into the portfolio section and rollover any of the pieces. Now i've studied the tutorials for elasticity at kirupa and came up with a effect that is based on mouse-click and not on a button. [URL]
I am fairly new to Flash, and couldn't find the help I needed through a search. I am using the Tween class to move objects when buttons are clicked. I am using elastic easing as the animation ends, and it looks ok. But am I able to modify the elasticity at all? I like the effect, but it is a little strong and I would like to reduce the bounce at the end.
Can I do this, or by using this method of animation am I losing the fine control that I would have by using the timeline and I just have to suck it up?
I want to make these 7 events into one function that I can put on a few different buttons' onPress function so that I don't need to have those seven lines of code on every button, just one line instead:
I prepared a swf movie which has 40 frames with 3 layers and 2 Scenes (Scene1 and Scene2) I add the following code to the first frame of the movie :
favekle.addEventListener(MouseEvent.MOUSE_DOWN, fave); function fave(e:MouseEvent):void { var url:String = "samplepage.aspx?sn=1011"; var request:URLRequest = new URLRequest(url); navigateToURL(request, '_blank');
I have four MC's that I want to fade onRollOver and onRollOut. As you can see, writing code for each MC is a rather convoluted way to achieve the effect.how to write the code as a function and apply it to all of the clips?
Basically I'm trying to write a function that can look at any movieClip no matter how far down it is nested and then tell a MC sitting in the root movie to lay over it.
I would like some help on writing a piece of code.I need to write a function that if some movie clips are in some x and y value, then gotoAndPlay('end');
Code:
function gotoEnd() { if (tv_mc._x = 41.8; tv_mc._y = 157.3;) then gotoAndPlay('end'); }
Im trying to write a function that will build a menu based upon the vars that I passed it to. This is a simpler version on the code.(The library has a MC/Btn symbol with the linkage "btn");
Code: function bulidMenu(nItems:Number) { var menuMCx:Number = 100; var menuMCy:Number = 100;
[code]...
Why do I get an output of 4 on every clicked button, instead of 0,1,2,3 ? I tryed forwarding the " i " to the onRelease = function(i) {} and then in it declaring a new var and assigning it the passed " i ", but that doesn't work either :/
I have recently moved from AS2 to AS3 and trying to learn my way around as3.I need to know how I can make a function for the users to be able to type/write in Flash application...Basically what I need at this stage is an input text field and a dynamic text field and when the users type anything in the input text, the dynamic text will be updated and it will show the texts.
I started another thread where i had gotten help and combined the snow tutorial and the programatic mask tutorial to create particles that reveal an in-focus image over a blurred one. I just need help making the particles swarm around the mouse when it is present and have the particles just float around when not. Presently the random motion is just fine and looks like this (i just inverted the this._x and this._y so that they would go with the mouse direction not away from):
I have a clip that rotates to orient itself towards the mouse when the mouse is over a given area. When the mouse leaves the area, the clip snaps back to its original position.
1) the clip snaps directly towards the mouse at the moment the mouse enters the clip; I would like it to actually rotate;
2) the clip snaps directly back to its original position when the mouse leaves the clip; I would like it to ease back into position.