A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: html flash related help

  1. #1
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404

    html flash related help

    hello flashers
    I've got an html problem on my site Ive been making a flash website template that takes up the whole page with no scroll bars that can auto fit to any resolution because I have an mp3 at the bottom of the page that I wouldnt want to be hidden. I found a solution that fits the whole page using percentage rather than px for the flash movie embeded in the html it works fine if I put 100% for the width but if I put width and height the flash movie shows up super tiny taking up only about 1/10th of the screen but if I put width alone the width looks fine but than theres still a scrollbar to scroll down which hides the mp3 below. anyone know how I can make the page fit just perfect on any resolution.

    If not can anyone lead me in the direction to do something completely different like make a facebook style toolbar the follows the page on scrolling except below the page for a flash mp3. Either type of help is fine. Thanks for reading all that ^ :P.


    examples:

    percent html doesnt work if I use 100% for both width and height only works with width:
    Code:
    <body>
    <object height="100%" width="100%" style="width: 100%; height: 100%;" data="web_flash/mp3player.swf" type="application/x-shockwave-flash">
    <param name="data" value="web_flash/mp3player.swf" />
    <param name="src" value="web_flash/mp3player.swf" />
    </object>
    </body>
    heres the original code using px rather than percent which I dont want.

    Code:
    <body>
    <object height="1200px" width="800px" style="width: 800px; height: 1200px;" data="web_flash/mp3player.swf" type="application/x-shockwave-flash">
    <param name="data" value="web_flash/mp3player.swf" />
    <param name="src" value="web_flash/mp3player.swf" />
    </object>
    </body>
    Last edited by AS3.0; 04-03-2012 at 10:02 PM.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    There was this good tutorial, but it's gone now (Page Not Found)

    I think the problem is that it's scaling the whole movie. HERE IS ANOTHER TUTORIAL I found, similar to the already mentioned tutorial. You simply resize the content with code upon window resize, and you need to do this by finding a good ratio for your content and their position, and this can be done by multiplying and dividing, for example, assuming you've read the tutorial, centering a movieclip could be done by doing something like this:

    Actionscript Code:
    mc._x = Stage.width/2;
    mc._y = Stage.height/2;

    You divide the Stage's dimensions by 2, to find the center point, and when the window has been resized, so will the flash's dimensions, so it will always stay in the center of your flash.

    Hope this helps
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    The reason that you have no scroll bar has nothing at all to do with the Flash .swf, it's because the "style" overflow:hidden was added to one of the HTML elements, like the "body".
    Looking at the HTML code for the Web page, near the top, you will see:
    Code:
    overflow:hidden
    remove that line completely.
    The default for a Web page is "overflow:auto". Meaning that scroll bars will "auto-matically" be added if and when needed. It was some brainiack at Adobe that decided to change that to "overflow:hidden" when Flash published the .swf ....(of all the stupid #^@^ !! ,45DDG#$*(^$^5).
    Can't tell you how many times this pops up in various Flash and Web Developer Forums.
    Best wishes,
    Video Man

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    ohhh, true, I remember someone else with the same problem once before xD
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    haha thanks guys. I'll try the fix tommorow.
    I appreciate the help

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