MyBB Community Forums

Full Version: SWF Embed in post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm well aware of the Multi Video Mycode plugin, but I'm wondering how to embed an swf movie file into a post from a local server. Mycode does not support that or Flash video from any particular server. I got Tstar flv BBCode plugin for flv's, but now need the swf fix too.....

Some people are going to ask "why swf files". It's cause I use Jing to make tutorial videos, which are auto saved as swf.
If you're interested in doing it in a MyCode tag, I'll tell you how to do it.
That would work. Do tell....
Well, first off - you obviously need to do this in the Administration Control Panel.
  1. Go to ACP > Configuration > My Code > "Add New MyCode"(top right)
  2. Set the title and description to whatever you feel
  3. In the "Regular expression:" field, enter this:
    \[swf\](.*?)\[/swf\]
  4. In the "Replacement:" field, enter this:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
    WIDTH="320" HEIGHT="240" id="MyMovieName">
    <PARAM NAME=movie VALUE="$1.swf">
    <PARAM NAME=quality VALUE=high>
    <EMBED src="$1.swf" quality=high WIDTH="320" HEIGHT="240"
    NAME="MyMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
    </EMBED>
    </OBJECT>
  5. Make sure that it's enabled.
Test it in the "Sandbox" - below all of the fields, and tell me what you get. Also, make sure to note that you don't need to add the .swf extension to the end, as it's added by default - this makes it so users can't try and show movies besides ones that are in .swf format. If need be, I will assist you further.

NOTE: if you need to change the width and heigth, just change
width="320"
to the desired with and
height="240"
to the desired height.

Sincerely,
TomL
Hi Tom-

Thanks for the lesson. I have everything entered that you specified, but I'm not sure if it's working correctly. From your description, I'm supposed to put the following in Sandbox as an example?

[swf\]http://path/to/file[\swf]
?

or is it supposed to be:
http://path/to/file
?

And leave off the ".swf", right? If so, I'm just getting a link back on both of those. Or am I supposed to replace your embed code with my actual link?
It should be the first one, with the [swf] tags...

You need to miss off the .swf at the end, so if I had a flash movie called mydomain.com/swf/funnycats.swf, I'd just enter mydomain.com/swf/funnycats...
I think it should be

[swf]http://example.com/yourswf[/swf]
(2008-12-16, 08:46 AM)DennisTT Wrote: [ -> ]I think it should be

[swf]http://example.com/yourswf[/swf]

Dennis' format is correct.

Works great though! Only problem is that this particular video is 1080x800 or so. Now, all of the videos inserted into posts will have those dimensions. Not such a big deal, but it's worth talking about.

Thanks for the help guys!
Please note that normal users can also use this MyCode....

(Because from the first post I think you want only admin to be able to post this)