TinyPortal

Development => Block Codes => Topic started by: Nolt on June 07, 2008, 03:18:11 PM

Title: [Block]Flash movie player
Post by: Nolt on June 07, 2008, 03:18:11 PM
This block enables playing an .swf files in blocks (player supports also MP3, FLV, SWF, JPG, GIF, PNG, H264 file or a playlist). Tool wich is required to playing an .swf files is JW FLV MEDIA PLAYER (http://www.jeroenwijering.com/?item=JW_FLV_Media_Player) and our's .swf files ;)

Downlod player and extract to root dir of your forum (ex. ~/forum/mediaplayer/), .swf files that we want play in our block put also in root dir of your forum (ex. ~/forum/movies/). Create a scriptbox (for wide movies the best center block) and input this code (the values used in this code change to yours of course):
<script type="text/javascript" src="http://www.your_site.edu/forum/mediaplayer/swfobject.js"></script>
<div id="player">This text will be replaced</div>
<script type="text/javascript">
var so = new SWFObject('http://www.your_site.edu/mediaplayer/player.swf','mpl','400','250','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','250');
so.addVariable('width','400');
so.addVariable('file','/movies/film.swf');
so.write('player');
</script>


The mediaplayer have an little documentation in the package, for more see README.html.
In attach is an example of this player.

Have fun!
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 05:46:19 PM
is there a way for it to play a list of flv files ? also and how do u configure it.
Title: Re: [Block]Flash movie player
Post by: IchBin on June 07, 2008, 06:04:41 PM
Did you look at the readme file in the package as he told you to?
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 06:07:06 PM
just did apologys its exsplained there thankyou
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 06:42:46 PM
i do have a relevant question is there a way to make this pop up in a seperate window ty. from a script block with a image.
Title: Re: [Block]Flash movie player
Post by: IchBin on June 07, 2008, 08:11:21 PM
platinumUWE, don't be afraid to take a read at the site that its from. All the information in the readme leads you to the answers and the place you can find the answers.
http://www.jeroenwijering.com/?item=Supported_Flashvars
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 09:38:20 PM
ichbin i must be really dumb or stupid or both combined i dont see any were to make this into a pop up sorry
Title: Re: [Block]Flash movie player
Post by: IchBin on June 07, 2008, 09:40:13 PM
THere are parameters that you can add to the javascript. On the page I posted you have link, and linktarget (find these towards the bottom of the page), which give you the option to make it a popup.
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 09:54:11 PM
thaxs for your help but this is beyond me thanxs anyway ichbin for your help , have no idea what that is.

regards
plat
Title: Re: [Block]Flash movie player
Post by: Smoky on June 07, 2008, 10:03:38 PM
Platinum, does your radio pop up?? look at that code and what ICH is saying and maybe it will come together for you, just a thought, right ICH??  ;)
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 10:06:51 PM
not the radio is in a flash html button set with a pop up all the code says is inlude  html
Title: Re: [Block]Flash movie player
Post by: IchBin on June 07, 2008, 11:12:57 PM
Quote from: platinumUWE on June 07, 2008, 09:54:11 PM
thaxs for your help but this is beyond me thanxs anyway ichbin for your help , have no idea what that is.

regards
plat
Who says I'm done helping? Look at the code in the original post. The page I linked you to was for what? Flashvars.... what are flashvars? They tell you in the first line of the summary on the top of that page. They are variables that you can add to the code to make it do other things. If you look at the original code in this post you'll see there are some already, such as:

so.addVariable('height','250');

So, if you look on that page you'll see a variable called linktarget. Now, looking at the variable line that I just gave you, how do you implement the linktarget variable? You do it in the same exact manner.  so.AddVariable('variable_name', 'variable_attribute');

So, based on this wonderful information I gave you, how do you make it a popup? You can do it! :)
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 11:29:59 PM
okay i have this is this right ?

<script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script> <div id="player">This text will be replaced</div> <script type="text/javascript">var so = new SWFObject('http://www.underworldelite.com/Elite/mediaplayer/mediaplayer.swf','mpl','400','250','8');so.addParam('allowscriptaccess','always');so.addParam('allowfullscreen','true');so.addVariable('height','250');so.addVariable('width','400');so.addVariable('file','http://www.underworldelite.com/Elite/playlist.xml');so.addVariable('linktarget','http://www.underworldelite.com/Elite/mediaplayer/mediaplayer.swf');so.write('player');</script>
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 07, 2008, 11:44:50 PM
lol aint gonna happen have no idea what im doing thankyou anyway. thankyou ichbin for all your help verygood of you.
Title: Re: [Block]Flash movie player
Post by: IchBin on June 08, 2008, 05:56:24 AM
Ok, I GIVE! lol

so.addVariable('linktarget', '_blank');
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 08, 2008, 01:57:13 PM
acctually ichbin i did it late last night after many hrs of messing i finally got it to work any one want to see u can see it on right blocks called flash media  :laugh: :laugh: :laugh:

http://www.underworldelite.com/Elite


ps: a big ty ichbin for all your help
Title: Re: [Block]Flash movie player
Post by: Smoky on June 08, 2008, 04:31:39 PM
congrats Platinum, you are looking better and better.. keep up the good work!!  :D
Title: Re: [Block]Flash movie player
Post by: platinumUWE on June 08, 2008, 04:34:13 PM
ty smoky and i want to say ty to u also for your help also ty dear if im allowed (hug) thankyou