465 posts
  • Bought between 100 and 499 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 100 000 and 250 000 dollars
  • United States
CurtyCurt 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
  • Beta Tester
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 1 000 and 5 000 dollars
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
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Referred between 10 and 49 users
  • Bought between 50 and 99 items
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
  • Bought between 100 and 499 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 100 000 and 250 000 dollars
  • United States
CurtyCurt says

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

178 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • United States
pixeljunkyard 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
  • Bought between 100 and 499 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 100 000 and 250 000 dollars
  • United States
CurtyCurt 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
  • Bought between 100 and 499 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 100 000 and 250 000 dollars
  • United States
CurtyCurt says

Thanks PJ !

178 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • United States
pixeljunkyard 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
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Referred between 10 and 49 users
  • Bought between 50 and 99 items
FlashTang says
178 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • United States
pixeljunkyard says
Thanks PJ !

NP!

by
by
by
by
by
by