Embedding html5 within php
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Embedding html5 within php

  1. #1
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,927

    Embedding html5 within php

    I've got an html5 file that I exported using Google Swiffy and it works fine (simple animation).

    I'm using a basic php include to try to embed that animation in a specific place on a php page, but it appears at the bottom of the page, below all the other content and nothing that I do seems to move it...

    Here's the code:

    Code:
    <div id="id8_outside" style="   margin:0px; padding:0px; position:absolute; left:46px; top:121px; width:770px; z-index: 1;visibility: show;"><div id="id8_inside">
    HERE
      <?php include("flashfinals/converted/dogCat.html"); ?>
    
    </div></div>
    Now, the strange thing is that the "HERE" text appears in the correct place, but the animation is at the bottom of the page...grrr...

    Any ideas??

    Thanks!!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  2. #2
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,927
    Got it!!! If anyone else encounters this, the solution is here:

    http://stackoverflow.com/questions/6...itrary-element

    Basically, had to change this line in the html5 file:

    <script>var stage = new swiffy.Stage(document.body, swiffyobject);</script>
    to this, with the div identified:

    <script>var stage = new swiffy.Stage(document.getElementById("id8_inside") , swiffyobject);</script>
    Thanks!!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com