Flash Variables Question
- Started
- Last post
- 7 Responses
- paulsmith
Hello chaps,
I am doing a boring Flash assignment for University and have a couple of questions for any kind soul willing to help.
1: Is possible to make a variable the current date ? Like SysDate in Oracle ?
2: I have three variables and one another variable that I want to inherit the value randomly from one of the first three variables (if that makes any sense) How do I do that ?
- 8dot30
1, i guess you could make a php or asp script that gets the date and have flash bring it in
2 made no sense what so ever.
- paulsmith0
I have done the date part but the random variable section I still have to do.
Any suggestions on that ?
- paulsmith0
LOL. The date is very long winded in Flash. I'll post the fla if anybody wants it ?
For the second part basically I want to have random text appear when the user enters the scene.
- o0o0
how about an array?
var aText = new Array("textone", "texttwo", "textthree");
then....
var rnd = Math.round(Math.random()*aText.l...
var rndText = aText[rnd];does that help?
- paulsmith0
Thanks o0o I have a play around with that and see if it works.
DateScript can be found here:
- 8dot30
the array thing will work.
- paulsmith0
Yup it's done the trick nicely.
It doesn't have to be brilliant. I was trying something along those lines but couldn't get it to work. I am by no means a programmer! :-) Thanks Chaps.