• Resolved Yanev

    (@yanev)


    Hi,
    I’ve been trying for 2 days now to add a link reference to my .swf object so whenever clicked on, it takes u back to the homepage..

    I m using the organic_structure theme and this was the original code which is working if u use an image:

    <div class="headerleft">
              <p id="title"><a href="<?php echo get_option('home'); ?>/" title="Кинотека"><?php bloginfo('name'); ?></a></p>
            </div>

    ..now, I can’t just simply add the usual code for adding a link reference to an object or an image (<a href="..."><img src="..."/></a>) because it has too many .php code functions which i don’t understand and i think have something to do with this.

    the css rules are:

    #header #title {
    
    	padding: 0px;
    	margin: 0px;
    	}
    
    #header #title a {
    
    	float:right;
    	display: block;
    	width: 350px;
    	height: 120px;
    	margin: 0; padding: 0;
    	text-indent: -9999px;
    	overflow: hidden;
    }

    This is my code with the inserted .swf object (i use a plugin to display the flash content):
    <p id="title"><a href="<?php echo get_option('home'); ?>/" title="Кинотека">[kml_flashembed movie="wp-content/uploads/2011/05/Kinoteka-logo.swf" height="120" width="350" ]</a></p>
    ..which covers the .swf object and i can’t see it,but u can click on the block and it takes u to the homepage.

    If i modify the #header #title a css rule:

    #header #title a {
    
    	margin: 0; padding: 0;
    	text-indent: -9999px;
    	overflow: hidden;
    }

    i can see the .swf object but can’t be clicked on because i suppose that now the object covers the block with the link reference…

    Any help would be greatly appreciated!
    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Phil

    (@owendevelopment)

    It may be easier to insert the link into the Flash .flv file and republish.

    Or

    Another way may be to add a div on top of the flash file (same height and width), use a transparent png to layer over the top and add a z-index to it to bring it to the top of all layers.

    CODE

    <div class="flashcontainer">
    <div class="transpng">
    <a href="<?php echo get_option('home'); ?>/" title="Кинотека">[kml_flashembed movie="wp-content/uploads/2011/05/Kinoteka-logo.swf" height="120" width="350" ]</a>
    </div>
    </div>

    CSS

    .flashcontainer {
    width: 350px;
    height: 120px;
    position: relative;
    }
    
    .transpng {
    background: url(images/transparent_png.png) no-repeat;
    width: 350px;
    height: 120px;
    z-index: 9999;
    position: absolute;
    top: 0;
    left: 0;
    }

    Try that. If the flash still appears on top, try wrapping that in it’s own div and give it a z-index in CSS of 1.

    Thread Starter Yanev

    (@yanev)

    tnx that really helped !
    cheers

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add a link to .swf object’ is closed to new replies.