465 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items 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 4 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.

1161 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 ;)

465 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items 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 4 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.

465 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items 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

465 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+5 more
uiuxaesthetics says

Thanks PJ !

178 posts
  • Has been part of the Envato Community for over 4 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.

1161 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 4 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!

by
by
by
by
by
by