WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to insert HTML5 animation into page (8 posts)

  1. frogseatflies
    Member
    Posted 1 year ago #

    Go to this webpage showing a once-Flash-now-HTML5 animation. View the source code of the page. I'm trying to get that code into a page on a wordpress site (with the Twenty 11 theme or any theme really).

    I can't seem to get the code to show anything. How should I put the code on a wordpress page?

  2. David Choi
    Member
    Posted 1 year ago #

    Looks like it requires to load

    https://www.gstatic.com/swiffy/v4.7/runtime.js

    to run the sample. You can click on this URL, right click, then download it to your PC, then upload to your site somewhere, where WordPress can see. You need to edit functions.php file to add javascript files, but if you are not a coder, then this plugin can help you easily

    http://wordpress.org/extend/plugins/specific-cssjs-for-posts-and-pages/

  3. frogseatflies
    Member
    Posted 1 year ago #

    Thank you. I really dig the idea of the Specifc CSSJS plugin. I installed and here's what I've done. I need a little more help.

    Here's what I put in the page:

    <script>
    var stage = new swiffy.Stage(document.getElementById('swiffycontainer'), swiffyobject);
    stage.start();
    </script>

    Here's what I put in the "Write here custom CSS or Javascript..." text field:
    All the code that was between the "head" tag. I excluded the html and body tags, etc.

    In the "URL of the custom Javascript file", I put the new url for the javascript file.

    I also updated the path of the javacsript file to be where I put it on my site.

    Still no show. What do you think?

  4. frogseatflies
    Member
    Posted 1 year ago #

    Actually... I just solved it!

    I checked out the published WordPress page's code to see how all that code was inserted in there. Cool.

    I noticed that it had this <script src=".... ></script> in there twice. So I just deleted the path out of the Specific CSSJS's "URL of the custom Javascript file" text field. I'm good now.

    Thanks a lot for the instruction.

  5. David Choi
    Member
    Posted 1 year ago #

    Wow, glad you've solved the issue. Usually this kind of problem is kinda hard to fix, I see you have potential to be a WP master :)

    Have a nice day!

  6. jamieclock
    Member
    Posted 1 year ago #

    Hi, I'm looking to do exactly the same thing here. I have an animation I created in Flash, converted it to HTML5 though Google Swiffy... The only thing is I'm completely lost when I read your discussion as I'm a newbie at WP. Is there anyone that would be willing to help me out?

    Much appreciated

  7. esmi
    Forum Moderator
    Posted 1 year ago #

    @jamieclock: As per the Forum Welcome, please post your own topic.

  8. jamieclock
    Member
    Posted 1 year ago #

    Oh sorry, I'm new here and been searching the web for days looking for this solution. I just thought as someone else has cracked it, it would be a good place for me to start rather than from the very beginning.

Topic Closed

This topic has been closed to new replies.

About this Topic