Embed flash game (.swf) in post

  • Hey there everyone, I’ve been looking all around but I can’t seem to figure out if this is possible.

    Can you embed a .swf flash game object so that it plays inside your post, without reader having to click a link to see it on another page?

    I run a Flash game tutorial website ( http://www.as3gametuts.wordpress.com ), and one feature I am sorely lacking that many other sites have is a demo of the tutorial game visible for all to see on the main blog post.

    I can’t figure out how to upload swf files directly to a WordPress.com site, so I uploaded one to my personal site at the following URL:
    http://www.benreynoldsmedia.com/files/Pong/AS3GameTuts_Pong_4.swf

    I tried using the following code to embed the swf into my post, but it didn’t work, although this very same code does work on a separate webpage (see link below):

    <object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab” width=”550″ height=”400″ id=”testpong”>
    <param name=”movie” value=”http://www.benreynoldsmedia.com/files/Pong/AS3GameTuts_Pong_4.swf” /><embed src=”http://www.benreynoldsmedia.com/files/Pong/AS3GameTuts_Pong_4.swf” width=”550″ height=”400″ name=”testpong” type=”application/x-shockwave-flash” pluginspage=”http://www.adobe.com/go/getflashplayer” /></object>

    This embed code works perfectly here:
    http://www.benreynoldsmedia.com/files/testswfobject.html

    So why does this not work? Why won’t WordPress let users embed objects into their posts? Is there a way around this or do I have no choice but to direct my readers to this external page to view the swf?

    Thank you very much!

    The blog I need help with is: (visible only to logged in users)

  • A simple forum search turned up the answer for you. This is a no can do on a free hosted WordPress.com blog. https://en.forums.wordpress.com/topic/embed-to-gigya-shortcode-help-please?replies=5#post-693731

  • Why won’t WordPress let users embed objects into their posts?

    Would you like to address your question to Staff? Or will it suffice for me to state that they are not allowed for security and stability reasons. WordPress.com is a multiuser blogging platform. Our blogs are not free standing. Bad code in one blog could bring down many blogs.

  • Wait a minute> I don’t see Javascript in that code so maybe a gigya shortcode can be used. See here > http://wpbtips.wordpress.com/2010/07/22/gigya-shortcode-3-widgets/

  • Flash and javascript can present security risks so you cannot directly embed those types of tiles. As Timethief says, the gigya shortcode will work for some flash here, but do know that that means there is a second layer of things added which could well make the game work less than optimally. Also, the gigya shortcode is not officially supported and so there is no guarantee that it will always be around.

  • Anyway, to embed it just copy this part of the code:
    <embed src="ETC ETC ETC" /></object>
    and turn it to this:
    [gigya src="ETC ETC ETC" ]
    Paste into HTML editor. Dimensions can be changed.

  • Thanks everyone for the support!

    Sorry if I sounded harsh, I didn’t really think about how:

    WordPress.com is a multiuser blogging platform. Our blogs are not free standing. Bad code in one blog could bring down many blogs.

    I’ll try the gigya code now, and if I can’t make it work I’ll just bite the bullet and link to an external page.

    Thanks again,
    Ben

  • Hi Ben,
    Not to worry about how you sounded. To me you just sounded frustrated and that wasn’t surprising as many bloggers don’t know our blogs are not free standing. I do hope that the gigya shortcode will provide what you need. Best wishes with your blog. :)

  • It worked!

    Just in case anyone else ever runs into this problem, this is the code I used:

    [gigya src="http://www.benreynoldsmedia.com/files/Pong/AS3GameTuts_Pong_3.swf" quality="high" width="550" height="400" ]

    And this is how it looks:
    http://as3gametuts.wordpress.com/2011/08/31/pong-3/

  • @benoldz
    Great news! Thanks for much for sharing it. :)

  • The topic ‘Embed flash game (.swf) in post’ is closed to new replies.