Controlling Scroll Speed
Hi again,
Is it possible to set text scroller to less than one line at a time so to smoothen and lessen the scroll speed. I have tried things like:
text1.scroll -= .5;
in my action script but it only works in whole numbers of lines, not partial lines.
Any way to slow down the scrolling that a flash dummy can understand
Thanks in advance.
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 10-05-2003, 07:00 AM
View Complete Forum Thread with Replies
Sponsored Links:
Controlling Scroll Speed
Hi again,
Is it possible to set text scroller to less than one line at a time so to smoothen and lessen the scroll speed. I have tried things like:
text1.scroll -= .5;
in my action script but it only works in whole numbers of lines, not partial lines.
Any way to slow down the scrolling that a flash dummy can understand
Thanks in advance.
View Replies !
View Related
Controlling Speed
I have a movie clip I'm duplicating twice to drop from the top to the bottom of the stage- currently all 3 copies drop at the same rate, I'd like to get them to drop at different speeds, and I'm finding it to be a little challenging.... Thanks for any help.....
View Replies !
View Related
Scroll Pane Scroll Speed.
Can anyone tell me how to change the speed of scrolling for the scroll pane in MX? I have looked all over for it, but find nothing. When I am scroll it moves like half a line at at time...I'd like to see it faster.
Thanks
View Replies !
View Related
Controlling Speed Of Movie
I am creating an atomic collision simulator in Flash. Essentially I have a number of balls bouncing around in a container. I want to add a slider bar so that the user can speed up or slow down the speed of all the balls (which have different initial speeds via random variable). Any ideas on how to do this?
thanks,
drj
View Replies !
View Related
Controlling Speed Of A Tween
Hi Im kind of a newbie here so bear with me. I created a basic walk cycle of a stick figure. I published the movie and imported it as a new symbol in a new file's library (actually as a movie clip). I wish to have him walk accross a section of my web page, but cant get the speed of his travel for righ to left at all, much less match his speed of walk within his own symbol. If there is any help on this or another way of tweening a self -contained animated instance acrross the screen, i would greatly appreciate it. Thanks
-dave-
View Replies !
View Related
Controlling Mc Speed Without Tweening
ok what I have is a blank mc and a button. When you roll over the button the mc moves over and above the button. I want to slow the speed of it moving over the button. I have seen some menu's like this when you rollover a link a mc moves over it but slower and smoother. can someone help
thanks
View Replies !
View Related
Controlling A Movieclip's Speed Using AS?
Hey all, been working on something all day but am truly stumped and hope you guys can lead me in the right path
Is there a way to control a given movieclip's tween/timeline speed using Actionscript? What I'm attempting to do is the have a movieclip's tween/timeline speed up if you press the Up key and slow down if you let go of it or press the Down key. I don't need it to reverse at all, it'll only go forward. I just need its speed to adjust accoring to the user's input. The movieclip being controlled only has 10 frames.
I searched around and found some similar concepts using setInterval but all of them dealt with scrolling a movieclip's contents, not necessarily advancing the its timeline. If anyone can help me out, I would greatly appreciate it. Thanks in advance!
View Replies !
View Related
[F8] Controlling The Speed Of An Interval.
I need to create a digital clock with the ability to change the time via + and – buttons. It would be cool if the clock pulled the current time from the computer but it’s not a requirement. I took a stab at creating it and I am running into a few issues.
The first issue is, getting the minutes to display as two characters always.
I also need the button to change the minutes in increments of 1 when the button is pressed and released however when the button is pressed and held I need it to add 1 continuously. Now I was able to do that using a function but it is way to fast. When I press and release the button it adds at least ten to the minute. I can’t seem to press and release the button quick enough to only add 1.
So my second issue is, getting my function to work at something less than super sonic speed.
As always any help would be greatly appreciated.
In the action frame I have:
PHP Code:
minute = 58;
hour = 12;
am_mc._alpha = 0;
pm_mc._alpha = 100;
var timeInterval:String;
function timeChangeAdd():Void {
minute = minute+1;
if (minute>59) {
minute = 0;
hour = hour+1;
if (minute<10) {
minute = "0"+minute;
}
}
if (hour>12) {
hour = 1;
if (pm_mc._alpha == 100) {
am_mc._alpha = 100;
pm_mc._alpha = 0;
} else if (am_mc._alpha == 100) {
am_mc._alpha = 0;
pm_mc._alpha = 100;
}
}
}
And my buttons are using:
PHP Code:
on (press) {
timeInterval = setInterval(timeChangeAdd, 1);
}
on (release, releaseOutside) {
clearInterval(timeInterval);
}
View Replies !
View Related
Controlling A Movieclip's Speed?
Hey all, been working on something all day but am truly stumped and hope you guys can lead me in the right path
Is there a way to control a given movieclip's tween/timeline speed using Actionscript? What I'm attempting to do is the have a movieclip's tween/timeline speed up if you press the Up key and slow down if you let go of it or press the Down key. I don't need it to reverse at all, it'll only go forward. I just need its speed to adjust accorind to the user's input. The movieclip being controlled only has 10 frames.
I searched around and found some similar concepts using setInterval but all of them dealt with scrolling a movieclip's contents, not necessarily advancing the its timeline. If anyone can help me out, I would greatly appreciate it. Thanks in advance!
View Replies !
View Related
Controlling The Speed Of Mc Movement
Hi,
I need to see the individual movements of the black circle on each square rather than it just jumping to the total squares. Ive set it up so that it loops through so if I could slow the movement down I’d get the results I need.
I’m attempting to use set interval but have come to a dead end as to where to put it.
File attached to make this clearer.
View Replies !
View Related
Controlling The Speed Of Mc Movement
Hi,
I need to see the individual movements of the black circle on each individual square rather than it just jumping to the total squares (ie 3 squares at a time). Ive set it up so that it now loops through each square movement - if I could slow this movement down in the loop I’d get to see the movement I need.
I’m attempting to use set interval but have come to a dead end as to where to insert it. Any suggestions will be much appreciated..
File attached to hopefully make this clearer
View Replies !
View Related
Controlling A Movieclip's Speed Using AS?
Hey all, been working on something all day but am truly stumped and hope you guys can lead me in the right path
Is there a way to control a given movieclip's tween/timeline speed using Actionscript? What I'm attempting to do is the have a movieclip's tween/timeline speed up if you press the Up key and slow down if you let go of it or press the Down key. I don't need it to reverse at all, it'll only go forward. I just need its speed to adjust accorind to the user's input. The movieclip being controlled only has 10 frames.
I searched around and found some similar concepts using setInterval but all of them dealt with scrolling a movieclip's contents, not necessarily advancing the its timeline. If anyone can help me out, I would greatly appreciate it. Thanks in advance!
View Replies !
View Related
About Controlling The Speed Of A Movie
that's.. there would be a possibility to control the speed of the keyframes or the velocity on a movie with a control panel or for example: as the fast forward in videos.... d u know what i mean ? i dont mean to modify the velocity in the properties i meant to control it while u see the scene ... ... i've never seen something like that.... someone got any idea or someone has viewed something just like that ..
any help.. will be really apreciated ...
thanks
View Replies !
View Related
Controlling Mc Speed With User Input
I've got the forward and rewind of the movieclip working but the thing is i want the user to be able to change the speed in which they are going.... So i used a input field but i'm not sure as to how to incooperate that into my script. Can someone please help me to review my code? I'm very sorry for the slightly big file size but please do help coz i'm doing my final school project. thanx in advance
please review fla. file
anyway, if you don't want to downlaod the file... here's my script
input is the input text field
myMC1 is the movieclip that i'm controlling
i put the script in frame 1
speed = input;
speed = 2;
myMC1.onEnterFrame=function () {
mousePos = _root._ymouse;
cfrm = _root.myMC1._currentframe;
if (mousePos<150) {
_root.myMC1.gotoAndStop(cfrm+speed);
} else if (mousePos>150) {
_root.myMC1.gotoAndStop(cfrm-speed);
}
updateAfterEvent;
}
View Replies !
View Related
Controlling Motion Speed Of Clip.
Hey y'all.
Little ActionScript problem (using Flash 5): I've got a function that supposed to shift an instance of a movie clip across the screen, like so...
function budgeRow() {
for (i=0;i<40;i++) { num0._y--; }
}
It works fine, but I'd like it to move a whole lot slower - how would I change it (or completely re-write it) to move a certain distance per frame?
Any idea?
View Replies !
View Related
Controlling The Speed Of LOOPs In The ActionScript
Hello
How are you people ?
I have a problem ..
I want to control a MC and move it from one place to another with action script , the problem is that when i use the Loops , the MC move very quickly that the user does not notice it is moving !!! I have tried using Motion Tween and controling it .. it worked fine , but when i want to reverse the movement , i get back to the main problem !
is the there away of controlling the speed of the loops ? or is there away for reversing the movement in the timeline ?
please help
View Replies !
View Related
Controlling A Movies Speed/framerate
I am using flash mx 2004 and would like to know how you go about changing the framerate of a movie by using a slider. What I have is a a clip that plays looping when flash file is published, on top of this i would like a slider that when dragged to left or right it alters the speed of the movie accordingly.
View Replies !
View Related
[CS3] Controlling Sound Playback Speed
Hi guys. I was just toying around with trying to get a script that could control sound playback. I'm getting close, but the playback is very choppy.
Here's the first script I've came up with. It's almost working, but it is very choppy.
Code:
//AS2
SoundObj1 = new Sound();
SoundObj1.attachSound("testsound")
SoundObj1.setVolume(25)
frames = 0
fps = 33
everyframe = function(){
SoundObj1.stop();
SoundObj1.start(frames/fps, 1)
frames+=.5
//Playback speed should be halved.
}
onEnterFrame = everyframe
So I thought, okay, I'll just add an extra sound on top of the gap to bridge the choppyness, but it resulted in the same effect as above. Why wouldn't it? One sound starts and another stops... making it a needless extention on the previous script.
So finally I realised I would need 3 sounds over interval-looped frames to get the seamless sound effect I want...
Code:
//AS2
SoundObj1 = new Sound();
SoundObj1.attachSound("testsound")
SoundObj1.setVolume(25)
SoundObj2 = new Sound();
SoundObj2.attachSound("testsound")
SoundObj2.setVolume(25)
SoundObj3 = new Sound();
SoundObj3.attachSound("testsound")
SoundObj3.setVolume(25)
frames = 0
frameswitch = 1
fps = 33
everyframe = function(){
if(frameswitch == 1){
SoundObj2.stop();
SoundObj1.start(frames/fps, 1)
}else if(frameswitch == 2){
SoundObj3.stop();
SoundObj2.start(frames/fps, 1)
}else if(frameswitch == 3){
SoundObj1.stop();
SoundObj3.start(frames/fps, 1)
}
frameswitch++
if(frameswitch > 3){
frameswitch-=3
}
frames+=.5
//Playback speed should be halved.
}
onEnterFrame = everyframe
It seems slightly improved... but only very slightly. Any ideas?
~TheWaste
View Replies !
View Related
Controlling The Speed Of A Movie Clip With AS
Hi,
I wonder if anyone could help me out. I'm trying to control the exponential speed of the attached movie clip with AS but don't know where to start.
I want the words to scroll through slowly at first and over 4 seconds the speed increases until they are all a blur.
I'm sure this is very simple stuff but I'd appreciate if someone could at least point me in the right direction
Cheers!
Danx
View Replies !
View Related
Controlling A Movie Clip Speed
This is what I have,
basically a looping movie clip of something going across screen.. its going at a pretty fast speed, now I was wondering if it is possible so that when you hover over a button, it reduces the MC's speed or framerate to say 1/2 the original speed, without changeing the speed of the WHOLE movie.
the movie clip i have is called "ticker"
Thanks a bunch
View Replies !
View Related
Controlling Speed Of Movement With Actionscript
I have an interaction where the user pulls the handle on a slider (to the right) to move the bottom part of a line to the left of the screen, 120 pixels from the original position (the top of the line stays put, so the line gets longer and has an increasingly steep angle).
The code below is working aok, but here is the problem: The slider bar is 200 pixels long. For the first 50 pixels, the bottom line point should move three quarters of the total length; for the last 150 pixels, it moves the last quarter.
When I use if/else statements, the line jumps erratically depending on how fast the slider handle is pulled. Is there any way to calculate the speed to go fast for the first 50 pixels of the slider, and then slow for the last 150?
Any help is much appreciated.
Thanks
Here is the code:
//Global variables
_global.startX = 184;
_global.startY = 270;
_global.endX = 285;
_global.endY = 165;
_global.curveX = 175;
_global.curveY = 167;
_global.endPoint = 64;
_global.distanceX = startX - endPoint; // 184 - 64 = 120
_global.barLength = _root.slider.bar._width - 2;
_global.moveUnit = distanceX/barLength;
//original curve start coordinates
_global.orgStartX = 184;
_global.orgStartY = 240;
//this is the line that moves when the slider handle is pulled
_root.createEmptyMovieClip("drawing",5);
drawing.lineStyle(2,0xFF0000,90);
drawing.moveTo(startX,startY);
drawing.curveTo(curveX,curveY,endX,endY);
//slider drag
_root.slider.toggle.onPress = function() {
this.startDrag(true,0,0,200,0);
};
_root.slider.toggle.onRelease = function() {
this.stopDrag();
};
this.createEmptyMovieClip("moveCurve",2);
_root.moveCurve.onEnterFrame = function() {
if (_root.slider.toggle1._x == 0) {
startX = orgStartX;
}
else {
startX = orgStartX - (_root.slider.toggle._x * moveUnit);
}
drawing.clear();
drawing.lineStyle(2,0xFF0000,90);
drawing.moveTo(startX,startY);
drawing.curveTo(curveX,curveY,endX,endY);
}
View Replies !
View Related
Controlling Speed Of Handmade Text Effect
Hey, everybody!
I'm using a simple text effect in which movie clips of single characters are duplicated and I'm having trouble getting it to work at the right speed. I know of two ways I can conceivably control the speed at which the text unfolds:
1) Duplicate the character movie clips in one frame (and set their properties there), and keep looping back from a subsequent frame until all of the sentence has been spelled out. This way is already working, and if you want the text to unfold slowly, this is great. You can adjust the speed by changing the number of frames per second of the movie, or by adding extra frames to the timeline between the first frame and the loopback one.
2) If, however, you want the text to unfold faster, but don't want to set the movie speed to faster than, say, 25 fps, the only other way I can imagine is to put all of the ActionScripting within one frame, like so:
// the "len" and "charwidth" variables are initialized elsewhere.
// "ani" is the name of the movie clip which animates the placeholder movie clip "chars"
while (i<len) {
duplicateMovieClip ("ani", "ani"+i, i);
setProperty ("ani"+i, _x, cursor);
setProperty ("ani"+i, _y, y);
set ("ani"+i+".chars:char", text.substr(i, 1));
// this line advances the cursor the right amount for variable-width font
cursor += spacingfactor*eval("_level0.charwidth"+text.charCo deAt(i));
// pause for so many msec.
pause(30);
i++;
}
stop ();
The pause(n) function is necessary to keep the all of the characters from being printed at essentially the same time. Turns out this code runs the way it should, but that the individual movie clips duplicated in the first line of the while() loop don't start to play until the entire while() loop is exited! In other words, if I put a bigger value in the pause function, the whole movie pauses with a blank screen for more time and then all of the letters play their animation at once, rather than me seeing more time delay between each individual "ani"+i movie clip.
I know I can get around this by just using a faster fps setting for the movie, but I'd like to understand why this idea doesn't work like it seems like it should.
Thanks! and sorry this post is so long...
Ed
View Replies !
View Related
Controlling Movie Playback Speed On Runtime?
Hi!
I tried to find a solution but didn't found so here i am asking for your help
I'd like to make a controller (+ and -) to change the movie playback speed. I guess i should change the frame rate to achieve the results i'm after?
The biggest problem is that i have movies in three different movie clips. The main movie and 2 empty movie clips that i'd like to be able to control from the main movie.
The greatest thing would be to be able to make a "floating layer" that would be over all the other movies.
Thanks in advance!
View Replies !
View Related
User Controlling Speed Of Movie Clip
I am working on a site that has a bunch of products which move across the page from right to left. I just have all of the products lined up and tweened the motion. I would like to include a right and left arrow above this movie clip that the user could click on to speed up the movement in either direction. I'm in Flash 4. I cannot figure out what action script to assign the buttons. I know this has got to be an easy thing to do but I've gone brain dead for some reason. I searched the forum for this answer but couldn't come up with it.
Help! This forum has been a great help to me in the past. I appreciate everyone's willingness to help.
View Replies !
View Related
Controlling Speed Of Audio And Video Playback ?
Hi!
I would like to know if there is (or will be) a way with upcoming Flash CS4 or even with Adobe Flash Player 10 capabilities (or even with Adobe Pixel Bender) to control the speed of an audio or video playback.
For example being able to play some sound slower or faster and even adjusting audio pitch (and other audio filtering).
It's been a while that I've been looking for this (back to Flash Player 6 when Flash was part of Macromedia) and with all progress achieved since then I hope there is some accelerate and decelerate feature now.
Please let me know about it.
View Replies !
View Related
Scrolling Image Controlling Speed W/mouse
Hi everyone
I followed infinite menu tutorial somewhat successfully but not quite for this effect:
http://fenwickplantation.com/scrolli..._fenwick2.html
The graphic is 2400 pixels wide and the movie is 600 pixels wide. But, for some reason it's skipping, and not showing the full image:
http://fenwickplantation.com/collage_2400.jpg What do I need to change in the code to make it roll continuously showing everything? I'm just clueless right now
Here's the fla:
http://fenwickplantation.com/scrolli...y_fenwick2.fla
Any help so greatly appreciated
Code:
onClipEvent (load)
{
xcenter=300;
speed=1/50;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 0) _x=-300;
if (_x < -300) _x=0;
}
oops, forgot to paste code
View Replies !
View Related
Scroll Speed
Hello All,
I have a MC that scrolls by clicking and holding either an up or down arrow. My prob is that the movie clip could be a multitude of heights. So I need to make the speed of the scroll be determined by the height of the MC.
Anybody know how I would define that??
Thanks,
Brian
View Replies !
View Related
Scroll Speed
Hi!
I have two scroll buttons. When you have the mouse over it, it's scrolls automatic. I use this code, which i found in another thread:
// mc with instance name "down"
down.onRollOver = function()
{
this.onEnterFrame = function()
{
news.scroll+= 1.0;
};
};
down.onRollOut = function()
{
delete this.onEnterFrame;
};
// mc with instance name "up"
up.onRollOver = function()
{
this.onEnterFrame = function()
{
news.scroll-=1.0;
};
};
up.onRollOut = function()
{
delete this.onEnterFrame;
};
My problem is that the movie has 30 frames/second, and therefore, it scrolls really fast. Does anybody knows how i can slow down the scroll speed without changing numbers of frames/second? (i have tried to change news.scroll-=1.0; to a lower number, but it wont go lower than 1.)
Magnus
View Replies !
View Related
[Flash 8-AS2] Problem Controlling Speed/movement With AS Inside A Loop
I am currently working on a Flash application in which I have several vertical bars that go across the window, and when one of the bars is clicked on, the others move to either the left or the right to create space to the right of the selected bar for a large image.
Here's an example of something similar:
http://www.fastspot.com/architecturalmesh/
(However, they use a mouse over function where I would be using an on press function.)
I have already written enough of the script to get the bars to move to where they should be when they are clicked on, but they do it instantly--there is no show of movement between point 1 and point 2 (this being the starting and ending x coordinates for each movieclip).
If you're wondering about any of my number values, they are the way they are because the document is 800 wide, it has 5 vertical bars within it, each of them 30 wide, and the bars are 5 pixels apart when placed next to each other. Anyways, here's the script I am currently working with:
Code:
clip3_mc.onPress = function(){
speed = 1;
if (clip3_mc._x < 690){
while (clip4_mc._x < 725){
clip4_mc._x += speed;
}
while (clip5_mc._x < 760){
clip5_mc._x += speed;
}
}
else{
while (clip2_mc._x > 45){
clip2_mc._x -= speed;
}
while (clip3_mc._x > 80){
clip3_mc._x -= speed;
}
}
}
With this code, all the speed variable does is determine the length of the pause before the bar goes from its original x coordinate to its final x coordinate.
I have tried to replace the line that reads "clip3_mc._x += speed;" with several variations ("clip3_mc._x ++;" , "clip_mc._x = clip_mc._x + 15"), but I don't think that's the issue.
I would very much appreciate any insight, tips, or advice anyone might be willing to offer. I will, of course, continue to work on the script on my own and am more then happy to post my own findings if anyone is interested in seeing them. Thank you for your time.
View Replies !
View Related
Scroll Bar Speed Issue
lately i built a text window with up and down scrollbar. i used mask so only part of the text is visible and you can adjust where you are viewing with the up and down buttons. for some reason when the text gets big, the up and down speed seem to have slow down relatively(text scrolls while mouse rollovers).... is there a way to solve this problem or all scrollbar system have this problem???
View Replies !
View Related
How Do You Set The Speed When Using MyText.scroll--;
Hi All,
I am using the following method of scrolling dynamic text. However the scrolling-speed is too fast (because of the main FPS is set to 30. How do I control the speed of the scroller when using:
Code:
onClipEvent (enterFrame){
if( scrolling == "up"){
type.scroll = type.scroll - 1;
}
if( scrolling == "down"){
type.scroll = type.scroll + 1;
}
}
Anyone?
Thanks,
Flip.
View Replies !
View Related
Speed Scroll + Previewing
I am controlling a scrolling movie with the script below, but have no idea how to stop it from going off the stage completely and to control the speed so that it scrolls faster the closer your mouse goes to the edge of the movie?
onEnterFrame = function(){
if(_root._xmouse < 50){
scroll_the_group(1);
}else if (_root._xmouse > 500){
scroll_the_group(-1);
}
}
function scroll_the_group(aDir){
scroll_group._x = scroll_group._x + 10 * aDir;
}
One more thing thats probably simple; Im in flash mx, pc, how can I stop my movie scaling up every time I preview it (ie when I ctrl+enter)It is the right size if I publish it according to the settings ive chosen- is there a way of making these the default?
thanks in advance
View Replies !
View Related
Scroll Speed In Mac Jerkier?
hi all,
http://dcr1389s1.vivaldi.2day.com (this is about 500k in size)
this is a slideshow i have created to a client's specs. the scrolling is controlled by actionscript. when you mouseover an image it stops and appears in middle of frame.
problem, seems to scroll ok on pc - however when tested on a mac (G4 - G5) the animation is reported to be a little jerky and hard to watch. i have been looking at this so long that i cannot tell difference between 2!!
my client is of the belief that their brand new G5 with apple cinema display will perform better than my pc flatscreen, so when i mention that it might be video card the response is not good.
any thoughts/feedback would be appreciated.
mike
View Replies !
View Related
Ticker Scroll Speed
I created this news ticker from a tutorial in a Flash book i recently obtained...the ticker works fine, however.....it scrolls so fast that you can't read it. There is nothing in the tutorial about setting the speed or how to control the speed, which i would have thought would be a fairly important piece of it.
Could someone help me out with how i can slow down (or speed up) the scrolling in this file? Is there any standard speed control for scrolling things or does it depend on what you're scrolling (text or movieclips).
thanks in advance...
View Replies !
View Related
Scroll Bar Speed Issue
I have a scroll bar now I am using and I have heard it moves to fast for people even on a click click level. I wanted to know how I can slow down the scroll bar movemont? I have attached the code below, let me know some better ways please.
stop();
holder.upmc.up.onPress = function(){
doScroll(-1);
};
holder.downmc.down.onPress = function(){
doScroll(1);
};
holder.upmc.up.onRelease = holder.downmc.down.onRelease = function(){
doScroll(0);
};
doScroll = function(val){
this.onEnterFrame = function(){
holder.hometextloader.scroll += val;
if(!val){
delete this.onEnterFrame;
}
};
};
Thanks
View Replies !
View Related
Text Scroll Speed
I'm using the "scroll" property with a couple of onPress events to fluidly scroll text up or down in a dynamic text field. For example:
myTextField.scroll += 1;
It seems that there's no way to reduce the speed of the scroll below "1," which is relatively fast for most font sizes. I understand the increment (1 and up) is moving that many lines of text, but am surprised that ActionScript doesn't seem to allow incrementing by a half or a quarter line (.5 or .25, respectively), since AS mostly speaks in pixels.
Without creating a custom class or writing a bunch of AS, is there a simple way to slow down the scroll speed while still using the "scroll" property (and not coding this the old fashioned way with masks and _y actions)? Seems odd that the "scroll" property would be introduced to alleviate lots of programming, and then fail to include better control for speed. I'm assuming I'm just missing something...
View Replies !
View Related
Idle Scroll Speed
Hi,
I'm using the following code to continuously scroll an image. I want to keep the mouseover but I need a way to make it scroll at an idle speed when the mouse isn't over the image. I'd greatly appreciate any help.
onClipEvent (load)
{
mouseOn = false;
xcenter=600;
speed=1/10;
}
on(rollOver)
{
mouseOn = true;
}
on(rollOut)
{
mouseOn = false;
}
onClipEvent (enterFrame)
{
if(mouseOn)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 0) _x=-1950;
if (_x < -1950) _x=0;
}
}
Thanks
View Replies !
View Related
|