466 posts
  • Has been part of the Envato Community for over 5 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+5 more
uiuxaesthetics says

hey anyone know how to resize a swf on the fly with as3 and also update the embedded swf in the html.

510 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
pxt says

You can load the SWF into a loader and then put the loader into a movieclip and then resize the movieclip. The new swf can then simply be embedded into a HTML file.

1162 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Had an item featured in an Envato Bundle
+4 more
FlashTang says
on the fly

What “on the fly” mean? real time ?

I don’t know if it’s your needed :

Search browsercanvas use google ;)

466 posts
  • Has been part of the Envato Community for over 5 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+5 more
uiuxaesthetics says

looks like you use the external inteface and tell javascript to change the width and height of the embedded swf.

178 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
Luisreyesdev says

Put this file in the page

http://s3.envato.com/files/223733/js/div_resize.js

and call the function you want from Flash using ExternalInterface.

Open the js file to see the functions you need.

466 posts
  • Has been part of the Envato Community for over 5 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+5 more
uiuxaesthetics says

hell ya dude! I think that is it, I just stumbled on this post the same time you replied. http://danielmclaren.net/2008/04/expanding-resizing-a-flash-swf-using-javascript

466 posts
  • Has been part of the Envato Community for over 5 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+5 more
uiuxaesthetics says

Thanks PJ !

178 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
Luisreyesdev says

You would make your swf be

StageAlign = Top-Left

ScaleMode=NoScale

Then have a function call the JS from My previous post. You could do something similar with JQuery to resize the div with animation.

1162 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Had an item featured in an Envato Bundle
+4 more
FlashTang says
178 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
Luisreyesdev says
Thanks PJ !

NP!

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by