Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    I am not an advanced web designer and i am not sure if this is an easy fix or not.
    i created a flash movie the same width and hight as my header.jpg and i am trying to replace one for the other. My entire site's layout is run from my css.css file. i cant seem to figure out how to get my movie to play in the space where my header is.http://www,faceplatesgrillz.com
    it will not let me post this comment when i try to paste my code into this area or try to attach it. so ill give you a link.
    http://www.faceplatesgrillz.com/csshelp.zip
    thank you in advance for your help and time.
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  2.  

  3. #2
    Member Jason Wilson's Avatar
    Join Date
    Nov 2006
    Location
    Perrin Creek Floodplain - Hayes, VA
    Posts
    39
    Member #
    14437
    Quote Originally Posted by wburrough
    I am not an advanced web designer and i am not sure if this is an easy fix or not.
    i created a flash movie the same width and hight as my header.jpg and i am trying to replace one for the other. My entire site's layout is run from my css.css file. i cant seem to figure out how to get my movie to play in the space where my header is.http://www,faceplatesgrillz.com
    it will not let me post this comment when i try to paste my code into this area or try to attach it. so ill give you a link.
    http://www.faceplatesgrillz.com/csshelp.zip
    thank you in advance for your help and time.
    Someone may come along and give you something I'm not aware of, but I think you are going to have to do this with Javascript. If you need help with that, let me know and I'll toss some code up for you. I don't think it will work in CSS though.
    Go n-ithe an cat thu is go n-ithe an diabhal an cat.

  4. #3
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    Quote Originally Posted by Jason Wilson
    Someone may come along and give you something I'm not aware of, but I think you are going to have to do this with Javascript. If you need help with that, let me know and I'll toss some code up for you. I don't think it will work in CSS though.
    can you please tell me how to do this. how can i use the java script and make the flash movie appear in the header area?
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  5. #4
    Member Jason Wilson's Avatar
    Join Date
    Nov 2006
    Location
    Perrin Creek Floodplain - Hayes, VA
    Posts
    39
    Member #
    14437
    Alright, well I thew this together between errands today. SO far it has worked for me, though I'm rusty so it is probably not the cleanest or easiest way.
    1. Put this in your '< head >' section:
      Code:
      <script src="swapOut.js" type="text/javascript"></script>
    2. Then wrap a div around your image like so:
      Code:
      <!--- Unless someone can show you a better way you must 
              wrap a container around the image you are replacing.---> 
              <div id="replace-me" >
                  <img  src="theImage.jpg" />
              </div>
    3. Then add this code at the bottom of the body tag or after the last image you want to replace:
      Code:
      <script type="text/javascript">
              //<![CDATA[
              /* Replacement calls.*/
              if(typeof swapOut == "function"){
                  /*Declare any parameters other than width and height in a nested
                  array of the form 'var params = [[ 'name' = 'value' ] , ['name', 'value'] , ... ]'*/
                  var params = [['wmode', 'transparent'], ['bgcolor', '#334455']]; 
                  /*this is the replace statement 'swapOut('ID', 'swfPath', width, height, params)*/
                  swapOut('replace-me', 'test.swf', 250, 300, params);
              }
              //]]>
              </script>
    4. Finally, you need to put this code in the .js file you referenced in step 1:
      Code:
      function swapOut( replace, withFlash, width, height, params) 
          {
              var div = document.getElementById(replace);
              var swf = '<object width="' + width + '" height="' + height + '"><param name="movie" value="' + withFlash + '">';
              for (i=0; i<params.length;i++)
              {
                  swf += '<param name="' + params[i][0] + '" value="' + params[i][1] + '">';
              }
              swf += '<embed src="' + withFlash + '" width="' + width + '" height="' + height + '"';
              for (i=0;i<params.length;i++)
              {
                  swf += ' ' + params[i][0] + '="' + params[i][1] + '" ';
              }
              swf += '></embed></object>';
      div.innerHTML = swf;
                  }
    Go n-ithe an cat thu is go n-ithe an diabhal an cat.

  6. #5
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Quote Originally Posted by Jason Wilson
    <!--- Unless someone can show you a better way you must
    wrap a container around the image you are replacing.--->
    <div id="replace-me" >
    <img src="theImage.jpg" />
    </div>
    Well if you're going to put a div where the image goes rather than using the image as a background, then why don't you just drop the flash movie into that div rather than having the image there? I mean, I guess what I'm saying is you don't really need Javascript to do it for you.

    I'm not really good with CSS but it seems like you just have to figure out how to get your layout working with having the actual image THERE rather than using it as a background image. Then all you have to do is take that out and put the flash movie in its place.

    I wish I was better with CSS and then I could help you. Maybe Shadowfiend can help you?
    choosy developers choose gif!
    website | paintings | blog

  7. #6
    Member Jason Wilson's Avatar
    Join Date
    Nov 2006
    Location
    Perrin Creek Floodplain - Hayes, VA
    Posts
    39
    Member #
    14437
    I thin kthe benefit would really come once it was coupled with flash detection. If someone come alon without flash enabled then you don't have a big blank at the top of your page.

    Forgot to mention that Flash detection scripts are all over the place, google will have to help you on that one (since reworking the wheel generally yeilds squares with me).
    Go n-ithe an cat thu is go n-ithe an diabhal an cat.

  8. #7
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Quote Originally Posted by wburrough
    can i insert the a div tag in my css file?
    Yeah, see, that's the thing. I mean I'm sure you can, but I tried to and it screwed up the layout. I bet Shadowfiend or some other CSS expert could do it.
    choosy developers choose gif!
    website | paintings | blog

  9. #8
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    oh boy this is quit the mission. i am still lost. all i want is flash in the header position. I am having so much trouble with this.
    you told me to wrap a div around the image i am replacing. the image i am replacing is a backround in my header in my css file..i am not sure if i can put a div tag in there.
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  10. #9
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Yeah I know. So you need to go into your layout and put a div there instead of having the image as a background image. It shouldn't be too hard, but you have to be good w/ CSS so it doesn't screw up your layout.
    choosy developers choose gif!
    website | paintings | blog

  11. #10
    Member Jason Wilson's Avatar
    Join Date
    Nov 2006
    Location
    Perrin Creek Floodplain - Hayes, VA
    Posts
    39
    Member #
    14437
    Ah, okay I see what you are wanting to do now. No, to my knowledge you can't use Flash as a background in css.

    The only other way I could think of is using absolute positioning to slide the flash under your header. If you do it that way, you won't necessairly need the div.

    Could you link the flash file? There may be a way to emulate it without flash.
    Go n-ithe an cat thu is go n-ithe an diabhal an cat.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:10 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com