Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 2 of 2
  1. #1

    Default flash object to play and then dissapear to reveal html page

    I want to be able to display a flash object which plays for approximately 10 secs and then dissapear to reveal a html page. Is it possible to code this into a html page or do both pages need to be a flash object with one transitioning into another? Any advice would be appreciated. Thanks

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    The easy answer is flash to flash transition. You could simply put a timer on a movieclip, when the time runs out, load another clip or toggle the visible property of a movieclip on stage....

    Code:
    _root.mcName.onLoad=function() {
    	time = getTimer();
    }
    _root.mcName.onEnterFrame=function() {
    	time2 = getTimer();
    //flash time is in milliseconds, 10000 = 10 seconds
    	if (Number(time2-time)>10000) {
    		_root.mcName._visible = false;
    	}
    	trace(time2-time);
    }
    You could also use a javascript command to load a .swf, then after a period of time, load another .swf..... or .html page. Here is a quick Javascript for loading based on time, just used hours, but you could more precisely define it to seconds if you want....
    Code:
    <SCRIPT LANGUAGE = "JavaScript">
    
    <!--
    now = new Date&#40;&#41;; 
    hour = now.getHours&#40;&#41;;        
    if &#40;hour > 7 && hour < 17.5&#41; &#123; 
    window.location = &#40;'somePage.swf'&#41;;
    &#125;
    else &#123; 
    window.location = &#40;'someOtherPage.html'&#41;;
    &#125;
    // -->
    
    </SCRIPT>

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. SWF and HTML files won't play unless flash is installed
    By layerburn in forum General Flash
    Replies: 1
    Last Post: 07-16-2009, 08:28 PM
  2. embed Flash in HTML page
    By rajatbhatia in forum Newbies
    Replies: 1
    Last Post: 07-27-2005, 08:24 PM
  3. how do i link a html page in flash?
    By rizlapaper2001 in forum General Flash
    Replies: 2
    Last Post: 01-01-2005, 11:58 PM
  4. Flash focus in HTML page
    By NTD in forum Flash Scripting
    Replies: 0
    Last Post: 08-25-2004, 06:54 AM
  5. Cannot access Flash HTML page remotely
    By japshere in forum General Flash
    Replies: 1
    Last Post: 06-10-2004, 02:35 AM

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
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial