# Use HTML/JS to mask my swf?

**URL:** <https://forum.kirupa.com/t/use-html-js-to-mask-my-swf/281080>\
**Category:** Uncategorized\
**Created:** [February 4, 2009, 6:22pm UTC](https://forum.kirupa.com/t/use-html-js-to-mask-my-swf/281080 "2009-02-04T18:22:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntifreezeDesig](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@AntifreezeDesig](https://forum.kirupa.com/u/AntifreezeDesig)\
**Post date:** [February 4, 2009, 6:22pm UTC](https://forum.kirupa.com/t/use-html-js-to-mask-my-swf/281080/1 "2009-02-04T18:22:06Z")

</div>

I’d like to make a swf oversized (like 2000px sq), load an image (e.g. 500px x 500px) and use the HTML to crop [not scale] my swf down to the correct size. Is there any way to do this with HTML/javascript?

Basically, my client needs to have a flash module/component that can accommodate differing sizes of images, and can be correctly cropped (I’m assuming with the obj/embed tags, or some sort of div) without needing to use any Flash. Is this possible?

Even better:: What about something that can do it automatically? (like a javascript that reads the spec from an XML, or something.)

Thanks for any input. When responding, note that I’m AS3.0 proficent, but rarely venture into the HTML/javascript world.
