A question for upuaut8

On your signature, your logo for centerspin, how did you get it to start playing on mouseover?, I would like to do that with mine. It would be a great help. Thanks in advance.

TitrationX

I’m not sure if I understand what you mean…

on(rollover) the logo moves to the left, and a link to centerspin jumps up from the bottem. Is that what you’re refering to?

Yes, exactly.

TitrationX

So how do U do it?

hmm… that’s a little tricky. I’ll try to come up with the code tonight. I’m going to have to do it from scratch though.

Give me a few hours and I should have it done

K, thanks for your help. I really appreciate it.

TitrationX

ok the basics of it are action script, with a single invisible button which occupies the entire stage. For my sig the stage was set to about 60/300, or something like that. We’ll use that size anyway.

The two things that move are movie clips. each on has an instance name, and each one has some code located on it.

onClipEvent(load){
this._y=30; //that’s the center from top to bottem
this._x=-20;//this sets it off stage to the left
}
onClipEvent(enterFrame){
diff=center-this._x;
this._x+=diff/10;
}

the button simply tells each clip either through rollon or rolloff, that the center for that clip is at 150(if it’s moving horizontaly), or at -20

When the center moves the movie clip goes to the new center point.

In the case of my sig, I have one moving horizontaly and one verticaly. Just change around the code for the movie clip and button to effect these. You can even have it move diagonaly if you have both _y and _x += to diff… though you’ll need a diffY and a diffX, rather than just one.

the trick to this sort of movement is pretty simple. As the object gets closer to the center point, the difference between it and the center point becomes less. Hence it moves more and more slowly as it reachs the center point. the divided by 10 mod makes it move at a reasonable speed… so the speed can be slowed by changing this to /100, or speeded up by changing it to /5, for instance.

Sorry about writing this from scratch… I’m not anywhere near my notes. :slight_smile: Hope it helped… if you have any other questions please do ask… I may have forgotten something in there. :wink:

Thanks, this helps a lot, lemme go see what I can do.

So did you like my shortcut tip?

TitrationX

yeah… though I haven’t used it yet… I’m not at home. :slight_smile:

If that doesn’t work for you let me know… I’ll take another look in my book here and see if I can figure out what I did wrong.

K, I am working on it, but I am gonna crash for tonight, its almost 3am, and I need to get up at 6am.

TitrationX

Hey… sorry I made a mistake with that.

I’ve got a control clip… and empty movie clip in the center of the stage. It controls the action. Then I have the text set to be a link to the site using the regular Flash Url link option on static text. The control clip is a little tricky but I think I know what I did.

it has on it

onClipEvent(enterFrame){
if (flag){
_root.movieClipOne.center=150;
_root.movieClipTwo.center=-30;
}else{
_root.movieClipOne.center=-150;
_root.movieClipTwo.center=30;
}
xDiff=_root.xmouse-this._x;
yDiff=_root.ymouse-this._x;
if(yDiff<40 or zDiff<40){
flag=false;
}else{
flag=true;
}
}

man I hope that works… off the top of my head is hard. :slight_smile:
Probebly it wont work. But it’s something to start working off of anyway. The reason I went with this was I didn’t want to bog myself down with a button to control the movement in case I added buttons to my signature, which I probebly will.