How get random letter with Flash mx? I want create movie symbol with this letter.
How get random letter with Flash mx?
Started by napalias, Mar 14 2007 03:55 PM
9 replies to this topic
#1
Posted 14 March 2007 - 03:55 PM
#2
Posted 15 March 2007 - 03:39 PM
Well, you could make a blank dynamic textbox, and call it's instance "randTxt". Then, in the first frame:
function randomise() {
var charStr:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
randTxt.text = charStr.charAt(random(charAt.length-1)+1);
}
Then execute the function whenever...randomise();
#3
Posted 16 March 2007 - 03:20 AM
Idea is ok, but will not work in MX, since this is as2 code.
#4
Posted 16 March 2007 - 03:55 AM
need static not dynamic text beacause want in motion tween change alpha color.
#5
Posted 16 March 2007 - 07:54 AM
AS1 code:
Flash MX (or Flash 6) was the first version of Flash to have Actionscript 2. You cannot modify the text in static text during runtime. If you want to animate your dynamic text, put it inside a movieclip and animate that movieclip.
function randomise() {
var charStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
trace(charStr.charAt((Math.random()*charStr.length-1)+1));
}
randomise();
Flash MX (or Flash 6) was the first version of Flash to have Actionscript 2. You cannot modify the text in static text during runtime. If you want to animate your dynamic text, put it inside a movieclip and animate that movieclip.
Edited by Pax, 16 March 2007 - 07:55 AM.
#6
Posted 16 March 2007 - 01:13 PM
i'm try but not wirking with change alfa, just movie from A to B bu not blur
#7
Posted 16 March 2007 - 02:16 PM
Blur is a flash 8 thing. If youre using MX it wont work. Without seeing the .fla, it will be difficult to really see what you need.
#8
Posted 17 March 2007 - 06:46 AM
if text is static i'm change alfa color ant text disapear.
#9
Posted 17 March 2007 - 09:08 AM
Put the dynamic text inside a movie clip and embed the font. Then your animations will work with dynamic text.
#10
Posted 19 March 2007 - 04:27 AM
Thanks
I'm found another way:
onClipEvent (load) {
shuffle = chr(random(26)+65);
}
and embend
I'm found another way:
onClipEvent (load) {
shuffle = chr(random(26)+65);
}
and embend
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
