Some easing on my captions and ideas?

I would really like some easing on my captions.

I have added the following code to my captions, but would really like some easing on the movement.



onClipEvent (mouseMove) {
   this._x = _root._xmouse;
   this._x = _root._ymouse;
   updateAfterEvent();
}


Any information on how to go about this would be superb :slight_smile:

Come on you gurus someone must know :slight_smile:

cheers

I guess the second this._x must be this._y?
try this

onClipEvent (enterFrame) {
	this._x += (_root._xmouse-this._x)/8;
	this._y += (_root._ymouse-this._y)/8;
}

increase/decrease the “8” if you want slower/faster easing;)

scotty(-:

Hi, trevorsaint! Please post your movie (link, swf, fla) so we can take a look at it! I want to see it in action.

Daniel

Scotty, how do I apply that code?

Hi scotty wonderful it works gr8 as it is.

I hate to be a pain can you please explain how your modified code achieved this. I am think maths right, well I never was good at that, so if you can please explain what is going on. I understand the basics of this as, but not the added

-this._y)/8

First look at this code would be minus the clip at x and y axis divided by 8

Sorry for the lack of understanding, but it would be great for a laymans view :slight_smile:

cheers and thnx for the addition.

T

Dude

Simply create a box, convert to movie clip, and apply it to the clip. simple as that, its flippin great, if you have design skills think of the potential :slight_smile:

Wonderful

I tried and get this error:

Error Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame) {

Total ActionScript Errors: 1 Reported Errors: 1

What am I missing?

ok I will send a sample fla, give me a few …

Well this is just a rectangle, as an example for you.

Hope it helps.

Trev

What you did wrong was select the timeline and applied your script to the mc based on the timeline, with this you must select the object itself, i.e the movie clip and apply it this way :).

I have made the same mistake, and I am sure many others have to :slight_smile:

Trev

Very nice, glad you took the time to show me that.

What is: _quality = “low”;

And why is it following the mouse? Wouldn’t it make more sense to have the caption display when it hovers over something?

I place quality low, because I feel that when set to high the rectangle can sometimes appear slightly blury, quality low in my own opinion keeps it crisp and pixel perfect.

Well the best bet is to have the hover caption appear when hovering over an object, I have done that, but all I wanted was the smooth easing, hense why I asked.

LOL - I just did it like that for a sample for you, why would you like it to appear on hover over a button say??

T

Yes please

Right ok bare with me, am having a few troubles I will get something as quick as I can.
I have it working as standard, but I am aiming for that nice easing also. wait a few :slight_smile:

T

Ok Steady, here is a quick sample, I am still tring to get the easing applied.

Please be patient.

Trev

This should keep you going for a few …

Well I have tried, but still nothing, I cannot get the easing to work.

Come on any gurus out there, please help us out here. Someone must know.

you get that error because that code has to be in a mc

thats what it is saying

lol

That’s a very tiny box;) so there’s not so much room for easing.
Might not be exactly what you want be replace the onMouseMove with this

_root.caption1.onEnterFrame = function() {
	if (_root.z == true) {
		this._x += (this._parent._xmouse-this._x)/8;
		this._y += (this._parent._ymouse-this._y)/8;
	}
};

scotty(-:

lol that was just a demo for steady :), no the one I will be using will be bigger :slight_smile:

I will try it, thanks again scotty :slight_smile:

Oops, it’s time to goto bed I think=)

scotty(-: