A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: [CS3] Resizing an SWF

  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    16

    [CS3] Resizing an SWF

    OK, so I've got an SWF file given to me by a customer and they want me to resize a 1000x700 swf file, to fit an 800x500 content area. when i change the size of the file, the stage changes, but the content within does not adapt to the file size change, so elements of action display off the area. How do i go about resizing the file, and everything contained within without having to redesign the whole flash file?

    So basically what i want to accomplish is how do i resize the 1000x700 flash file to fit an 800x500 content area?

  2. #2
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    so you've loaded this swf into another swf of the appropriate size and then resized it? Which version of AS are you using?
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  3. #3
    Junior Member
    Join Date
    Aug 2008
    Posts
    16
    you're saying i can import the SWF of the big size into a smaller blank FLA file? and it'll work???? cus i have not tried that yet.

    AS.2.0 btw.

  4. #4
    Junior Member
    Join Date
    Aug 2008
    Posts
    16
    does anyone have a solution for this?

  5. #5
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Well I don't know of any easy way to do it. If you just embed the movie at the right size it will resize, but 800 x 500 isn't proportional to 1000 x 700 (714 x 500 is proportional). If most of your content is vector, everything should still look pretty good.

    If embedding the file at a smaller size isn't acceptable, the best you can do is change the .fla manually. You can use Edit Multiple Frames (it's a button at the bottom of the timeline) to help, but it's still going to be a tedious process.

  6. #6
    Junior Member
    Join Date
    Aug 2008
    Posts
    16
    Quote Originally Posted by rdoyle720
    Well I don't know of any easy way to do it. If you just embed the movie at the right size it will resize, but 800 x 500 isn't proportional to 1000 x 700 (714 x 500 is proportional). If most of your content is vector, everything should still look pretty good.

    If embedding the file at a smaller size isn't acceptable, the best you can do is change the .fla manually. You can use Edit Multiple Frames (it's a button at the bottom of the timeline) to help, but it's still going to be a tedious process.
    so just use the typical embed tag instead of placing it into dreamweaver? because when i place it in dreamweaver and resize it, it's like it resizes the window that the flash is shown in, and not the whole flash itself.

  7. #7
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    I'm not sure I follow. There's code in your HTML page that defines the size (height/width) of the Flash movie. If you change that size, everything in the Flash movie will be smaller.

  8. #8
    Junior Member
    Join Date
    Aug 2008
    Posts
    16
    when i do that in the HTML it resizes the content area, but not the content.

  9. #9
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    You'll need to provide a little more information than that...what did you try? How bout showing the page or the code?

  10. #10
    Junior Member
    Join Date
    Aug 2008
    Posts
    16
    okay, so what i did, is i took the SWF. placed it into dreamweaver in the area where i wanted it to go on my layout. in the properties area below the "design" window, i changed the Height and Width properties to the ones i needed it to be, and it only resized the boundaries, not the full SWF.

    Then i tried, going into the code, and in the embed properties i added a height and width property to the tag; and it did the same.

  11. #11
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    I'm afraid I'm still not following. I'm not sure what you mean by the "boundaries". It would be really helpful to see a page, because we could see what code Dreamweaver is creating, and what might be wrong with it.

    That being said, I went ahead and created my own test page. I made a .swf file that's 550 x 400, and using SWFObject put the .swf file into the page at full size and half size.

    (The fact that I'm using SWFObject and you're not shouldn't matter, though I'd certainly recommend SWFObject).

    Here's what I get:

    http://www.richarddoyle.net/test/resize/

    This is the kind of thing you want, right? A smaller version of the same thing?

  12. #12
    Junior Member
    Join Date
    Aug 2008
    Posts
    16
    yeah, mine didn't do that; imagine the main full size one you have there. and take that black boundary box from the smaller one, and place it over the full size image... that's what happens.

    Basically the contents stay at full size, but the window that it is displayed in, gets smaller. I will post a test for you here:

    HERE

    you'll notice how the photo in the gallery loads out of the content area on the page.

  13. #13
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    In your .fla look for code that says Stage.scaleMode. If you remove that, it should go back to the normal behavior.

  14. #14
    Junior Member
    Join Date
    Aug 2008
    Posts
    16
    won't that remove the auto-resizability of the frame that the photo is displayed in? if so, is there a way to keep this functionality without having to rebuild the whole file itself?

  15. #15
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    I'm assuming you're referring to some code in your movie. Without knowing how it's coded, I can't say for sure. How bout you try it and let us know if it causes problems?

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