the 5 is to be sure it's above the movie layer, which has a smaller index
none of it works. I don't know if the 'the' is behind the movie or heading graphic or anything. Sorry I can't show the actual site. It's on my computer. If that would help, I can upload it and graphic and video.
The complete code (for those of you with a lot of time on your hands) is below:
$rint = rand(1, 24);
case 1: $st = "I bet you can't eat another."; break;
case 2: $st = "Now would be a good time to get your head out of your ass."; break;
case 3: $st = "Wow. Good luck with that one."; break;
case 4: $st = "If you eat too many fortune cookies, you'll get fat (like Buddha) and wise (like Buddha)."; break;
case 5: $st = "I'm a cryptic fact instead of a fortune."; break;
case 6: $st = "Fortune cookies are b*ll****."; break;
case 7: $st = "You will lose only two fingers in an accident that involves a dingo and a rabid rabbit."; break;
case 8: $st = "The only way to win the lotto is by not playing it. Here is your lotto number: 16-20-22-32-37."; break;
case 9: $st = "You ate my fortune cookie."; break;
case 10: $st = "Your future self will be a millipede. It's karma, b*tch."; break;
case 11: $st = "Girlfriend, don't you wear that shirt again."; break;
case 12: $st = "Honesty is unbecoming of you."; break;
case 13: $st = "Your death will involve a fire hydrant and a pair of high-heeled shoes."; break;
case 14: $st = "Your love of peanut butter will be your undoing."; break;
case 15: $st = "Hey, you're not supposed to choose this fortune cookie!"; break;
case 16: $st = "Somebody will confuse you with Sandra Bullock, <br />and you will spend the rest of the day<br /> trying to figure out how that happened."; break;
case 17: $st = "Atitudes are contagious-you can get them from holding hands."; break;
case 18: $st = "You are a terrible, terrible person and should be thoroughly ashamed."; break;
case 19: $st = "Dude, I've seen you dance, and dude, you shouldn't dance in public.";break;
case 20: $st = "Despite the fact that you've always thought your favorite color was pink, it is actually green. Good to know."; break;
case 21: $st = "You are awesome like cheesecake."; break;
case 22: $st = "If you don't have everything you want, try marrying into a large family so you'll get more presents at Christmas."; break;
case 23: $st = "You are contemplateive and analytical. While that sounds like a good thing, it actually means you're a nerd."; break;
case 24: $st = "Watch Reno911 on Comedy Central on Wednesdays at 9:30pm. <br> It's way funnier than this fortune cookie gig."; break;
echo '<div style="position:absolute; top: 280px; z-index:5; width: 350px; color: yellow;">';
I didn't really know when I was embedding the Flash video either.
Is PHP even the right thing to make this work? Is what I'm trying to do even possible?
Because I have no idea what that means. Are you suggesting I get a book on ActionScript? I don't want a different video per each fortune. Do you mean I can randomly choose a phrase and display it using actionscript?
It would be cool if I could make the play button be on the movie. I think that's very simple actionscript, right? I wouldn't know how to make the player not show up.
You can send values to the flash element through flashvars. Then in the flash file use a little bit of actionscript to put that text into your textfield. That way you can just use the one video for all texts and you could even change the text without having to touch the flash file.
Do you know of any good resources or tutorials for doing this? I kinda get what you're saying, but I have no idea how to implement it. Thanks for giving me some good basics for further investigation, though.
You can use a bit of AJAX type scripting to call your php file from flash if thats what you wish. Any way around it it would be much more difficult to try and position your output above the flash element and much easier to have the flash element grab the value either through flashvars or the flash calling your php directly. How were you planning to provide the text with PHP without a refresh before?
Well, I never got it to display, so I don't know if it ever changed randomly. :nP I just realized that. Does Flash have code for randomly selecting something? I also have to time the appearance of the fortune so it is right when the cookie opens, which I can do by adding a keyframe. Could I just make lots of mini movies of different fortunes when the fortune is displayed? And put one of those mini-fortune movies after the opening the fortune movie? Can Flash do that? I can make the mini-movies. I just don't know how to go about randomly selected one of them and playing it after the opening cookie movie.