A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Is this possible

  1. #1
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55

    Is this possible

    So lets say i have 2 swfs, one of which is the primary site (A), 1 of which is only triggered for certain frames (B).

    If B is be default set to a height of 1px and 100% width, and it contains nothing more than a LocalConnection listener class, would it be possible to load a child swf that has a height of 250px and have it expand the page vertically?

    Also with that in mind, if that first part is feasable, would it then be possible to get the dimensions of the child swf that is being loaded, and send them via javascript to toggle a div container to display to the childs height?

    Any other suggestions on best methods to approach a scenario like this?

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Set your stage scaleMode to no resize. Then load in your second swf and position it's y-coordinate at 0. Use ExternalInterface to send the height of swf A out to a javascript function and have javascript resize the plugin and surrounding page layout. The only part I'm not positive about is having js affect the plugin object after it's rendered...I suspect you'll get into trouble with different browsers that way.

    Alternately, you could just put swf B into a 250px div that is hidden and when swf A finishes loading, call a js function to unhide the div...I suspect you'll get better luck with that approach.

  3. #3
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55
    the problem with that approach is that swf B is a variable height, sometimes it'll be like 200px tall, other times it will be 400px tall.

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    You should be able to get away with setting no-resize in your AS, and then setting the plugin to 100% height...then resize the div...

  5. #5
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    % is referring only to the browser size. It does not change the actual movie size. Your parent movie needs to be of the same size as your childmovie or larger.
    - The right of the People to create Flash movies shall not be infringed. -

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