suha
May 15th, 2003, 04:59 AM
i've a movie clip (e.g. scroll_text) which is consist of 5 words (each word is an individual movie clip). an instance of 'scroll_text' movie clip placed in the main timeline with the following script:
onClipEvent (enterFrame) {
_x -= 30;
if (_x<=-2247) {
_y = 40+Math.random()*(400-40);
_x = 1024;
}
}
this script allows the movie clip to do the following:
1. scroll from right to left
2. start with a new 'y' coordinate for each new scroll
3. restrict the 'y' coordinate between 40 to 400
-------------------------------------------------------------------
at the moment i'm trying to achieve the following:
1. i like to assign a specific colour value randomly to each word embedded in the 'scroll_text movieclip'. so for each new scroll each word will appear in a different colour. for example,
for the first scroll each word should display in following colour:
word 1: #ffffff
word 2: #000000
word 3: #33ff00
word 4: #cc6699
word 5: #666666
and for the next scroll it will just swap the colour between words. this should happen continuously.
2. is it possible to achieve?
3. is there any other alternative to implement this?
any help will be much appreciated.
onClipEvent (enterFrame) {
_x -= 30;
if (_x<=-2247) {
_y = 40+Math.random()*(400-40);
_x = 1024;
}
}
this script allows the movie clip to do the following:
1. scroll from right to left
2. start with a new 'y' coordinate for each new scroll
3. restrict the 'y' coordinate between 40 to 400
-------------------------------------------------------------------
at the moment i'm trying to achieve the following:
1. i like to assign a specific colour value randomly to each word embedded in the 'scroll_text movieclip'. so for each new scroll each word will appear in a different colour. for example,
for the first scroll each word should display in following colour:
word 1: #ffffff
word 2: #000000
word 3: #33ff00
word 4: #cc6699
word 5: #666666
and for the next scroll it will just swap the colour between words. this should happen continuously.
2. is it possible to achieve?
3. is there any other alternative to implement this?
any help will be much appreciated.