Determinating Movie Clip speed

This is what I want to do :

I have a scrolling text on a Movie Clip, and I want the user to chose the scrolling speed. An example of what I need, is the scrolling text on the Home Page of www.metallica.com. Please see it, and tell me the script I should use, to do smth like that.

Thanks

That might be a little tricky. There are certainly ways of accomplishing this. I’ll have to think a little on it first though.

Question… will the text be changing periodicaly, or will it always be the same text scrolling?

I’m talking about this: www.cliff-god.com/res5.swf
Check it out! And thanks!

Do you absolutely want a little dragger to set the speed ?
pom 0]

Yeah… if possible… if not, do u have any other idea, tell me anyways.
Ynx

I’m doing it, just wait for 5 minutes…
pom 0]

OK, that wasn’t 5 minutes, but there it is :
0] pom

Yeah man!! This is what I want! Can u please send me the script??? You can post it here, or send me an email at [email protected]
Thnx a lot!

File sent…
Here’s what I did by the way :
4 layers :
background : a movie clip containing a box that matches exactly the dimensions of my mask
dragger : a movie clip that’s draggable to change the speed. Actually a button inside a clip, to make it clickable.
masked : a movie clip containing text broken apart. I’m not sure that the breaking is necessary but as a precaution…
Mask : well, hum, hard to tell…

So the background and the mask are at the exact same location.

The script : Easy one :
Masked :
onClipEvent (load) {
original = -this._height/2 -5 ; //I set the original position to just out of the screen
this._y = original ; // I put the clip there
}
onClipEvent (enterFrame) {
if (this._y >this._height+_root.pos+_root.height/2) this._y = original ;

//if my text has gone out of the box completely (_root.pos is the position of the mask and _root.height its
//height) I put the clip back up

else this._y += _root.diff ;

//I move the movie clip, making it go down by _root.diff (which is controlled by the dragger of course)
}

Background :
onClipEvent (load) {
_root.pos = this._y;
_root.height = this._height;
} //as I said… initializing the size and position of the mask

dragger :
the button
on (press) {
_root.pressing = 1 ;
}
on (release) {
_root.pressing = 0 ;
}

//just flags

the clip

onClipEvent (load) {
_root.pressing = 0 ; //originally not pressing
position = this._y ; //set the 0 position to the original position (at the top, in my clip)
}
onClipEvent (enterFrame) {
if (_root.pressing) { //if I’m pressing the button
&nbsp &nbsp &nbsp &nbsp if (_root._ymouse > _root.pos-_root.height/2+this._height/2) {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (_root._ymouse < _root.pos+_root.height/2-this._height/2)

//Wow. Kinda ugly, hue ? It checks if the mouse is located between the bounds of your draggable area

this._y = _root._ymouse ; //the dragger follows the mouse
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp else _root.pressing = 0 ;
//trying to solve the problem that if you go astray clicking, it works… strangely
&nbsp &nbsp &nbsp &nbsp }
}
_root.diff = 0.05*(this._y - position) + 1 ;
// set the speed to 5% of the offset +1, an original speed, which you can change.
}

I put the frame rate at 20fps, and there you go !!

pom 0] , who knows that without the fla in front of your eyes, I doesn’t look too good.

Yeah! Great work! But u know… whithou the fla is hard to get it all… and in my inbox there’s nothing. Please try to send it again. ([email protected] or [email protected])
Thnx!!!
I really appreciate it!

I sent it back to both your adresses. Otherwise, get it here :
www.multimania.com/ilyaslamasse/box.zip

I hope you can make this work ! And don’t forget to post on this forum once you’ve implemented the effect on your site !
pom 0]

Yeah, I’m gonna post here, when i’ll finish my work… thanks…

nice scripting Pom… smoken!!!