Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 20th, 2003, 12:59 PM
Hapster Hapster is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Toronto
Posts: 12 Hapster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Maintain Flash transparency when using Dynamic Layers

I’m creating a dynamic layer:
PHP Code:
function dylayer()
{  
var 
150  
var 180 
var 176 
var 117  
var newDiv document.createElement("div");
newDiv.setAttribute("id","oDiv");
newDiv.style.textAlign="center";  
newDiv.style.position="absolute";  
newDiv.style.top="140px";  
newDiv.style.left="150px";  
newDiv.setAttribute("style""width:50%; text-align:center; position:absolute; top:150; left:180;");
document.body.appendChild(newDiv); 
newObj document.createElement("embed"); 
newObj.setAttribute("src","transflash.swf"); 
newObj.setAttribute("width",w); 
newObj.setAttribute("height",h); 
newDiv.appendChild(newObj);


and loading a Flash swf file that has transparency:
PHP Code:
<PARAM NAME=movie VALUE="transflash.swf"
<
PARAM NAME=quality VALUE=high
<
PARAM NAME=wmode VALUE=transparent
<
PARAM NAME=bgcolor VALUE=#CC6633> 
<EMBED src="transflash.swf" quality=high wmode=transparent bgcolor=#CC6633  
      
WIDTH="176" HEIGHT="117" NAME="transflash" ALIGN="" .........> 

The javascript as is doesn’t include the Flash <param>’s for transparency. I’ve being trying to insert it using:

PHP Code:
 transpParam document.createElement("param");
transpParam.setAttribute("wmode""transparent");
newObj.appendChild(transpParam); 

Could someone help with the insertion or offer an alternative suggestion as to how to include the transparency param for flash

Many Thanks…

Reply With Quote
  #2  
Old September 21st, 2003, 12:31 AM
Hapster Hapster is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Toronto
Posts: 12 Hapster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've played with the code and got it to work. I'll post it incase its a help to someone else:
PHP Code:
<script>
function 
foo()

var 
30 
var 20
var 500
var 375 
var newDiv document.createElement("div");
//
newDiv.setAttribute("id","oDiv");
newDiv.style.textAlign="center"
newDiv.style.position="absolute"
newDiv.style.top="20px"
newDiv.style.left="30px"
newDiv.setAttribute("style""width:50%; text-align:center; position:absolute; top:20px; left:30px;");
document.body.appendChild(newDiv);
//
newObj document.createElement("embed","wmode");
newObj.setAttribute("src","testTBG.swf");
newObj.setAttribute("width",w);
newObj.setAttribute("height",h);
newObj.setAttribute("wmode""transparent");
newDiv.appendChild(newObj);

</script> 

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Maintain Flash transparency when using Dynamic Layers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway