|
JW Player: Flash Video Player
has anyone got it working got the flash MP3 working but the video with the youtube embedded is much harder Help!
Const strTxtS2HMMFMflashplayer = "Movie Flash Player"
BBcodes
<tr class="tableSubLedger"> <td colspan="2"><% = strTxtS2HMMFMflashplayer %></td> </tr> <tr class="tableRow"> <td colspan="2">[FMPLAYER]http://www.myWeb.com/music.mp3[/FMPLAYER]</td> </tr>
forum_posts
If InStr(1, strMessage, "[FMPLAYER]", 1) > 0 AND InStr(1, strMessage, "[/FMPLAYER]", 1) > 0 Then strMessage = formatFMPLAYER(strMessage) If InStr(1, strAuthorSignature, "[FMPLAYER]", 1) > 0 AND InStr(1, strAuthorSignature, "[/FMPLAYER]", 1) > 0 Then strAuthorSignature = formatFMPLAYER(strAuthorSignature)
functions_format_post code
'****************************************** '*** Start flash Movie player Mod *** '****************************************** 'This function formats FMPLAYER Function formatFMPLAYER(ByVal strMessage) 'Declare variables Dim strFMPLAYERLink 'Hold the You FMPLAYER Link Dim lngStartPos 'Holds search start postions Dim lngEndPos 'Holds end start postions Dim strBuildFMPLAYER 'Holds the built coded message Dim strOriginalFMPLAYER 'Holds the code block in original format 'Loop through all the BB codes in the message and convert to a link to the FMPLAYER movie Do While InStr(1, strMessage, "[FMPLAYER]", 1) > 0 AND InStr(1, strMessage, "[/FMPLAYER]", 1) > 0 'Get the start and end of the movieplayer BBcode lngStartPos = InStr(1, strMessage, "[FMPLAYER]", 1) + 10 lngEndPos = InStr(lngStartPos, strMessage, "[/FMPLAYER]", 1) 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 10 'If there is a FMPLAYER link then process If lngEndPos > lngStartPos Then 'Get the FMPLAYER link strFMPLAYERLink = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Insert FMPLAYER movie strBuildFMPLAYER = "<script type='text/javascript' src='swfobject.js'></script> <div id='mediaspace'>This text will be replaced</div> <script type='text/javascript'>var so = new SWFObject('player.swf','mpl','570','420','9');so.addParam('allowfullscreen','true');so.addParam('allowscriptaccess','always');so.addParam('wmode','opaque');so.addVariable('file','& strFMPLAYERLink &');so.addVariable('backcolor','00000');so.addVariable('frontcolor','999999');so.addVariable('lightcolor','990000');so.write('mediaspace');</script>" End If 'Get the start and end position in the start and end position in the message of the BBcode FMPLAYER lngStartPos = InStr(1, strMessage, "[FMPLAYER]", 1) lngEndPos = InStr(lngStartPos, strMessage, "[/FMPLAYER]", 1) + 11 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 10 'Get the original code to be replaced in the message strOriginalFMPLAYER = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Replace the code codes in the message with the new formated code block If strBuildFMPLAYER <> "" Then strMessage = Replace(strMessage, strOriginalFMPLAYER, strBuildFMPLAYER, 1, -1, 1) Else strMessage = Replace(strMessage, strOriginalFMPLAYER, Replace(strOriginalFMPLAYER, "[", "[", 1, -1, 1), 1, -1, 1) End If Loop 'Return the function formatFMPLAYER = strMessage End Function
'****************************************** '*** End flash Movie player Mod *** '******************************************
|