dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: really struggling with flash embedding

  1. #1
    Member
    Join Date
    Mar 2009
    Posts
    35

    Question really struggling with flash embedding

    hi everyone

    i posted bout this yesterday and have tried to figure it out on my own but just seem to be getting more and more confused trying to work it out on my own so i thought if i post the code i have so far etc it might help someone to help me.

    what my page looks like is attached to this post. what i have just now is a banner with spacing at each side which i dont want (i want the banner to extend the full length of the header) and also to have a blue border around it

    i dont think this is the right way to embed flash but having read some of the info on swfobject2 i'm still at a loss as to how to use this.

    i have this in my html:

    Code:
    <head>
    <script src="/AC_RunActiveContent.js" type="text/javascript"></script>
    </head>
    
     <div id="header">
              
             <object width="900" height="100">
    <param name="movie" value="banner.swf" />
                 <embed src="banner.swf" align="middle" width="900" height="100"> </embed>
               </object>
              
             </div>
    and in my css:

    Code:
    #header {
     width: 900x;
     color: black;
     padding: 10px;
     border: 1x solid #ccc;
     height: 100px;
     margin: 5px 0px 5px 0px;
     background: #C0D9D9
    }
    as i'm not very experienced in flash i just seem to be going round in circles and the more i read the more its confusing me.

    all i want is a banner that matches the width of my html document and for no strange white bits to be apparent.

    i hope ive given all the info anyone might need to help me. i just thought id post again on this topic to give the code of how my swf file is embedded at the moment.

    thanks
    Last edited by eastyeasty1; 02-22-2010 at 03:52 PM.

  2. #2
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    Quote Originally Posted by eastyeasty1 View Post
    hi everyone

    i posted bout this yesterday and have tried to figure it out on my own but just seem to be getting more and more confused trying to work it out on my own so i thought if i post the code i have so far etc it might help someone to help me.

    what my page looks like is attached to this post. what i have just now is a banner with spacing at each side which i dont want (i want the banner to extend the full length of the header) and also to have a blue border around it

    i dont think this is the right way to embed flash but having read some of the info on swfobject2 i'm still at a loss as to how to use this.

    i have this in my html:

    Code:
    <head>
    <script src="/AC_RunActiveContent.js" type="text/javascript"></script>
    </head>
    
     <div id="header">
              
             <object width="900" height="100">
    <param name="movie" value="banner.swf" />
                 <embed src="banner.swf" align="middle" width="900" height="100"> </embed>
               </object>
              
             </div>
    and in my css:

    Code:
    #header {
     width: 900x;
     color: black;
     padding: 10px;
     border: 1x solid #ccc;
     height: 100px;
     margin: 5px 0px 5px 0px;
     background: #C0D9D9
    }
    as i'm not very experienced in flash i just seem to be going round in circles and the more i read the more its confusing me.

    all i want is a banner that matches the width of my html document and for no strange white bits to be apparent.

    i hope ive given all the info anyone might need to help me. i just thought id post again on this topic to give the code of how my swf file is embedded at the moment.

    thanks
    flash is not exactly like div. So you cannot expand it to fit the area you want unless the image you used in it is also that wide, or if you have used vector content only.

    still if you want to try, set scalemode parameter to showall/exactfit and try

  3. #3
    Senior Member
    Join Date
    May 2008
    Posts
    332
    What is the doucment size of the banner? If you are scaling down the banner to make it fit into 100px in height, it will scale down but maintain the same aspect ratio (width to height). The reason for that is so that round things stay round and are not distorted or elongated.
    So if you have scaled down the height of the banner to make it 100 pixels high, it will also scale down the width, leaving spaces on both sides.
    In a nutshell, create the Flash banner the exact size that will be used on the Web page.
    EfV

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center