Jump to content

Placing flash movie over logo


Recommended Posts

Hi All,

I have a logo which goes across the full width of the page. I am trying to place a flash movie in to some blank space the logo has.

The best I got so far is to add the flash to the footer.tpl above the footer DIV - but it does not sit in the right place and if I make it larger than about 75px in height it jumps to the right column. Can anyone tell me how to make it sit between the blank space on the logo and if I change height of the movie for it not to jump out of place.

Test site here http://www.ukushosting.com/artnculture and it should be pretty easy to see what I am trying to do.

Link to comment
Share on other sites

You will need to use absolute positioning to do that. Change the #page block in the /* global layout */ section of your global.css from:

#page {
   width: 980px;
   margin: 0 auto 2px auto;
   text-align: left
}



to:

#page {
   width: 980px;
   margin: 0 auto 2px auto;
   text-align: left;
   position: relative
}



This will allow you to specify an absolute position relative to the page. Then you can use code like the following:

#header_right div.advertising_block
{
   position: absolute;
   top: 12px;
   left: 30px;
}



Change 12px to how many pixels from the top of the page you want the flash to appear and 30px to how many pixels from the left of the page you want the flash to appear.

By the way, I see you are using the following code in the advertising block for the flash:


<html><head>
<title>ukusmovie</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta name="author" content="">
<meta name="generator" content="SWiSHmax http://www.swishzone.com">
<meta name="description" content="ukusmovie">
<meta name="keywords" content="design, hosting, made, simple, website">
<!-- text used in the movie -->
<!-- design, hosting, made, simple, website -->
<!-- urls used in the movie -->
<!-- http://www.ukushosting.com -->
<!-- Created by SWiSHmax - Flash Made Easy - www.swishzone.com -->
</head>
<body bgcolor="#000000">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0"
 id="ukusmovie" width="155" height="112">




 <embed type="application/x-shockwave-flash"
  pluginspage="http://www.macromedia.com/go/getflashplayer"
  width="155" height="112"
  name="ukusmovie" src="ukusmovie.swf"
  bgcolor="#000000" quality="high"
  swLiveConnect="true" allowScriptAccess="samedomain"
 ></embed>
</object>

</body>
</html>



It's not a good idea to repeat the <html> tag. You should instead use just:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0"
 id="ukusmovie" width="155" height="112">




 <embed type="application/x-shockwave-flash"
  pluginspage="http://www.macromedia.com/go/getflashplayer"
  width="155" height="112"
  name="ukusmovie" src="ukusmovie.swf"
  bgcolor="#000000" quality="high"
  swLiveConnect="true" allowScriptAccess="samedomain"
 ></embed>
</object>



Note that I changed ukusmovie.swf to {$content_dir}ukusmovie.swf above. That should ensure the flash works on all pages including SSL pages.

Link to comment
Share on other sites

Thanks Rocky - but it not the advertising block I'm trying to move - I am inserting an object code into the template - its the flash move currently on the logo you can see. I have done this via the footer.tpl

I will make the adjustments to the advertising as suggested too.

Link to comment
Share on other sites

Rocky - I looked back at what your wrote in more detail - and it kind of makes sense (sorry still findin my feet with CSS) and I think it makes sense

The position relative command allows a fixed position of div objects - but how do I refer it to the flash movie - ie how do I give the flash moview div object identifier? Very confused here.

Or have I got it completley wrong in my understanding?

Link to comment
Share on other sites

You could use #header_right object to reference the flash object, assuming there is only one object in the header. I think it is better to put it in a div with an ID to ensure you are referencing only one object. When I last looked at your code, the flash code was in a

, which is why I suggested the above code. If you have a different class or ID, then update my code above to use it instead.
Link to comment
Share on other sites

Ah I see.....I think.....

So......

Add the additional position relative to the css in the global layout section - as suggested. Easy enough

Where do I add/edit the following this to the global css ? ( I changed it to headermovie as thats the ID in the flash code - is that correct?

#header_right div.headermovie
{
position: absolute;
top: 12px;
left: 30px;
}


Based on this code

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0"
 id="headermovie" width="175" height="70">




 <embed type="application/x-shockwave-flash"
  pluginspage="http://www.macromedia.com/go/getflashplayer"
  width="175" height="70"
  name="headermovie" src="headermovie.swf"
  bgcolor="#FFFFFF" quality="high"
  swLiveConnect="true" allowScriptAccess="samedomain"
 ></embed>
</object>

Link to comment
Share on other sites

Rocky - you are an absolute star! Thank you so much for your help and patience - I see you help more people than anyone else in these forums.

Going to test it now - I will let you know how I get on - then mark this as solved. (I hope)

A follow on question for my own reference

How will this be handled in varying sized browsers. Will it be adjusted by page width or as it absolute - will it be fixed there and potentially look out of place of on a large width browser - or does it not matter and I am barking up the wrong tree?

Link to comment
Share on other sites

Success!!!

After playing for sometime - I removed the "div" so it was just

#headermovie

and I wias able to position where I wanted. I add WMODE to correct the background covering the page area it was position on top of and worked - test site here www.ukushosting.com/artnculture

I have the movie code pasted in the footer.tpl. I assume that as long as the code is on a page which is always called upon - ie the footer - the #headermovie will always be displayed.

Is this good practice or have I made a "botched" approach in making this work?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...