Tip:
Highlight text to annotate it
X
>>YAN HUANG: Hey! So for all the techheads out there who are working with Flash files,
or SWF files,
and you don’t know the width or the height---the dimensions of the file---and you try to guess...
you’re just one pixel off, and the JPEGs inside the Flash object are pixelated. That’s
a problem.
To figure out the dimensions without any external software that you need to install, basically
all you really need
is a Web server that supports PHP. There’s a function called Get Image Size in PHP that
will
give you the dimensions in array---the width and the height.
It’s actually meant for images, but it works for Flash objects as well. So once you have
the width and the height,
you can just plug that into your object embed code. Voila! You have the actual dimensions
of your SWF file.
The cool thing is, if you actually have a gallery of Flash objects, you can actually
make that dynamic,
and just have it so so you use PHP to grab the dimensions of each of those files, if
you’re trying to make a gallery of some sort.
Just to throw out there!
Hopefully you found this helpful if you were trying to figure out the dimensions---but
you couldn’t---of your SWF file.
Also, I’ll be providing the code, so if you click down here, there will be a link
to my blog. Just go ahead and click on that.
You can copy and paste the code directly from my blog, so you don’t have to recreate anything.
If you’ve liked this video, please, please Like this. Post a comment, say “I love this
video.”
Go to my blog, click on Like for my Facebook, click on 1+ for my Google+, and add yourself
to my newsletter subscription.