SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict ozmart2004's Avatar
    Join Date
    Feb 2004
    Location
    Albury, NSW, Australia
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pre-load/hide and show an animation

    I have an animation of about 111KB that I want to preload in the background because I want to hide it at first and display it when a user does something in particular (just for fun).

    Whats the best approach?

    Should I load it into a div and use CSS to at first make it invisible or shove off the viewport, or should I use Dreamweaver's Show/Hide layers behaviour? Or is there a better way to do it?

    Appreciate any suggestions.

    Thks

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dreamweaver's Show/Hide layers behaviour uses badly written, If I remember correctly, JavaScript to manipulate CSS properties.

    Lose DreamWeaver.

    What kind of animation is it? .swf? .gif?
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Addict ozmart2004's Avatar
    Join Date
    Feb 2004
    Location
    Albury, NSW, Australia
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its just an animated gif at the moment.

    I've been using DW for a while. What's the alternative for design layouts etc? What do you use?

  4. #4
    ~unplugged Ainslie X11's Avatar
    Join Date
    Feb 2005
    Location
    Langley, Virginia
    Posts
    1,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps don't lose Dreamweaver, it's a good editor - just don't let it do anything for you.

    You can have the gif in a hidden div, then make it visible using a simple dom script,
    Hide it
    document.getElementById("youDiv").style.display="none";
    Show it
    document.getElementById("youDiv").style.display="block";

    or, whatever display mode you decide to use


    working hard is hard work

  5. #5
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    True, I've heard that DreamWeaver has a pretty good syntax highlighter.

    Currently I use synText Editor.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  6. #6
    SitePoint Addict ozmart2004's Avatar
    Join Date
    Feb 2004
    Location
    Albury, NSW, Australia
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thks. As more of a designer than a programmer I have found DW to be a great tool, esp with its integration with Fireworks and Flash. I do some php stuff in Zend but the code view in DW is pretty good as it is.

    Cheers


Bookmarks

Posting Permissions

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