A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Delay before going to url

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    1

    Delay before going to url

    Can anybody tell me how to get a longer delay before heading to my webpage? I have a swf. file completed and want to automaticly go to a different page when the movie is over but it goes before completion.

    Thanks
    JC

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    What is the website you have with the problem?
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  3. #3
    Can't Re- Member gusmus's Avatar
    Join Date
    Sep 2002
    Location
    España
    Posts
    663
    I have a swf. file completed and want to automaticly go to a different page when the movie is over but it goes before completion.
    It would be helful to see what the animation is. But the simple method is to pad out the last frame of your movie with extra frames or tweens until you get the movie length/time lapse you require. Another method would be to make a copy of your last frame and insert this into the second to last frame.

    [Frame "setTimer"]
    delay = getTimer() + 5 * 1000;

    I'm not sure if this will work in your case. Perhaps WBrants has the answer to the scripting method but try padding out the movie for now and see if that works for you.

    You can also try putting this into your HTML holder page

    <META HTTP-EQUIV="refresh"
    CONTENT="5;URL=http://www.mypage.com/index1.html">


    "content" is the delay in seconds. 5 = 5 seconds before jumping to the specified URL.


    A JAVASCRIPT method is:

    <script language="javascript" type="text/javascript">
    <!--
    window.setTimeout('window.location="http://www.mysite.com/index1.html"; ',5000);
    // -->
    </script>


    In this case 5000 = 5 seconds

    It is preferable to use the HTML method as not all browsers are javascript enabled but both work in exactly the same manner.

    Both examples should be placed inside the
    <head>

    <head>
    tags

    PS. Remember to put a "Skip Intro" button on your first page for returning visitors. Nothing worse than having to sit through the same intro a dozen times.
    Last edited by gusmus; 12-07-2005 at 05:49 AM.
    humanus somes est divinitus in ipsum
    Wiliiam Wallace

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