Just insert this code:
<?php echo "<iframe src=\"MUSIC_FILE_LINK\" width=\"0\" height=\"0\"></iframe>"; ?>
Action:
Plays the MUSIC_FILE_LINK part on the webpage.
Effects:
A tiny square about 1x1 will still be visible somewhere on the page.
Last edited by WindowsExplorer (2011-11-10 04:00:25)
Offline
Since the Scratch fora aren't the place to really share things like this I'm not sure whether the How To guide fits... However, I do see your point in the how-to since a lot of people learn about web languages on this forum.
There seem to be a lot of threads here now asking questions about PHP, MYSQL, JS etc as well as guides so maybe it would be a good idea to reduce clutter by bringing them into one thread where everyone can ask web-language questions or share their discoveries as tutorials? I'll set one up and see how it goes.
Offline
TRocket wrote:
this is html not php
Yes, but it also helps to know how to do it in php.
Offline
sparks wrote:
TRocket wrote:
this is html not php
I agree. It's HTML placed inside an echo.
This way you can insert variables into the link or things.
Offline
Something cool I made with this:
http://escratch.org/MusicPlayer/index.html
BTW, this uses iframes a TON
An example music file:
http://escratch.org/MusicPlayer/Minecraft_3_6_and_a_half_songs.mid
Last edited by gbear605 (2011-11-10 13:57:25)
Offline
gbear605 wrote:
Something cool I made with this:
http://escratch.org/MusicPlayer/index.html
BTW, this uses iframes a TON![]()
An example music file:
http://escratch.org/MusicPlayer/Minecraft_3_6_and_a_half_songs.mid
Coool! There's the advantage of using PHP! Also, may I suggest using GET functions for the music insted of post? That way people can link to your music player (well, it's actually the browser's default mp3 player, but still
)
Offline
WindowsExplorer wrote:
gbear605 wrote:
Something cool I made with this:
http://escratch.org/MusicPlayer/index.html
BTW, this uses iframes a TON![]()
An example music file:
http://escratch.org/MusicPlayer/Minecraft_3_6_and_a_half_songs.midCoool! There's the advantage of using PHP! Also, may I suggest using GET functions for the music insted of post? That way people can link to your music player (well, it's actually the browser's default mp3 player, but still
)
It actually does use get, BUT its in an iframe so you can't see it. That ay you don't have to switch pages. I did that, because I'm making a thing that combines this, my scratch viewer, and my youtube viewer, and a few other things.
If you want non-iframe, just go to http://escratch.org/MusicPlayer/form.html
EDIT: My combination thing
Here
It was going to have a scratch viewer, but it wasn't working for some reason.
Last edited by gbear605 (2011-11-10 14:22:32)
Offline