Jump to content

Uber flash insertion

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Uber flash insertion Rate Topic: -----

#1 User is offline   moojoo 

  • Argh!
  • Group: Members
  • Posts: 449
  • Joined: 03-August 06
  • Location:Texas

Posted 15 December 2006 - 11:44 AM

Well maybe not but it works heh.

Due to IE sucking.. Here is what I did.

Make a .js file say foo.js

document.write("<div style=\"z-index:1; background:transparent; position:relative; top:-100px; left:0;\">");
document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"600\" height=\"600\" id=\"scroller\" align=\"left\"><param name=\"wmode\" value=\"transparent\">");
document.write("<param name=\"movie\" value=\"/includes/flash/foo.swf\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#000000\" />");
document.write("<embed src=\"/includes/flash/foo.swf\" quality=\"high\" bgcolor=\"#000000\" width=\"600\" height=\"600\" name=\"scroller\" wmode=\"transparent\" align=\"left\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>");
document.write("</div>");


and in your HTML place

<script type="text/javascript" src="/includes/js/foo.js"></script>

and you have a nice transparent background having flash object that works in FF, IE etc.. Style the outputted div to position as required etc etc.. In my case I needed it to line up correctly yet allow hovers that would appear over the text. I would put a screenie but I would get fired heh. But there you have it. One sexy line of include code in your html and a sep js file to control your flash object. Adjust the parameters as required. The pain in the butt is that you need both the <object> tag and <embed> to cater to all the browsers but at least this way keeps your HTML source lean and mean.
Its not girly, its web 2.0!
0

#2 User is offline   sypher 

  • the owner3r
  • Group: Administrators
  • Posts: 1,578
  • Joined: 04-April 06
  • Location:North Wales, UK
  • Interests:Art, Boxing, MMA, Graphic Design, Web Design etc. ;)

Posted 15 December 2006 - 12:14 PM

swfobject - http://blog.deconcept.com/swfobject/
Is quite popular.

But im weary of using javascript to call the flash file, so i use
<object type="application/x-shockwave-flash" data="path/to//flash.swf" width="288" height="128">
<param name="movie" value="path/to/flash.swf" />
<img src="noflash.gif" width="288" height="128" alt="you have no flash." />
</object>

sypher design - North Wales Web Design | Latest Work: - Scala Cinema

CSS - Can't See Sh*t
0

#3 User is offline   moojoo 

  • Argh!
  • Group: Members
  • Posts: 449
  • Joined: 03-August 06
  • Location:Texas

Posted 15 December 2006 - 12:20 PM

Well I was too but that is how "I had to do it" this time. It could easily be converted into regular HTML which is the beauty of it. and it knocked that background out flat. Worked like a champ. And it has error trapping i.e. downloading if needed, and you could fairly easily implement a graphic to display if flash is not available.

This post has been edited by moojoo: 15 December 2006 - 12:22 PM

Its not girly, its web 2.0!
0

#4 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 16 December 2006 - 02:58 AM

On one site I worked on I used a image with an id, then replaced this with the appropriate flash object on page load. In page code was just one js include.
0

#5 User is offline   benbacardi 

  • Administrator
  • Group: Administrators
  • Posts: 1,140
  • Joined: 06-April 06
  • Gender:Male
  • Location:United Kingdom

Posted 16 December 2006 - 05:23 AM

Have you guys seen this: http://www.alistapar...les/flashsatay/ ??
0

#6 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 16 December 2006 - 09:50 AM

I saw it when I did my research for that project.
0

#7 User is offline   OzzQuvmIlrreet 

  • W.R. Private
  • Group: Members
  • Posts: 1
  • Joined: 31-March 11

Posted 01 April 2011 - 01:30 PM

коммутатор антенн
Что конечно не останавливает любителей спутникового ТВ! :))
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users