WordPress.org

Ready to get started?Download WordPress

Forums

Flash header simple question (40 posts)

  1. jontherobot
    Member
    Posted 8 years ago #

    I want to simply replace the header of my "Kubrick"-themed gallery with a .swf file. It seems I simply cannot replace and redirect the file information in the header.php file, as the flash file does not appear once updated. Can someone advise me on this? I'm looking for something simple, as I have no knowledge of PHP beyond located file names within the code. I greatly appreciate any help, thanks!

  2. skulled
    Member
    Posted 8 years ago #

    Can you please post the link to the website with the flash code inserted in the header.php?

  3. jontherobot
    Member
    Posted 8 years ago #

    http://www.opticalgarden.com/wordpress

    I really don't know how to do this. I'm going into the PHP, and wherever it says, "kubrickheader.jpg", I'm replacing it with my file, "top_navigation.swf" and nothing appears after saving changes. The .swf file is saved into the same location as the "kubrickheader.jpg."

  4. skulled
    Member
    Posted 8 years ago #

    You can't really just replace the file name to show the flash file.

    You actually need the whole of the <object> stuff there in your header part of the theme.

  5. jontherobot
    Member
    Posted 8 years ago #

    Can you please give me an example of what the line of code would look like, and where to place it? I'm guessing it will go into the header.php file.

  6. skulled
    Member
    Posted 8 years ago #

    How did you get the flash object code? Did you create the flash yourself? If you did, then you probably have an option to get the HTML code for it through your program.

    Otherwise let me know and I will find an example and show you how to do it.

  7. jontherobot
    Member
    Posted 8 years ago #

    I created the Flash myself, so if I use:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="760" height="200" id="top_navigation" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="top_navigation.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <embed src="top_navigation.swf" quality="high" bgcolor="#ffffff" width="760" height="200" name="top_navigation" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>

    it should work? Where do I place it?

  8. skulled
    Member
    Posted 8 years ago #

    Ok, here's the code from a default theme header.php with your flash file incorporated into it.

    In all probability just sticking that into your header.php should work fine, otherwise just copy paste the part that is different from your header.php and that should work.

    You can get the code here: http://pastebin.com/482608

    If something is the problem post back and we cna work it out.

  9. jontherobot
    Member
    Posted 8 years ago #

    I tried, but nothing shows up, as you can see now:

    http://www.opticalgarden.com/wordpress

    However, if I right-click over the white box that is appearing, it says "movie not loaded," and "about Macromedia Flash Player 8," which means it knows that Flash is supposed to go there, but it's no displaying the movie. Maybe I have to edit the information above it in the PHP?

  10. jontherobot
    Member
    Posted 8 years ago #

    One odd thing I'm noticing now, though not sure if it's a clue to finding the answer, is in the Safari browser, when scrolling down I can see a sort of flicker of the Flash movie, as if it's behind something. Firefox only displays a white box, same with IE.

  11. skulled
    Member
    Posted 8 years ago #

    One thing i forgot to mention :(

    You need to give the absolute URL for the flash movie in these places:

    <param name="movie" value="top_navigation.swf" />
    <embed src="top_navigation.swf" quality="high" ...

    Because with just filename, wp is looking at a different folder probably than where the file itself is located

  12. jontherobot
    Member
    Posted 8 years ago #

    Wow! Now it works. But it's out of place. How can I adjust it's location? Sorry for all the questions, but your assistance is excellent and I really appreciate it.

    (this will be my last request, then I can manage the rest from there) :)

  13. DianeV
    Member
    Posted 8 years ago #

    In Opera, I see the Flash header which is more or less in the right place, but the content (the post) is way to the right outside of the content area. I'd suggest going through your code to see what may have been omitted.

    However, the Flash doesn't seem to be animated.

    Bear in mind that Flash 8 is the latest version (I believe), so most people don't have the Flash 8 player yet. If at all possible, I would save it as a lower version unless it's absolutely necessary to have it as Flash 8.

    Love the photos, though. :)

  14. skulled
    Member
    Posted 8 years ago #

    In your header.php ..

    Find these 2 lines:

    #header { margin: 0 !important; margin: 0 0 0 1px; padding: 1px; height: 198px; width: 758px; }
    #headerimg { margin: 7px 9px 0; height: 192px; width: 740px; }

    and comment them out. its probably just a problem of the width and alignment.

    Also if you can reduce the size of the flash to 740px, yours is 760 now, that's what size of the header area is in the default theme.

  15. jontherobot
    Member
    Posted 8 years ago #

    Awesome advice, from the both of you! skulled, your techniques worked perfectly(at least from the Mac side, I'm not sure what PC users are seeing yet). Eliminating those 2 lines made it fit great. I don't have Opera installed though Diane, if you don't mind, could you tell me how it looks now? In Apple's Safari, it seems to be 1 pixel off, but Safari is still a little buggy and 1 pixel is good enough as long as Firefox and IE work alright. Thanks for all your great help and advice!

  16. jontherobot
    Member
    Posted 8 years ago #

    Oh ya, and Diane, I resaved the Flash as version 6 this time, hopefully more users can view it. There's actually no animation, I decided to use Flash for my site nav since I spent too much time figuring out how to make an html navigation and nothing worked. I learned a lot though from this experience, so I can probably go back and figure out how to integrate an html navigation now. I'll stick to Flash and animate it when I have time. Thanks again for all the assistance!

  17. skulled
    Member
    Posted 8 years ago #

    Pixel perfect on PC running XP and FireFox 1.5
    Off by a pixel on IE though.

    You probably could get a workaround with that one pixel thing, not sure right now, but I have had that problem quite a number of times, if it comes back to my mind as to what can be done to rectify that, will let you know.

    And nice post (the first one right now) :)

  18. fishcake37
    Member
    Posted 8 years ago #

    Skulled or Jontherobot I currently have the same issue with my site and wondered if you could repost the code for using a Flash header for my blog. I tried using Semiologic but I can't seem to manipulate the sidebars like I want and it was a lot easier to do using the default template.

    Thanks in advance.

  19. mateu
    Member
    Posted 8 years ago #

    I second fishcake37's post, guys. That code would be great to have a look at. This is a huge issue for me. It's the one thing that really bothers me about WP. All I want is to be able to embed a flash header atop my pages. Thanks!

  20. zinkping
    Member
    Posted 8 years ago #

    Would you be a dear and post your flash code INSIDE the default header? I cannot work it out either, as the default header seems to split up some of the code sentences.

  21. zinkping
    Member
    Posted 8 years ago #

    skulled, where in pastebin is that code?

  22. timfitz
    Member
    Posted 8 years ago #

    This is my code for my flash banner. I don't know if it helps.
    http://pastebin.com/568081

  23. ladydelaluna
    Member
    Posted 8 years ago #

    timfitz - pastebin links only work for about 5 minutes.
    Any way you can put that up somewhere permanently for us? It might be a great resource to a lot of people...

  24. JOEJOETHEJOEY
    Member
    Posted 8 years ago #

    Yeh, timfitz, could you please post a copy of how you've edited the php file please?

    I've tried to no avail. Cheers!

  25. vkaryl
    Member
    Posted 8 years ago #

    Um. Pastebin actually works for a couple of days.

  26. JOEJOETHEJOEY
    Member
    Posted 8 years ago #

    Yup, but it's not showing anymore. :(

    http://pastebin.com/568081

  27. timfitz
    Member
    Posted 8 years ago #

    Here is the code for my header file:

    http://timfitz.net/header.txt

    I put it in a text file that you could view via my website. As it says above in the thread, you might have to do some changes in the CSS to make it look right.

    Happy Mardi Gras!!!

  28. JOEJOETHEJOEY
    Member
    Posted 8 years ago #

    Thanks for that Tim!!

  29. spencerp
    Member
    Posted 8 years ago #

    I'm going to bookmark this thread for future reference purposes.. =)

    spencerp

  30. JOEJOETHEJOEY
    Member
    Posted 8 years ago #

    Just wanted to update, I tried with Tim's header file but couldn't get the file to work 100%. I since changed it slightly and have put it in a jpg file here:

    http://img468.imageshack.us/my.php?image=flashheaderphp1zp.jpg

    I had to change the header and headerimg settings. But bear in mind that my flash file is 740x200 pixels.

    Good luck and thanks to all those who posted here!! Excellent topic!

Topic Closed

This topic has been closed to new replies.

About this Topic