Page 1 of 1
Random flash messages
Posted: 26 Apr 2006, 11:12
by ayu
I have a flash message on my site...its like a tip that comes "scrolling" in when you enter....i want to have "random" mesages...like if i have a folder with 10 different flash files...i want them to play randomly as you enter...is there anyone that knows of such a code?
Posted: 26 Apr 2006, 12:54
by mystikblaze
..
Posted: 26 Apr 2006, 14:47
by ayu
Didn't really find what i was looking for there :/
Here is a script
Posted: 26 Apr 2006, 16:36
by maboroshi
Here is a script I found and adopted to flash
set your random flash scroller to use a dynamic text field set its Var name to "message" (without the quotes) include this code in the flash document
Code: Select all
loadVariablesNum("http://www.yoursite.com/filename.php", 0);
create a text file of messages named random.txt this will be the messages displayed
create a php file with this code
Code: Select all
<?
$textfile ="random.txt";
$items = file("$textfile");
$item = rand(0, sizeof($items)-1);
echo "&message=".$items[$item];
?>
Good Luck