Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Flash (all versions)
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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.

Reply With Quote
  #2 (permalink)  
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.
Reply With Quote
  #3 (permalink)  
Old April 26th, 2004, 11:05 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 1 Time in 1 Post
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

<><
Reply With Quote
  #4 (permalink)  
Old April 26th, 2004, 11:06 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 1 Time in 1 Post
Default

harpua,

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

They don't always do them, however.

HTH,

Snib

<><
Reply With Quote
  #5 (permalink)  
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

Reply With Quote
  #6 (permalink)  
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.

Reply With Quote
  #7 (permalink)  
Old April 26th, 2004, 04:04 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 1 Time in 1 Post
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

<><
Reply With Quote
  #8 (permalink)  
Old April 26th, 2004, 04:28 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 1 Time in 1 Post
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

<><
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 09:29 AM
Iam not getting Apache home page in browser bvapsridhar Apache Tomcat 0 February 3rd, 2007 06: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 08:40 PM



All times are GMT -4. The time now is 07:46 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.