Flash issues

Options

I'm attempting to add a Flash game into Pagebuilder, but it won't render within the page. I can get it to open and render correctly in a new window, but I want it embedded in the page itself.

We have a previous Flash game embedded as such, but this new one won't take.

All I get is the opening screen/image, and then I have to right click and "Play" to get anything going. Of course, then, it does not draw in the text file that renders the copy for the game.

Any thoughts would be greatly appreciated.

Tagged:

Comments

  • We started including the javascript library swfobject.js as a standard component in every site. I think that it is far and away the easiest way to embed Flash. One nice thing about this technique is that if you embed the video on a secure page (like a donation form), you will not get a mixed content warning for having insecure content on a secure page.

    Here are the steps you need to follow:

    1. Include the SWF Object Javascript Library:

    2. Create a DOM element to hold the SWF:

    3. Include this JavaScript to populate the DOM element with the SWF (or YouTube video or whatever). The other parameters are width, height and the required level of the Flash Player.

  • jdp,

    In the past I have had to define an explicit path to external files referenced within a flash movie in order for them to render properly on a pagebuilder page. I believe this is due to a combination of the base href rewriting PageServer performs, as well as the method in which PageServer serves the individual pages.

    For example if you are referencing "filename.txt" and your directory structure is as such

    /flash/movie.swf

    /flash/filename.txt

    It will work when directly accessing the flash file at sitename.org/flash/movie.swf, but not when embedded in a PageBuilder page. In that instance, if you are viewing on say, sitename.org/site/PageServer?pagename=flashmovie, the movie is looking for the text file in /site/ (the same directory as the page, or in this case, the PageServer applet), rather than the same directory as the flash file.

    The simple solution is to re-render the flash file explicitly calling the path as "http://sitename.org/flash/filename.txt", and it should perform as expected, when combined with the swfobject implementation Dave mentioned.

  • cvestal :

    jdp,

    In the past I have had to define an explicit path to external files referenced within a flash movie in order for them to render properly on a pagebuilder page. I believe this is due to a combination of the base href rewriting PageServer performs, as well as the method in which PageServer serves the individual pages.

    For example if you are referencing "filename.txt" and your directory structure is as such

    /flash/movie.swf

    /flash/filename.txt

    It will work when directly accessing the flash file at sitename.org/flash/movie.swf, but not when embedded in a PageBuilder page. In that instance, if you are viewing on say, sitename.org/site/PageServer?pagename=flashmovie, the movie is looking for the text file in /site/ (the same directory as the page, or in this case, the PageServer applet), rather than the same directory as the flash file.

    The simple solution is to re-render the flash file explicitly calling the path as "http://sitename.org/flash/filename.txt", and it should perform as expected, when combined with the swfobject implementation Dave mentioned.

    SWFObject is an excellent library, it's cool Convio has put it in -- means I can take it off my FTP site and let Convio keep it up to date for me

  • Michael :

    SWFObject is an excellent library, it's cool Convio has put it in -- means I can take it off my FTP site and let Convio keep it up to date for me

    Glad you mentioned that they added it, it explains why I noticed a call to it multiple times in my headers.

  • DavidHart :

    We started including the javascript library swfobject.js as a standard component in every site. I think that it is far and away the easiest way to embed Flash. One nice thing about this technique is that if you embed the video on a secure page (like a donation form), you will not get a mixed content warning for having insecure content on a secure page.

    Here are the steps you need to follow:

    1. Include the SWF Object Javascript Library:

    2. Create a DOM element to hold the SWF:

    3. Include this JavaScript to populate the DOM element with the SWF (or YouTube video or whatever). The other parameters are width, height and the required level of the Flash Player.

    Is it possible to embed a SWF in a Event Page? Each time I try adding the script mentioned above it just shows up as plain text and the SWF doesn't embed. When I try embedding the SWF through Document Library it just adds a link. Thanks!

  • Marshall Wright:

    Is it possible to embed a SWF in a Event Page? Each time I try adding the script mentioned above it just shows up as plain text and the SWF doesn't embed. When I try embedding the SWF through Document Library it just adds a link. Thanks!

    Marshall,

    It looks like the code Dave included above was escaped, e.g. "<" was changed to "&lt;". Try something like this:



    <script type="text/javascript" src="../js/swfobject.js"></script>

    <script type="text/javascript">
    swfobject.embedSWF("http://www.youtube.com/v/WiWHoLPjzZo&rel=0&autoplay=1", "myContent", "300", "250", "9.0.0");
    </script>



    If you have more questions, I'd check the reference at http://code.google.com/p/swfobject/

  • Noah Cooper:

    Marshall,

    It looks like the code Dave included above was escaped, e.g. "<" was changed to "&lt;". Try something like this:



    <script type="text/javascript" src="../js/swfobject.js"></script>

    <script type="text/javascript">
    swfobject.embedSWF("http://www.youtube.com/v/WiWHoLPjzZo&rel=0&autoplay=1", "myContent", "300", "250", "9.0.0");
    </script>



    If you have more questions, I'd check the reference at http://code.google.com/p/swfobject/

    Noah,

    Thanks for the clarification but I was never able to get this to work.

    Could it be a source issue to the SWF? I'm hosting it locally and it's not a YouTube video. Is there not a way to embed a SWF component through Convio?

    Thanks!

  • Marshall Wright:

    Noah,

    Thanks for the clarification but I was never able to get this to work.

    Could it be a source issue to the SWF? I'm hosting it locally and it's not a YouTube video. Is there not a way to embed a SWF component through Convio?

    Thanks!

    Hi Marshall,

    Could you include a link to the page where you've tried embedding the SWF without success?

  • Noah Cooper:

    Hi Marshall,

    Could you include a link to the page where you've tried embedding the SWF without success?

    Hey Noah -

    I guess all it took was me trying again. It's working now! A Christmas miracle. Thanks for all your help.

    Marshall

    http://www.austintheatre.org/site/Calendar/1915210642?view=Detail&id=21801

Categories