Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding borders to dynamically loaded jpgs

Status
Not open for further replies.

cu92

Technical User
Feb 11, 2003
6
GB
Hello

I am quite new to MX - was wondering if I could do this and whether it would be relatively straight-forward.

I have a slideshow that imports 12 different sized external jpg images. I would like to have a 1 pixel wide black border exactly around these images when they are viewed. I could put this black border onto the images using Photoshop but I would much rather do this 'on the fly' in Flash. I have done this kind of thing in html pages - where the border expands or shrinks round an image when it is loaded.

Hope that makes sense

Thanks
 
ok no code just the algorithm


1. make sure that you have a preloader for the clip loading the jpegs as you cant access their properties until fully loaded

2. have a function to draw a rectangle whose dimensions equal the loaded pic ( use _x, _y, _width, _height) using lineto, linestyle etc

3. call the function from the line in your preloader where its all loaded.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top