dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Flash menu plus javascript?

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Flash menu plus javascript?

    I am working on a website for a client, and the main navigation menu is on a wavy ribbon type object. They want the ribbon to grow out of the left side of the page. I'm planning on using a simple flash animation to do that, but I don't want to make the menu buttons in flash, since flash is temperamental. I'm new to javascript, so this might be a dumb question. Is there a way I can set it up so the menu links are html, but use javascript to make it so the links don't show up until the ribbon has animated across the page and is in place?

  2. #2
    Join Date
    Oct 2008
    Posts
    49
    Flash makes movies, right?
    Can't you insert it as a movie in your html?
    If you time your movie you can then use setTimeout to have the button appear/disappear after that amount of time.

    In javascript there are functions that are event triggered onload is one of them:

    <body onload="timer()">

    Give your button an id let's say id="button"

    <p id="button"><a href="">Link</a></p>

    When the page loads the timer() function will be called.

    <script language="Javascript">

    function button_timeout() {
    document.getElementById("button").style.visibility="visible"
    }

    function timer() {
    setTimeout('button_timeout', 2000);
    }

    </script>

    The setTimeout funcion will call the button_timeout function when 2 seconds have elapsed. Declare the button element as having visibility:hidden in CSS and after 2 seconds this will change to visible.

    I hope this helps, I didn't check what I wrote, let me know if there is a problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles