smuffles
asked on
Dynamic text and stuff
I'm making a flash movie at home and I want to make an image that when hovered over makes a dynamic text box update with a different bit of writing (randomly chosen). I'm a bit confused as how to update the dynamic text box, any help?
I forgot to mention, that you should either turn the image into a button, or place an invisible button over it...
rp
rp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
it's quite tricky trying to just explain..as rp has found..:)
I have made a sample which uses a slightly different approach using 'if' statements..
www.redpearl.co.nz/misc/randomtext.zip
Z
I have made a sample which uses a slightly different approach using 'if' statements..
www.redpearl.co.nz/misc/randomtext.zip
Z
Z, your code is a little out of date :)
" random(3); "
random() is deprecated... should be using the the most current code when possible...
also, it seems my code takes less typing, and is only located in two spots... I had a little trouble trying to find your engine :)
rp
" random(3); "
random() is deprecated... should be using the the most current code when possible...
also, it seems my code takes less typing, and is only located in two spots... I had a little trouble trying to find your engine :)
rp
fair comments..rp..and your solution is elegant and contemporary..
I personally don't have a problem with using 'deprecated' code though..it will be supported for the forseeable future..and two things about my example..
1. It works
2. It works :)
Z
I personally don't have a problem with using 'deprecated' code though..it will be supported for the forseeable future..and two things about my example..
1. It works
2. It works :)
Z
he he he :)
but so does mine...
so I guess I am just a bit more elegant than your are :)
either way, smuffles, come back and pick one... they both "work"
rp
but so does mine...
so I guess I am just a bit more elegant than your are :)
either way, smuffles, come back and pick one... they both "work"
rp
ASKER
Yeah, thanks rj and Z, it all works now,
Smuffles
Smuffles
ASKER
rp even :P
so who gets the points :)
rp(rj)
rp(rj)
ASKER
hehe had flu, sorry it took a while
smuffles had the sniffles :)
thanks
rp
thanks
rp
textArray = new Array("first statement", "second statement", "third statement");
put this on a button:
on(rollOver){
n = Math.round(Math.random()*3
_root.text1 = _root.textArray[n-1];
}
this assumes that your dynamic text box has a Var of "text1"
does this answer your question?
rp