To burning with you!

(Note: I only have flash 5, but nobody looks in there, and it’s so simple it shouldn’t matter.)


I’ve never done anything with actionscript, except when Sen was coaching me a bit through making buttons connected sort of, so I really wouldn’t know where to start on this one.

What I want to do is have 3 lists of words, like, a noun, conjuntion, and verb list. 1 each. and then I want to make it so that it will make random 3 word sentences.

1st question: where would all my words go if they’re random, and only 1 is in the movie at a time? …Is there a special place to make a list inside actionscript or something?

2nd: is this thing that seems simple actually really hard?

3rd: Am I going to die? (No, actually, it’s ‘Could someone help me get off to a good start on this thing?’)

Oh, and one other thing, it will always be in the same order.

Tim is dumb.
Joe is funny.
Cats are loud.

…you get it.

save them as strings in an array


nAr = ["Tim is dumb", "Joe is funny", "Cats are stupid"];
nRand = random(3);
myTextBox = nAr[nRand];

here’s a file…

Jubba-

I wanted to make it so it was like this -

Random Noun - Random Whatever - Random Whatever

so that I could put int 15 words to each type, and then have a possible 15x15x15 combinations… whatever that comes out to.

Jubba -

Also - that file, when I try to view the actions panel thing, my flash just starts to flicker and then closes.

you have to save the file to your HD before you view it.

about the other question, you would do the same principle, but you would have to modify it a bit… i don’t have any time right now… too much school work…

something like this?

nounArray = ["Tim", "Joe", "Cats"];
conArray = ["is", "is", "are"];
adjArray= ["dumb", "funny", "stupid"];

rand1 = Math.floor(Math.random()*3)
//trace(rand1)
rand2 = Math.floor(Math.random()*3)
//trace(rand2)
rand3 = Math.floor(Math.random()*3)
//trace(rand3)
myTextBox = nounArray[rand1]+" "+conArray[rand2]+" "+adjArray[rand3]
trace(myTextBox)

…I have no idea, but from my semi-good logic skills, that looks right!!!

Where would I put that?

“rand1 = Math.floor(Math.random()*3)”

would I have to change the 3 to the number of words I put in the noun array thingy?

When I tried to do this on my own, I made a text box… but then I could only type in it, and if I left it empty then it would disappear… So i don’t know what’s up with that…

bump

bump bump

To burning! My EYES!

Anyways, the first time I ask for help in like, 3 months, and nobody will help me! I can’t help that I’m ignorant, I just want to know how to make a text box that won’t disappear when I make it! and… and… however else I make the sentence thingy work!

You can delete this thread when/if somebody finally helps me in the flash 5 forum. Which apparently the super smart guys don’t go to.Except for jubba once, to move it out of the popular MX forum. where it might have been solved. :stuck_out_tongue: :frowning:

in what flash???

make sure your making it on the correct layer. or if you dont, it will hide behind the background.

I! no! I want to make a text box, and I want it to have actionscriptiness to make words go in it

but I don’t know what to do to make it be an empty box just sitting there, so that stuff will go in it when it… loads… go see the thread in flash 5

it’s called random sentence

the most common reason for that to happen in your textbox is that the color of your text and the color of your background are the same

you would put that code in your main timeline

yes. you would change the 3 according to the number of values in your array

that is not the way I would have written that expression. If you do a search on math random you will find plenty of ways to do it.

good luck.

Aislin. Don’t try to strongarm people into answering your question by posting in random.

Thanks.

I’m not trying to strong arm, I’m just begging.

I’m not so new to the comp that I wouldn’t know the white on white thing. I meant if the actionscript is putting stuff in a box, don’t I need a text box? But if there’s no words in it until the actionscript puts the words, then it disappears.

Aislin. I am not doubting your abilities. I do this stuff for a living, and sometimes I do the same thing with the text. I slap my face a couple of times and go Doh! It just happens.

send me your file where it happens and I’ll try to tell you what’s wrong.

btw, I dont think anyone is avoiding your question. I havent used Flash 5 in so long, I frankly have forgotten the old syntax, so I choose not to come into the forum.