View Full Version : Can somebody help me with making a game?
Hatsune Miku
July 17th, 2011, 08:49 PM
I'm making a game, it's going to be simple but I need help with one thing, I've googled it but I can't really find a good match.
The games going to be flash, and basically you just click a button and it fetches data from a website (the website being here (http://thebest404pageever.com/)) So everytime you click the button, it'll load up a random page on this site.
It's not really a game, but I don't know the word for it so I'll call it a game.
TheMatrix
July 17th, 2011, 10:40 PM
With a tidbit of hacking*, this can be easily achieved.
So if you look at the page source, you will see something like this near the middle:
<object type="application/x-shockwave-flash" data="http://thebest404pageever.com/swf/ef_loli_run.swf" width="640" height="480" id="object_404">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://thebest404pageever.com/swf/ef_loli_run.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<embed src="http://thebest404pageever.com/swf/ef_loli_run.swf" menu="false" quality="high" width="640" height="480" id="embed_404" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Most of that is irrelevant. So the interesting bit is on the first line, you will see http://thebest404pageever.com/swf/ef_loli_run.swf.
Remove the "ef_loli_run.swf". You now have http://thebest404pageever.com/swf/. Enter that address into your browser, or click on the link I provided.
There is the index of all the videos/animations. You could either:
Parse the HTML in that index file.
You take all of those links, put them in an array, and let the program choose a random one each time. Use something like the following PHP code, but then in Flash/XS:
$videos = array( "http://thebest404pageever.com/swf/catcatcatcat.swf", "....", "..." ); //Replace the dots with the video SWFs
$video_number = array_rand( $videos );
$chosen_video = $videos[ $video_number ];
echo '<embed src="'.$chosen_video.'"......>';
Although the latter is more time-taking(you have to get all the video links), it may be the best way.
Geddit?
* With "hacking", I imply "creative solutions to a problem"
vBulletin® v3.8.9, Copyright ©2000-2021, vBulletin Solutions, Inc.