adding flash to css

  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

hello,
i am at an impass, i am making a site and im trying to add a .swf to css... but of course nothing is showing up...
here is my link...http://www.globalnichenetworks.com/newGNN/index.php
can anyone help...
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

You can't add Flash to CSS it requires object embed code just like a quick time or windows media movie. Since Flash is a plugin and not a default supported file type, you need to give the browser a lot more info than just the url to play.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

He's actually not trying to use flash in CSS. He worded it wrong. I glanced at his source code but don't have time to figure out where the problem is. He's using AC_RunActiveContent.js
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

EDIT: I looked at your code. And to be honest it's a little out of my league. But my suggestion may help in some way. I would really like to know the answer to this for future use.


Okay here is the code I used to embed a flash file. I pulled it directly from a site I did. I actually created a div for the flash file. Which I think was not even neccessary, but it was one of my earlier CSS attempts. You will need to change the file name of course and the dimensions.
Code: [ Select ]
<div id="commericalContainer"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="160" height="500">

         <param name="movie" value="Flash/Commercial_holder.swf">
         <param name="quality" value="high">
         <embed src="Flash/Commercial_holder.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="160" height="500"></embed>
</object> </div>
  1. <div id="commericalContainer"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="160" height="500">
  2.          <param name="movie" value="Flash/Commercial_holder.swf">
  3.          <param name="quality" value="high">
  4.          <embed src="Flash/Commercial_holder.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="160" height="500"></embed>
  5. </object> </div>



The stuff in red will change according to your project. Like I said you may not need the div tag, but you have to use the object to embed it.




Also, and I can't even begin to try and explain this, but it was suggested to me that I use an unobtrusive method of embedding my flash content. Here's an article I just found on it:

http://www.bobbyvandersluis.com/ufo/index.html

I used Dreamweaver to place it. Also make sure the functionality of it loads as the page does. In other words so the viewer doesn't have to click on it once to activate and another time to say use a menu item. That is so irritating! I hope this helps at least a little.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

that won't be necessary to work around anymore ... flash-forum/click-activate-and-use-this-control-t83669.html#p480145
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

trying to understand how do i embed a .swf into css
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

like it has been said, you can't just add flash into the CSS, it isn't just like an image ... you have to use <embed> code in your (X)HTML like the example zaiah gave ...
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

righteous_trespasser wrote:
that won't be necessary to work around anymore ... flash-forum/click-activate-and-use-this-control-t83669.html#p480145

what about older browsers? and what about browsers other than IE?

Maybe he is asking another question and we are just not understanding.

Here is the CSS that I used to control the properties of my flash movie
Code: [ Select ]
#commericalContainer {

    margin-top: 100px;
    float: left;
    clear: none;
    width: auto;
    padding-right: 5px;
    padding-left: 5px;
    height: auto;
}
  1. #commericalContainer {
  2.     margin-top: 100px;
  3.     float: left;
  4.     clear: none;
  5.     width: auto;
  6.     padding-right: 5px;
  7.     padding-left: 5px;
  8.     height: auto;
  9. }


And the code is above. And here is the http://bodybalanceliving.com/about.html you can find it on. This flash element is just beneath the navigation on the left. The flash navigation on the right is control by a different set of CSS lines. Maybe that way you can look at both in real time and it might make more sense. If this is not your question, maybe you try using other words or show us an example of what you are trying to do. I get the feeling you are using some sort of template and you are not familiar with CSS and you don't know where to start. Just taking a guess. Hope this helps.
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

no not a template, ive been working with css but just neva had to put flash in a site yet and the code you gave me above didnt work...for some reason
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

ok let me explain differently... i made a site using css. and now i want to ad a a flash header in it. when i try to do it the normal way like i do with html it doesnt show up... now im asking how will i do this same in a site coded with css... wand im trying to make it an include file too... what do i have to ad to the header, and what do i add to the body so that flash can show
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

olm75 wrote:
ok let me explain differently... i made a site using css. and now i want to ad a a flash header in it. when i try to do it the normal way like i do with html it doesnt show up... now im asking how will i do this same in a site coded with css... wand im trying to make it an include file too... what do i have to ad to the header, and what do i add to the body so that flash can show


First, did you try to use the stuff I posted. You have to change the code to reflect your flash file. The name of the file has to change and the dimensions.

Can you post all the code, all the css, and the name of the flash file??? Also, did you refresh your page? What versions of flash are you using and what did you save your file out to? Is the path correct? What are you using to code/edit this site? Dreamweaver? Frontpage? Okay I know this sounds elementary, but before you pull your hair out trying to see what is wrong with the code, try to publish your flash file again. Also your HTML is not valid. Look at the errors they may shed light on your problem.
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

