--- In [email protected], "rdibona" <rdib...@...> wrote: > > Thanks for the reply. > > Assuming that I am willing to take the risk of the server going down (the > images are stored on Amazon S3 so they are pretty safe), how can I have a > backgroundimage check the policy file, using LoaderContext or otherwise? > > This is an app that has been working great for over 2 years and only with one > of the latest releases of flash did this break so I am scrambling to try and > fix it. The reason I can't really do it as an image with a child index of 0 > is because the user can click things and drag them around and I don't want > them to accidentally drag the background image -- I'd have to write a bunch > of code to work through that scenario so I'd like to exhaust all other > options first.
Try this: Create a Class that extends Image, and create another Class that extends whatever Container you're using. Give the Class to the Container as the background image. I haven't been in the Container/HaloBorder code lately, so I can't tell you specifically where to look (updateDisplayList or commitProperties would be good guesses), but you want to find the logic where the Container takes the Class that you passed in and makes an instance of it to use as a background. At that point, you want to give the instance of your Class a path to the Image. Where this approach is problematic is that the Image will not load the file instantly, so it won't be able to report its size immediately, which may cause layout issues. If you know the size of the image in advance, it's probably easiest to just hard code the image size into the extended Image. If not, you may want to preload it somewhere else and measure it. HTH; Amy

