Quite simply you can create a VBox, HBox or Canvas, add a SWFloader
then add a UIcomponent to draw what you want, stacking order is all
based on adding Children to the display object. Here's a sample of
some code I used to add a horizontal Gradient Bar inside and HBox for
a poll and quiz app... I hope this helps you out.

Patrick




var myUIComponent:UIComponent = new UIComponent;
                                tileHolder.addChild(myUIComponent);
                                var colors:Array = [0xFEAF39,0xFF9900];
                                var barHeight:Number = 25;
                                var barWidth:Number = 270;
                                
                                if (leftMove==true) imageHolder.width = 0;
                                if (leftMove!=true) barWidth = (barWidth - 
imageHolder.width);
                                
                                textHolder.width = barWidth;
                                textHolder.maxWidth = barWidth;
                                
                                if (yesno==true) colors = [0xBD0202,0xFF0000];
                                if ((yesno==true)&&(i%2!=1)) colors = 
[0x009900,0x00FF00];
                                
                                if (quiz==true) colors = [0xBD0202,0xFF0000];
                                if ((quiz==true)&&(setCorrect==true)) colors = 
[0x009900,0x00FF00]; 
                                
                                var _backSprite:Sprite = new Sprite();
                                var matrix:Matrix = new Matrix();
                                
                                
matrix.createGradientBox(barWidth,barHeight,0,0,0);
                                
                                var alphasGrey:Array = [10,10];
                                var ratiosGrey:Array = [0x00,0xFF];
                                var colorsGrey:Array = [0xCCCCCC,0x666666]; 
                                _backSprite.graphics.lineStyle();
                        
_backSprite.graphics.beginGradientFill(GradientType.LINEAR,colorsGrey,alphas,ratiosGrey,matrix);
                                
_backSprite.graphics.drawRect(0,0,barWidth,barHeight+2);
                                _backSprite.graphics.endFill();
                                _backSprite.alpha=.2;

--- In [email protected], "dodger6135396" <[EMAIL PROTECTED]>
wrote:
>
> Using ActionScript3.0 and Flex2.0.1 I want to display an image
> /photograph. Then I want to draw shapes on top of this image, but I
> dont want to alter the image. For example the  image would be located
> at x=0, y=0, width = 320 and height = 240, then at a Z order higher
> above the image a transparent something located at the same
> coordinates would allow the user to highlight parts of the image.
> Please is this even possible?. Is there a technique for doing this?.
> 
> Thanks in anticipation.
>


Reply via email to