okay. i looked at your code and css. it looks to me, and i'm no expert, like you might have some div's open. forgive me if i'm wrong. and can i ask why you are using all of that javascript? and the table? i don't understand.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Microsoft eliminated the Click to activate this Control thing. You no longer need the AC_RunActiveContent.js

Let me see if I can summarize, because the wording is confusing. Basically he's making a tableless site using CSS and DIVS which is appropriate. It's the divs that are throwing things off. You base code above should work with the divs just fine zaiah, but the problem that needs fixed is what about the divs is gumming things up. Most likely what you noticed, missing tags.
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

I understand the no tables thing. My site doesn't have any either :) He does have a table in there however. And please keep in mind, I am new to this. So maybe I am not the best person to help. I was just trying considering I had trouble with my own and then I finally got it to work. Is the flash file pretty small? And my question for someone with more experience than me is, the way he is trying to do it, is this considered non-obtrusive? I still haven't figured that whole thing out.

What if you try putting the flash file somewhere else temporarily? Out side of the header div, just for testing purposes. if that works you know then that it is something associated with the header. looking it at it seems there are a some open divs. ANd Thanks ATNO/TW!
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

ATNO/TW wrote:
Microsoft eliminated the Click to activate this Control thing. You no longer need the AC_RunActiveContent.js

I can't believe I didn't hear about this until now! One less annoying IE hack to deal with. :thumbsup:
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

ok so how will i accomplish this
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

I think zaiah already gave you all the code you'll need to add the flash... if that's what you're asking about still?

I looked at your site, and it looks like you're still trying to add it with JavaScript, which is a lot more complicated and isn't necessary anymore.
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

I heard it was happening April of this year. did it happen in other browsers?
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

Isn't IE the only browser that had the 'click to activate' thing before? I checked a site in both IE6 and IE7 and it looks like it really is gone.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

yeah IE was the only one ...
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

righteous_trespasser wrote:
yeah IE was the only one ...

well i just looked at a site that sold templates in Opera. And I had to click on it before the nav was activated. Is it my version of Opera? my plugin outdated? I just opened the same page in FF and IE6 and it works like everyone wished it would before.

here's the page: http://freesitetemplates.com/templates/ ... /Military/

I clicked on the layout on the top row in the middle.

But before this thread gets partially hijacked; can you please explain what part you don't understand?

You said
Quote:
ok so how will i accomplish this

Can you tell us what you are using to edit the html?
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

zaiah wrote:
righteous_trespasser wrote:
yeah IE was the only one ...

well i just looked at a site that sold templates in Opera. And I had to click on it before the nav was activated. Is it my version of Opera? my plugin outdated? I just opened the same page in FF and IE6 and it works like everyone wished it would before.

here's the page: http://freesitetemplates.com/templates/ ... /Military/

I clicked on the layout on the top row in the middle.

I just checked that link in the latest version of Opera and I see it, too. It looks like Opera was affected by the Eolas thing originally along with Microsoft. Hopefully they'll be able to fix it the same way.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

Okay I'm sorry, didn't realize that they suffered from that terrible "click to activate and use this control" disease aswell ...
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

There are lots of other reasons to use Javascript to place Flash content. (Providing alternate content, Plugin Version detection, Force plugin upgrades, etc) Not to mention that fact that <emebed> isn't technically valid in the HTML spec. The removal of the active X stuff was just an added benefit as far as I'm concerned.

@olm75 - Open your .fla in Flash. Go to File -> Publish Settings. In the "Formats" tab make sure that .swf and html are checked. Click the Publish button. Flash will create an html page for you with the swf already embedded. Go to the same directory as your .swf file. Open the html file in your favorite editor and copy and paste the code from the html flash generated to your website html. You'll have to make sure to upload your .swf (and the javascript file if your using Flash 8 or CS3) file to your server as well.
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

So is this the non-obtrusive method of doing it?
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

i actual figured it out DWcs3 allows you to add a flash button, so i just browsed for the flash file instead of the button an added the .swf file in instead...
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

You didn't even have to do that. You could have just insert the flash file directly. Wish I would have known you were using DW to begin with.

Is there something going on with the placement? It seems to high. Using FF. And the bg on your buttons is too dark. And the menu items are overlapping on the right. Did you create this Flash file from scratch? Or is it a template? I see where you are going with the design. It's going to look nice.

Post Information

  • Total Posts in this topic: 27 posts
  • Users browsing this forum: No registered users and 79 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.