fluid layout with flash header

  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

Take a look at this layout, if you would..

Can anybody help me figure out a way to get the content to sit just below the flash header? Right now, it's too far down because the flash stage is set at 100% width and 400px height. I tried messing around with the Actionscript stage object (admittedly way over my head) and I tried setting the height to 100%, but neither seems to be working for me.

Any help would be much appreciated!
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

did you try
Code: [ Select ]
#flashcontent{
        margin:0px;
        }
  1. #flashcontent{
  2.         margin:0px;
  3.         }
or
Code: [ Select ]
#flashcontent{
        margin-bottom:-20px;
        }
  1. #flashcontent{
  2.         margin-bottom:-20px;
  3.         }
etc?
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

Yep. The problem is that there's no consistent negative margin value that I can use, since the gap at the bottom of the flash object changes depending on the browser width.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

ahh I see what you mean. Do you have access the the fla and a copy of flash?

I think you should try to make the flash a fixed width and height because it doesn't scale that much.
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

Yep, I have access to the .fla and a copy of flash.

Making it a fixed width and height would definitely be a last resort kind of thing since I'm going for a fluid layout on this site.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

well the problem is that you have to get the flash content inside to be fluid horizontally as well as the container (swfObject). Whats happening right now is that the flash isn't setup to resize the content so when you resize its shell its trying to resize the content proportionately causing the height to grow with the width.

I doubt that creating a horizontal only scale will be an easy thing inside the existing flash piece.

I can only tell you how I would accomplish this in theory since every flash project is different:

You need to tell the flash not to allow its content to scale (means you use script to scale the content instead of simply scaling the container). Then you need to create a listener for when the flash stage is resized and based on that feedback you need to resize the content horizontally.

You'll likely have some issues with that horizontal resize and the rounded corners. You may want to simply redraw (as apposed to scale) each time the stage is resized. That way you can keep your corners consistent.
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

That's what I was afraid of - some intense actionscripting.

Ah well, I've been meaning to learn it eventually. I was hoping it wouldn't be under the pressure of a site build I'm already way behind schedule on, though...
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

heh one of the best ways to learn ;-) Good luck.
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

So true.. thanks for the help!
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6254
  • Loc: Seattle, WA

Post 3+ Months Ago

Are you working with AS2 or AS3? ActionScript 3 is a breeze. Very similar to Java, both syntactically and in the sense that it does most of the work for you ;)
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

I don't know.. I guess I got really spoiled by the tools that were available in AS2. For example, it was so easy to create simple rollover and click effects. I tried to do that in AS3 and finally gave up and switched to AS2 mode.

I'm glad to hear that you think AS3 is easy, though. I have very minimal experience with Java, but hopefully that'll help when I finally buckle down and start learning this stuff the right way.

Do you have any clues for where I should start with this stage sizing thing in AS3?

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.