Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : how do i do these 2 eye candy features?


Kay Poe
5/16/2004 11:33:49 PM
1. i have four lines surrounding my first frame of content. on this first
frame only, i would like the lines to "draw" across the stage. would this be a
motion tween? if so, I can't figure out what i am doing wrong.

2. the second eye candy i'd like and an't figure out: i have text movie
clips on each frame. i would like each of them to come in line by line if
possible. NOT left to right as if writing it out, but just appearing line1,
line 2, line 3 very quickly. again, these are embedded movie clips. thank you.
mandingo
5/16/2004 11:51:31 PM
Hi,

Not an expert in animation but motion tween will animate the line and make it
move... you want to make it GROW so you will need to use SHAPE tween. Hope
that fixes that problem.

As for adding lines, what you could do is a repeating function using
setInterval to add your lines and display them with a delay between each
defined in your interval.

Hope that helps,
cheers
Kay Poe
5/17/2004 12:03:42 AM
fasterthanlight
5/17/2004 12:13:43 AM
make sure your 4 lines are on seperate layers.
to make the text appear, make a motion tween about 10 frames long
set the alpha of the movie clip in the first frame of the tween to 0% (via the
Properties palette)
the text should fade in.

mandingo
5/17/2004 12:23:06 AM
Here, this will do the dynamic interval... it isn't a fade... just appear on
stage... first place your text fields on stage where you want them to
appear... I have used four textFields in this example and labelled them
"textField1","textField2"... "textField4"

then do this:

textToDisplay = ["textField1","textField2","textField3","textField4"];
for(var k = 0; k < textToDisplay.length; k ++){
this[textToDisplay[k]].text = "I am some text in " + textToDisplay[k];
this[textToDisplay[k]]._visible = false;
}
displaying = 0;
displayText = function(){
trace("entering function for " + textToDisplay[displaying]);
_root[textToDisplay[displaying]]._visible = true;
displaying ++;

if(displaying >= textToDisplay.length){
clearInterval(myDisplayDelay);
}
}

myDisplayDelay = setInterval(displayText,500);


that will turn all four text fields off to begin with, then using the interval
of 1/2 sec or (500 milliseconds) make them appear on stage.

hope that helps
cheers,
Kay Poe
5/17/2004 12:32:16 AM
mandingo
5/17/2004 12:35:37 AM
No worries :)
AddThis Social Bookmark Button