Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple animation using 2 frames

    I am using frames to do a simple animation. I have two frames. The first frame is where the animation happens. The second frame has 4 images. The first frame will display each of the images for 5 seconds(parent.frames[1].document.images[0].src). I did not want to hard code the file names, but I was going to do a loop. This way I can use the code for a few projects I am planning. Here is how I am setting it up.

    Frameset.html file contents
    <html>
    <title></title>
    <frameset rows="200,*">
    <frame src="image.html" name="top" />
    <frame src="image-list.html" name="center" />
    </frameset>
    </html>

    Image-list.html file contents
    <html>
    <head>
    </head>
    <body>
    <img src="hat1.jpg"/><br/>
    <img src="hat2.jpg"/><br/>
    <img src="hat3.jpg"/><br/>
    <img src="hat4.jpg"/><br/>
    </body>
    </html>

    Image.html file contents
    <html>
    <head>
    <title></title>
    </head>
    <body>
    top=parent.frames[1].document.images[0].src
    </body>
    </html>

    I am lost on this last file. I cannot get one picture to appear. I have tried it a ton of different ways. Please help me.

  • #2
    Regular Coder
    Join Date
    Mar 2009
    Location
    Portland Oregon
    Posts
    690
    Thanks
    44
    Thanked 63 Times in 62 Posts
    Take a look at the source of this file to get some ideas.
    http://h1.ripway.com/tinyscript/canv...animation.html


  •  

    Posting Permissions

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