Hi All,
I've run into a fairly frustrating problem and my general ignorance of
UI stuff is keeping me from making progress.
Here's the issue:
I have an image in a swf that I want to use as the background image
for a floating canvas. If I add it to the canvas as  a
backgroundImage, then it shows up but at the wrong size (it has scale9
stuff built into the swf, but that seems to do nothing). I need two
things.
1. I need the background image to scale to the appropriate size of the
window.
2. Portions of the background image have alpha set to 0, so they are
invisible. I have a system in place that makes the canvas draggable
within some bounds. I would like it if I could make it ignore any
interactions with the canvas in areas where the alpha is set to zero.
Can this be done with a mask or through some other means and if so, how?

Since I was having so much trouble with adding the image as the
backgroundImage property/ or as a child in the mxml, I resorted to
creating a manager that would call an function init() on the window
when all was good to go. The following code was in the init method,
and did succeed in resizing the canvas but not to the correct
proportions/ also the x & y positions of the image are way off from
the 0, 0 coordinate of the parent container. here's a little of the code:

public override function init():void{
         super.init();
        if(skinImageSrc != null){
                skinImage = new Image();
                skinImage.source = skinImageSrc;
                skinImage.autoLoad = true;
                skinImage.scaleContent = true;
                this.addChildAt(skinImage, 0);
                skinImage.height = this.height;
                skinImage.width = this.width;
         }
}       

Any help/suggestions would be greatly appreciated.
Thanx,
Sam


Reply via email to