Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Flash (all versions)
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 25th, 2004, 10:53 AM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Overlaying image/flash, over the home page

I have seen several sites that when they appear in the internet explorer of the visitor for the first time, the home page displays an overlayed image or flash animation(semi-transparent or not) over the original home page, and this disappears after a few seconds.
Also, if the user during his visit to the site, returns for some reason to the home page, then this graphic/flash is not appeared again.

I use Dreamweaver, I am not a programmer, I have already constructed my web site and home page(a normal index.asp file) and I would like to know how can I do such a thing.

Thanks in advance.

 
Old April 26th, 2004, 10:12 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you send me a sample link of this? I am not sure I have seen it.
 
Old April 26th, 2004, 11:05 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

This is done using absolute DIVs, or content boxes. It uses extreme DHTML and JavaScript techniques, including timers and cookies. I would look into learning JavaScript before you take on this task.

HTH,

Snib

<><
 
Old April 26th, 2004, 11:06 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

harpua,

Try weather.com, they sometimes do this, and ign.com sometimes does this.

They don't always do them, however.

HTH,

Snib

<><
 
Old April 26th, 2004, 01:43 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the responses.

So, is it easy to do it? In flash, or they do it with javascript?
Or dhtml?
I use dreamweaver if this helps somehow.

Thanks in advance

 
Old April 26th, 2004, 01:48 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you think that it could be better if the topic is moved to another category. I thought it was mainly about flash but I am not sure now.

 
Old April 26th, 2004, 04:04 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

karib,

Primarily, this technique uses JavaScript. But it does involve Flash, too. If a moderator or administrator decides this topic should be relocated, they will move it to an appropriate location.

Anyway....

To do this, you must create an absolute DIV like this:

<div id=contentWindow style=position:absolute;visibility:hidden;></div>

Then write some JavaScript functions like this:
Code:
var popup = document.getElementById('contentWindow');
function createFlashPopup(topSpace,leftSpace,delayStart,delayStop,flashContent)
{
 popup.style.top = topSpace; //however far from the top you want it
 popup.style.left = leftSpace; //however far from the left you want it
 popup.innerHTML = flashContent;
 popup.innerHTML += '<br><a href=javascript:hideFlashPopup()>X Close</a>';
 setTimeout('showFlashPopup(topSpace,leftSpace)',delayStart);
 setTimeout('hideFlashPopup()',delayStop);
}

function showFlashPopup(topSpace,leftSpace)
{
 popup.style.visibility = 'visible';
 var keeponscreen = setInterval('moveFlashPopup(topSpace,leftSpace)',0001);
}

function hideFlashPopup()
{
 popup.style.visibility = 'hidden';
 clearInterval(keeponscreen);
}

function moveFlashPopup(topSpace,leftSpace)
{
 popup.style.top = topSpace;
 popup.style.left = leftSpace;
}

//example of how to call this sequence of functions

createFlashPopup(100,100,5000,5000,'this is too long to put for an example....');

/*
this example would create a Flash popup 100 pixels from the top and left,
and display it 5 seconds after load and make it disappear 5 seconds after that
*/
Let me know if you get errors, I never write scripts perfect the first time.... :D

HTH,

Snib

<><
 
Old April 26th, 2004, 04:28 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

It will take even more JavaScript to make it happen only when the user first enters your site, involving extensive use of cookies.

Let me know if you would like me to modify the above script so that you can see what I mean.

I don't know how to do any of this with the DW interface, or whether it is possible; I usually work in the Code View.

Perhaps now you know why you might want to learn JavaScript.... :)

HTH,

Snib

<><




Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Word Form Available for Use on Home Page aml Word VBA 0 March 6th, 2007 10:29 AM
Iam not getting Apache home page in browser bvapsridhar Apache Tomcat 0 February 3rd, 2007 07:23 AM
Reload Home Page qazi_nomi HTML Code Clinic 1 August 8th, 2004 12:22 PM
Renaming the home page derek Dreamweaver (all versions) 2 May 24th, 2004 12:33 PM
Update info on home page via FTP/other levinho Classic ASP Databases 1 November 11th, 2003 09:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.