dcsimg
www.webdeveloper.com
Results 1 to 9 of 9

Thread: HTML and Flash

  1. #1
    Join Date
    Dec 2010
    Posts
    5

    HTML and Flash

    I'm trying to make my flash take 100% of the window it's in that way it resizes depending on the screen so the flash is not cut off halway.

    How can I do that? I've tried <embed> with 100% width/heights I've done that to the swi before exporting it. I've used AS in the flash nothing seems to be working.

    Closest thing I got is making the flash expand the width of the screen not the height without it being re-scalable.

  2. #2
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    You should review Flash scaling. Here's a start:

    Here are examples of different scaling parameters available in the Publish settings. You can also add these parameters directly in the html (<param name="scale" value="noscale"). All the examples replace the actual Flash dimensions with 100% for both width and height (width="100%" height="100%"). These examples use the old <object> and <embed> to illustrate the different ways to scale Flash. Once you understand how it works Iíd recommend that you use swfobject to place the Flash in your final project.
    View the source code for each page to see the full code.

    http://www.cidigitalmedia.com/tutori...exact_fit.html

    "exactFit" scales the file to fit exactly within the confines of the screen, irregardless if the movie becomes consequently distorted. The original aspect ratio is not maintained. So round things are not round and squares are not square.

    http://www.cidigitalmedia.com/tutori...e/noScale.html

    "noScale" is the default setting, and causes the movie to be displayed at the originally designed dimensions.

    http://www.cidigitalmedia.com/tutori...no_border.html

    "noBorder" causes the movie to be scaled to what ever dimensions are needed to have no border surrounding the movie within the player, which consequently could result in some of the movie being cut off from view. In other words, the movie will maintain the original aspect ratio and will fill the screen completely. But if the movie has to be streched wider to fill both sides of the screen, it will also stretch taller, but then some of the top and the bottom of the movie may be cut off from view.

    http://www.cidigitalmedia.com/tutori.../show_all.html

    "showAll" scales the movie to the size of the screen (which could cause pixelation if the file contains raster information), the difference between showAll and exactFit is that showAll mantains initial movie size proportions. Because it maintains the original aspect ratio, there can be space to the sides or the top and bottom. But everything always shows and they are not distorted. But notice the photo in the center, it becomes pixilated at larger screen resolutions.

    The trickiest part of trying to go full screen is that itís difficult to make the Flash wider without making it taller also, that is, to maintain the correct proportions or aspect ratio of everything on the stage. These methods are just simple scaling accomplished with html. There are also methods to dynamically scale the stage and itís elements using ActionscriptÖ but thatís a much more complex undertaking.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com

  3. #3
    Join Date
    Dec 2010
    Posts
    5
    I'm aware of those scales I've used all of them, you did explain few things I didn't know about few of them.

    So now I'm trying to use exactfit which is what I'm looking for, I went on the link you gave me and used your code just to try it out, changed the swf name accordingly but I still couldn't get it to do what it needs.

    Could the problem rely in export settings of the swf I'm working on?

    In the HTML tab I set width and height to 100%, and the scale to exacfit before extracting it. What am I doing wrong?

  4. #4
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Can you post a link to your page or at least the code for the entire page, including any CSS.
    EfV

  5. #5
    Join Date
    Dec 2010
    Posts
    5
    I've been having so many problems with flash and getting it to work, at this point I'm just using nothing in my index.html except the <object> code that you showed me for exactfit.

  6. #6
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Posting a link to the actual page is the best way for us to trouble shoot. Without that there are just too many variables that we may not know about.
    EfV

  7. #7
    Join Date
    Dec 2010
    Posts
    5
    Here's the link

    http://tinyurl.com/2b7malu

    Like I said the export settings for the swf are 100&#37; for width and height with exactfit as scale.

    Thanks for your help.

    ** Edit ** The actual width and height of the swf are 617x469, I've used all types of dimensions some as high as 1680x1050 (just for testing purpose)

  8. #8
    Join Date
    Dec 2010
    Posts
    5
    I found the problem, it was in the program I was using SwishMax4. I'm not sure why, but I tried the same thing with Adobe Flash CS5 and it worked flawlessly. I'm gonna still leave the other info if you don't mind helping me figure out why it's doing this.

  9. #9
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    I couldn't get "tina.swf" to work either... not sure what the problem is. But at least you've got an Adobe version working.
    Best wishes,
    EfV

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles