Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do they send those flash movies across my screen? 1

Status
Not open for further replies.

mrbongos

Programmer
Jun 14, 2001
8
US
How do those sites like, IWON, send those flash movies across the page and then they disappear? Almost like a pop up with out the window. Any ideas.
 
More complete link to this site?

mywink.gif
ldnewbie
 
Still didn't see any flying swfs!
From your description, looks like a flying frameless(IE only) popup (controlled through javascript) with a swf inside it!

Best I can do until I see one of them!

mywink.gif
ldnewbie
 
i waited for about 5 minutes and seen nothing!!
e.gif


carlsatterwhite@endangeredgraphics.com
 
Thanks oldnewbie, I have hit & miss with seeing them as well, something random I suppose. Great eye catcher and marketing tool. Do like your tip of a frameless popup, even though its IE only, I'll just use a sniffer.
 
In this new site... If you're talking about the tv set and the zapper, seems to me, it could be done using a combination of the transparent mode (works in IE only! - doesn't seem to have it when screened through NS) and moving a cropped (clipped or wiped in the end) division holding the swf.
mywink.gif
ldnewbie
 
it looks like it may be this part of the script..

<DIV id=overDiv style=&quot;POSITION: absolute; VISIBILITY: hidden; Z-INDEX: 1000&quot;></DIV>
<SCRIPT language=JavaScript ID='PlayerScript'>
PlayerScript.src = &quot; </SCRIPT>

in which calls this from there cgi...



// Flushing: /sites/eyegrab.com/htdocs/flash.animations/7.swf
var layerFrame = self;
var layerInitialized = 0;
var layerObject = null;
var animation = null;
// Decide browser version
var ns4 = ((document.layers)) ? true : false;
var ns6 = ((document.getElementById)) ? true : false;
var ie4 = ((document.all)) ? true : false;
var ie5 = false;

// Microsoft Stupidity Check(tm).
if (ie4){
if (navigator.userAgent.indexOf('MSIE 5')>0){
ie5 = true;
}
if (ns6){
ns6 = false;
}
}

function showFlashAnimation(animationHttpPath,
mouseX,
mouseY,
animationWidth,
animationHeight,
transparent){
htmlText = &quot;<embed &quot;;
htmlText += &quot; name='flash_animation'&quot;;
htmlText += &quot; src='0.swf'&quot;;
htmlText += &quot; quality='high' &quot;
htmlText += &quot; pluginspage=' &quot;;
htmlText += &quot; type='application/x-shockwave-flash' &quot;
htmlText += &quot; width='&quot; + animationWidth + &quot;'&quot;;
htmlText += &quot; height='&quot; + animationHeight + &quot;'&quot;;
if (transparent == true){
htmlText += &quot; wmode='transparent' &quot;;
}
else{
htmlText += &quot; wmode='opaque' &quot;;
}
htmlText += &quot; menu='false' &quot;;
htmlText += &quot; bgcolor='undefined'>&quot;;
htmlText += &quot;</embed>&quot;;
return showLayer(htmlText,mouseX,mouseY);
}

function showLayer(htmlText,mouseX,mouseY){
// Special for frame support
if ( (ns4) || (ie4) || (ns6) ){
if (ns4) layerObject = layerFrame.document.overDiv
if (ie4) layerObject = layerFrame.overDiv.style
if (ns6) layerObject = layerFrame.document.getElementById(&quot;overDiv&quot;);
}
layerWrite(htmlText);
flash_animation.src = animation.src;
if (layerInitialized != 0){
hideLayer();
}
layerInitialized = 0;
// Show layer
if ( (ns4) || (ie4) || (ns6) ){
if (layerInitialized == 0){
if ( (ns4) || (ie4) ){
layerObject.left = mouseX;
layerObject.top = mouseY;
layerObject.width = '100%';
layerObject.height = '100%';
}
else if (ns6){
layerObject.style.left = mouseX + &quot;px&quot;;
layerObject.style.top = mouseY + &quot;px&quot;;
layerObject.style.width = '100%';
layerObject.style.height = '100%';
}
// Show object
if (ns4){
layerObject.visibility = &quot;show&quot;;
}
else if (ie4){
layerObject.visibility = &quot;visible&quot;;
}
else if (ns6){
layerObject.style.visibility = &quot;visible&quot;;
}

layerInitialized = 1;
}
}
}


function layerWrite(txt){
txt += &quot;\n&quot;;
if (ns4){
var lyr = layerFrame.document.overDiv.document
lyr.write(txt)
lyr.close()
}
else if (ie4){
layerFrame.document.all[&quot;overDiv&quot;].innerHTML = txt
}
else if (ns6){
range = layerFrame.document.createRange();
range.setStartBefore(over);
domfrag = range.createContextualFragment(txt);
while (layerObjecthasChildNodes()) {
layerObjectremoveChild(layerObjectlastChild);
}
layerObjectappendChild(domfrag);
}
}


function hideLayer(){
if ( (ns4) || (ie4) || (ns6) ){
layerInitialized = 0;
if (layerObject!= null){
// Hide object
if (ns4){
layerObject.visibility = &quot;hide&quot;;
}
else if (ie4){
layerObject.visibility = &quot;hidden&quot;;
}
else if (ns6){
layerObject.style.visibility = &quot;hidden&quot;;
}
self.status = &quot;&quot;;
// Hide object end
}
}
}


var waitForStart = false;
function startFlashAnimation(){
if (document.readyState == 'complete'){
if (waitForStart == false){
waitForStart = true;
window.setTimeout(&quot;startFlashAnimation()&quot;,2000);
}
else{
animation = new Image();
animation.src = &quot; showFlashAnimation(' '0',
'0',
'800',
'500',
true);
if (0 > 0){
window.setTimeout(&quot;hideLayer()&quot;,0);
}
}
}
else{
if (ns4 || ns6){
document.readyState = 'complete';
setTimeout(&quot;startFlashAnimation()&quot;,1500);
}
else{
setTimeout(&quot;startFlashAnimation()&quot;,100);
}
}
}
startFlashAnimation();

e.gif


carlsatterwhite@endangeredgraphics.com
 
lol..yeh i guess so...but hey you nailed it with your guess though..

i guess wisdom does come with age!! nice evaluation there old man..
e.gif


carlsatterwhite@endangeredgraphics.com
 
I'm sure we had a thread on transparency before...like the menu of the flash stuff overlapping in some game site...is it possible to do this with relatively little code?...say, set a absolute position and do the transparency?
Regards,
AnthLOLny
----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute little kitten? :-X
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top