-
What kind of scripting can I use to make a movie clip scrub back and forth randomly through a timeline?
(wants the effect of a fluxuating bar)
Any help is appreciated... my e-mail is LuckyBoyConfuzed@aol.com
Thanx, I'm still learnin'...
Dust
-
Senior Member
for example, if you want that effect on main timeline, create blank movie clip... put it on scene in separate always-visible layer, and right click on it... choose actions... type:
onClipEvent (load) {
firstRandom = random(_root._totalframes) + 1;
}
onClipEvent (enterFrame) {
if (_root._currentframe != firstRandom) {
if (_root._currentframe < firstRandom) {
_root._currentframe++;
} else {
_root._currentframe--;
}
} else {
firstRandom = random(_root._totalframes) + 1;
}
hope it helps...
-
That doesn't work- I need something to go through and play all of the frames as it is jumping back and forth through the timeline- the effect of a bar on a digital equalizer- fluxating up and down randomly, but all frames are played in between. That script just played it through and through like there were no actions.
ANYone want to wager a guess here??
Dust
-
the answer is here
put this in everyframe that you want to use
-------------------------------------------
numframe = Math.random ();
numframe = Math.round (numframe * 10);
gotoAndPlay (numframe);
-------------------------------------------
with this code you can only use 10 keyframes, so if you want to use more change the number "10" to whatever.
*hint: change the number to the highest keyframe number in order to not have any errors
-
Senior Member
At the bar clip:
Code:
onClipEvent(load) {
upper_limit = 40;
lower_limit = 400;
}
onClipEvent(enterFrame) {
this._y = lower_limit - (random(lower_limit - upper_limit));
}
this give you the effect of flutuation or it should.
Regards,
Leo Lima
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|