|
 |
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

April 25th, 2004, 10:53 AM
|
Authorized User
|
|
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

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
|
|
can you send me a sample link of this? I am not sure I have seen it.
|

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
|
|
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
<><
|

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
|
|
harpua,
Try weather.com, they sometimes do this, and ign.com sometimes does this.
They don't always do them, however.
HTH,
Snib
<><
|

April 26th, 2004, 01:43 PM
|
Authorized User
|
|
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

April 26th, 2004, 01:48 PM
|
Authorized User
|
|
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

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
|
|
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
<><
|

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
|
|
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
<><
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |