flash (macromedia):
does anyone know how the text effect seen on http://www.addition.com.au/#welcome (under the details section) is made? Also, can it be made by loading an external text file? if anyone can help or point me in the right direction of a tutorial, it would be greatly appreciated. thanks-
I'm not exactly sure how they were making this one, although i can imagine several different ways to achieve it. one could simply place a MC over the top of the 'actual' menu and run an animation through several different characters moving the MC to the right, one character space at a time. You could concat the string and 'roll' through random characters until reaching the correct one that equals the one in that section of the menu list. Or probably a couple of other methods. As to how it could be done with loaded text, I think one would treat it in the same way. first load up the text in a var, 'roll' through RND text characters, until it equates to the correct one in the string at that location. I think you would want to use some looping here, but you would want to 'break' out of it on each iteration to display the character, or at least call an updateAfterEvent() or something to cause it to be redrawn. Neat effect. To the toturial part, read the Flash help sections on Strings, that should give you some ammo.
thanks for the reply. i figured i could make the menu button effect by changing the individual characters (seems like there should be an easier way), but i didn't think about using the string. i'll look it up. thanks. i was actually talking about the text field that seems to fade up line by line. under the "detail" line. any idea how that was done? thanks again-
well, I hadn't seen the text under the details section, I hadn't even selected one of the menu items. So after doing so i think I have an answer for you, and did test the theory. If you adjust the 'leading' property of a the setTextField() function using a variable that is redefined within a loop, you can change the width of the line spacing. On the first frame used the code, var leading_fmt:TextFormat = new TextFormat(); leading_fmt.leading = 30; leading_txt.setTextFormat(leading_fmt); onEnterFrame = function() { if(leading_fmt.leading > 0) { leading_fmt.leading -=1; } leading_txt.setTextFormat(leading_fmt); } Looks like you could adjust things however you would like using this method. I'm not certain how they created the color change though, I guessing that you could do that with a translucient mask effect over the top of the field, or by using the text as a mask rather. Just make sure that the character set you wanting to use is embed within the dynamic field, and you should be set.
sorry, that was the setTextFormat() function, (bad typist, bad typist ...)
first of all, thanks a lot for helping. i think i'm missing something. here is what have. a button that loads text in a text feild. on this button i have my load vars code and the code you gave me. on (release) { loadVariables("aboutUs.txt", ""); var leading_fmt:TextFormat = setTextFormat(); leading_fmt.leading = 30; leading_txt.setTextFormat(leading_fmt); onEnterFrame = function () { if (leading_fmt.leading>0) { leading_fmt.leading -= 1; } leading_txt.setTextFormat(leading_fmt); }; } this isn't working, but i know i'm missing something. do you know what i'm doing wrong? sorry, i should have told you i'm not the best programer. thanks-
Well, a couple of things here. First, make sure you have the instance name assign to the Textfield, in this case it should be 'leading_txt'. Second, when using the loadVariables() call, the second parameter should point to a MovieClip, but in this case, the Textfield (ie. 'leading_txt'), I'm not certain this will work as the target? you may need to switch the call to a loadVars object, then assign the string to the text property as in, " leading_txt.text = textObjectX; " of course you need to set up your object variable first. Another thing of note, you should add to the 'if' statement in the onEnterFrame function, my bad, didn't put it in the initial code. add this ... }else{ onEnterFrame = null; } this will 'kill' the onEnterFrame function and stop it's continued looping when the leading variable = 0. So just a couple of things to try, everything else look fine.
Don't see what you're looking for? Try a search.
|