Shadow around sprite

Is it possible to add a shadow around a whole sprite or individual controls, we added the sprite (in AS3)?

flash.filters.DropShadowFilter

should be what you're looking for. Here's a quick pseudo-code example:

import flash.filters.DropShadowFilter;

var dropShadowFilter:DropShadowFilter = new DropShadowFilter(distance:Number, angle:Number, color:uint, alpha:Number, blurX:Number, blurY:Number, strength:Number, quality:int, inner:Boolean, knockout:Boolean hideObject:Boolean);

var s:Sprite = new Sprite();
s.graphics.beginFill(0xFF0000, 1);
s.graphics.drawRect(0, 0, 10, 10);
s.graphics.endFill();
addChild(s);

s.filters = [dropShadowFilter];

More information: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/DropShadowFilter.ht...

Tags: BlackBerry Developers

Similar Questions

  • The shadow around a div

    Is it possible to put a shadow around a div?  or around the border of a div?  an image does not work (I don't think) because I want it to be scalable to different screen sizes and the width of the div is 80%...

    CSS Box-Shadow generator

    http://css3gen.com/box-shadow/

    Nancy O.

  • Hi, I seem to do the right thing to try to use kidnapping Spot to remove a few shadows around a photo portrait. But once I have select the Destination, then the Source by dragging the circles that nothing seems to happen. How to apply the Source?

    Use Clone. Opacity = 100%.

    THX

    Rishi

    Make sure you have selected "Clone" with opacity

    Click place tool once to the region of "Destination".

    Move the other circle on the 'Source' box (the key "/" automatically selects the other areas)

    Click on 'done '.

    You are doing a difficult job for Lightroom! This type of editing is best done in Photoshop.

  • verification of the shadows down using the desktop icon labels works not

    in windows xp, I tried to remove the shadow around the label of the icon and the mycomputer, properties, advanced, settings, dropshadows to use icon on the desktop check box labels don't market not delete.

    in windows xp, I tried to remove the shadow around the label of the icon and the mycomputer, properties, advanced, settings, dropshadows to use icon on the desktop check box labels don't market not delete.

    http://www.TomsHardware.com/Forum/25340-45-unable-remove-shadow-desktop-icons-Windows

  • Need a drop shadow of a Word .docs... Convert/import .docs to an OBJECT?

    Quite confusing... Sorry, I'm a noob to Indesign

    I would put some shadows around my Word docs. However, whenever I have import/place one, I am only import text + images. Drop a shadow puts him only on the whole of the text or the race,

    My other thought was to convert the .docs to PDF and then place them where I can easily put a shadow. Unfortunately, I can't change the text more

    Any help? Thank you!!

    J

    If you fill the text block with [paper] and apply the shadow I think you get what you want.

  • How can I remove shadow in the page master Muse?

    Hi, I'm trying to get rid of a drop shadow around the edge of the browser as a Muse. Simply unchecking the effect in the master page ("' effect > shadow" ") does not work. Cleared the cache of browsers, downloaded from the site of BC, verified the effect in various breakpoints, nothing seems to work. Anyone?

    Discovered this problem caused. In my master page - even without selecting something - the graphic style of an element with a shadow was applied, accidentally. I changed the graphic style in the whole of the page master to 'none' and that did the trick. Problem solved.

  • Start screen - just watch shadow like grey?

    I remember he was supposed to be a shadow around the screen splash area. But now, it's just a gray border. Looks like a bug to me.

    I'm on Windows 10.

    border-issue.jpg

    Its such a terrible image it is difficult to know if its deliberate or not, but I think they have it acknowledged as a mistake, not really a bug that will be fixed in a later version. Its compiled into a dll so that they can't just swap out for a png with transparency

    Terri

  • Shadows without distortion?

    Hi all

    I am trying to create a drop shadow in Illustrator for a logo. I thought that I understood using edges to feathers. Once I went to place the logo in another document, and resize the deformed feather logo. I would like to avoid having to change the settings every time I use the logo. I should mention that it is the shadow around the type with that I have a problem. Is it possible to flatten the shadow just to prevent it from deforming. I like to keep as a vector in addition. I'm sure it's a simple solution, but I feel like a newb here and get frustrated.

    Thanks for your help!

    Cyber Services logo (full).jpg

    cyberb67269457 wrote:

    Basically, when I resize the logo, gradient feather, I had in the original runs and is not as visible.

    When you place the file in InDesign or Photoshop, it won't happen.

    You can also place the Illustrator file in another file (linked, not embedded) Illustrator. Or you could do a symbol out of it.

    Even when the scale it that you might have trouble with resolution. Depends on how the chart will be scaling.

  • Add a shadow behind my clip?

    Hi I was on chat live adobe however they did not really help with this question.

    I am wanting to put a shadow behind an image similar to that of the attachment. Live support Adobe showed me how to add a shadow to an object (circle) using the technique of filling and outline, but I can't seem to do a real clip as the blue coral 1 photo. I would appreciate your help. As a learner Visual if there is access to a video, it would be appreciated!

    coral2.png

    Here is the image I'm trying to put a white shadow around.

    Apple.png

    If this Apple consists of 2 vector shapes, so it's simple.

    Group forms

    Select the group, and open the appearance Panel

    Add a line

    Drag the line under the content.

  • Shadow & grid

    1. How can I add a drop shadow around the outside of my photography.  I watched the Lynda.com tutorial but it shows how to make the 2 sides, not all four.  example http://www.youtube.com/watch?v=3mHJqJh9elQ

    2. below is a model of reason is trying to shadow in the example above.  How can I get ride of the motif pattern so I can clearly see what I'm doing right on a white background.         Thank you very much, Penni

    2.Screen Shot 2013-08-30 at 9.27.09 PM.png

    Make your shadow have a small 'Distance' and big enough 'Spread' and 'Size' and it will show around all the edges.

    If you want to see how it will look on a white background, create a layer of filling Uni which is all white and move it below the photo layer in the layers panel.

    -Christmas

  • Shadows edge animate...

    Then... limited are shadows on board animate?

    Maybe it's my naivety with HTML5/CSS etc and because I'm a designer drag-déposer I'm just waiting for that everything works as it does in Indesign, but I have several objects and forms I used as assets in a fun animation, until then good, but it would look so much cooler if each item had shadows.

    When I click on "shadow", he puts just a shadow around the frame of the object, not the object itself? can someone advise?

    If you use a transparent image the shadow is around the area, a square or a rectangle. You must put the shadow of your chart and save it to the web.

    If you use a form in AE it will go around the shape. Forms are limited on board.

  • URLRequest does not contain anything...

    Hi, I have an xml file that contains several products each with their corresponding background image, image in the foreground, text, and Web site. The LoadXML class load this xml file and creates an array of each image, text, and Web site. The main class loads then each image comes from the array of background images in the onBackgrLoad() method. This is done using a loop that traverses the array of circles (called background []) and charge each in turn. I have sucessfully on tracing background [] receive a string of all different background image paths. However when I look at the backgrRequest and the backgrLoader they both contain the null value. Images don't appear on scene, but either an error message appears! The same for onImageLoad (this should load the image in the foreground) and onTextLoad.

    Ive been stuck on this for SO LOOONG, its makes me crazy lol!

    public class Main extends Sprite 
        { 
            //____________________________________________________________________________Vars : Newly created 
     
            public var images : Vector.<DisplayObject>; 
            private var loaders : Vector.<Loader> = new Vector.<Loader>(); 
            private var loader : URLLoader = new URLLoader(); 
            private var backgr : Bitmap;  
            private var img : Bitmap; 
            private var titel : String; 
            private var cover : Sprite; 
    //        private var textContainer : Container_Text = new Container_Text(); 
     
            //____________________________________________________________________________Vars : From other classes 
            public var coverflow : CoverFlow;     
            private var bg : BG; 
            private var sb : ScrollPaneExample; 
            private var sl : ScrollLabels; 
            private var productSummaryLabel : ProductSummaryLabel; 
             public var loadXML:LoadXML; 
    //        private var reflection : Reflection;         
     
            private var xmlData : XML; 
            private var hintergrund : Array; 
            private var pfad : Array; 
            private var maxProducts : int;         
            private var numOfProducts : int;         
            private var numOfCategories : int; 
     
        //____________________________________________________________________________Constructor 
     
        public function Main() 
        { 
            initBG(); 
            trace("Step 0: New LoadXML being loaded in Main class"); 
            loadXML = new LoadXML(); 
            loadXML.addEventListener( Event.COMPLETE, onBackgrLoad); 
            trace("Test: XML Load Number of Products (Main class): " + numOfProducts); 
        } 
     
        //____________________________________________________________________________Methods 
     
        // Loads the backgr for each image. 
        private function onBackgrLoad(e : Event) : void // will this be a prob seein as class is sprite?? 
        { 
                var backgrLoader : Loader = new Loader(); 
                var xmlData : XML = loadXML.getXMLData();  
                var hintergrund : Array = loadXML.getBackgr();     
                var numOfProducts : int = loadXML.getNumOfProducts();         
                trace("Number of Products (Main class): " + numOfProducts); 
                trace("Hintergrund paths (Main class): " + hintergrund); 
     
                // On completetion of this method or in case of an error do the following: 
                backgrLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad); 
                backgrLoader.addEventListener(IOErrorEvent.IO_ERROR, handleXMLError); // try takin this out: contentLoaderInfo. 
     
                trace("Step 5: Backgr images now being loaded."); 
     
                /* Create a template bitmap to hold the image info */     
                var templateBitmap : Bitmap; 
                var templateBitmapData : BitmapData;     
     
                // Loop through the background urls 
                // A summary should appear for each object once it is in the center 
                for (var i : int = 0; i < numOfProducts; i++) 
                 { 
                    var backgrRequest : URLRequest = new URLRequest(hintergrund[i]); 
                    trace("Hintergrund[i]: " + hintergrund[i]); 
                    trace("Trace backgrRequest: " + backgrRequest); 
                    cover = new Sprite();   
    // Method 1 
                    // titel = String(e.target.data); 
     
                    // Method 2 
    //                var titelString : String = titel[i]; // has to be a dynamic string so change this and put in container 
    //                trace(titelString); 
     
                    // Method 3 
    //                var titel : TextField = event.target.String as TextField; // this is text so import as textfield? can i do this like this? 
            //titel shud be rotated. this can be done using bevel filter bt atm not supporting this (look at reflection probs) 
                        try  
                    { 
                        backgrLoader.load(backgrRequest); 
                        trace("Trace backgrLoader: " + backgrLoader.content); 
                    } catch (error: ArgumentError) { 
                        trace("An Argument Error has occurred."); 
                    } catch (error: SecurityError) { 
                        trace("A Security Error has occurred."); 
                    } catch (error: Error) {  
                        trace("An Error has occurred."); 
                    } 
                    trace("onBackgrLoad Loop: " + i); 
     
                    templateBitmap = Bitmap(backgrLoader.content); 
                    //templateBitmap = e.target.content; 
                    //templateBitmapData = templateBitmap.bitmapData; 
     
                    /* Attach the template BitmapData to each backgr image */                 
                    var backgrBitmap : Bitmap = new Bitmap(templateBitmapData);                 
                    cover.addChildAt(backgrBitmap, 0);                            
    //                coverHolder.addChild(cover);    
     
                    // Method 1: target data into bitmap 
    //                var backgrBitmap : Bitmap = e.target.data as Bitmap; 
                    // Adds the backgr to the already exisiting backgrs inside the Bitmap "backgr" 
    //                backgr += e.target.content as Bitmap; 
                    //var myNewBackgr = e.target.loader; // Necessary? 
     
     
                    // Method 2: create object 
                    //BAD IDEA to create a bitmap obj since this cant be rotated or tweened 
    //                var backgrObj : Object = backgrLoader.data as Object; or //e.target.data 
     
                    // Method : Imagemultiloader 
    //                var backgrBitmap : Object = (e.target as ImageMultiLoader).data 
    //                // determine imagemultiloader!! 
     
     
                    // Method 3: create template bitmap     
                    ///* Create a template bitmap to hold the image info */     
    //                var templateBitmap:Bitmap = e.target.content;     
    //                var templateBitmapData:BitmapData = templateBitmap.bitmapData;     
    //                /* Loop through your tiles */     
    //                for (var a:uint = 0; a < tilesWide; a++)     
    //                {        
    //                    for (var b:uint = 0; b < tilesHigh; b++)        
    //                    {                
    //                        var tile:Sprite = new Sprite();            
    //                        /* Attach the template BitmapData to each tile */                 
    //                        var tileBitmap:Bitmap = new Bitmap(templateBitmapData);                 
    //                        tile.addChild(tileBitmap);                 
    //                        tile.x = a * tile.width;                 
    //                        tile.y = b * tile.height;                 
    //                        tileHolder.addChild(tile);         
    //                    }     
    //                } 
     
                    // Method 4: Load straight into BitmapData 
                    //var img1:BitmapData = BitmapData.loadBitmap("img2")  
                    //var img2:BitmapData = new BitmapData(img1.width, img1.height, false)  
     
                    // Method 5: Try with image holder 
                                    // Try with an image holder.   
    //                backgrMc = imgHolder; 
     
    //                var backgr : Bitmap = Bitmap(e.target.content); 
    //                 
    //                try { 
    //                cover.removeChildAt(0); // should i take this out to ensure not just last image loads? 
    //                } catch (error: Error) { 
    //                    trace("Catch error here."); 
    //                   } 
    //                cover.addChildAt(backgr, 0);  
                } 
            } 
     
                public function onImageLoad(e : Event) : void 
            {             
                (...)        } 
     
        public function onImageLoaded(event : Event) : void 
        { 
    //        var xmlProductList : XML = xmlData.produkte.produkt;  
    //        var xml : XML = new XML(event.target.data); // will this work now tht there r 3 things loaded? 
     
                    // To create a shadow only UNDER the backgr image 
            backgr.filters = [new DropShadowFilter()];  //can this var backgr be used from above? i put them on public 
     
     
     
     
            // Turn xml data into three seperate Bitmap images and put this in a cover 
            // Insert all the images on top of each other in a single cover 
    //        cover.addChildAt(backgr, 0); // At the back 
    //        cover.addChildAt(img, 1); // On top 
    //        cover.addChildAt(titel, 2); // On top // IS THIS POSSIBLE 
     
     
     
     
            //To create a shadow around the side of the whole image and the bottom 
    //        cover.filters = [new DropShadowFilter()]; 
     
            // Ensure cover is 20px smaller height + width 
     
    //        coverDisplayX = -backgr.width / 2; // backgr is equal to whole image size so not necessary to speicify whole img 
    //        coverDisplayY = -backgr.height / 2; 
    //        coverDistanceX = -50; 
    //        coverDistanceY = -50; 
     
            backgr.x = -backgr.width / 2; 
            backgr.y = -backgr.height / 2; // Height is too long but I managed to decrease pix to 75% 
    //        cover.graphics.lineStyle(0, 0xFFFFFF); // Border around image 
            cover.graphics.drawRect(backgr.x, backgr.y, backgr.width, backgr.height); 
            images.push(cover); //  images.push(imageLoader.content); 
     
     
            // Initiate the rest of the methods 
     
                // The nr of images on coverflow should not be more than number allowed on stage.  
                if(images.length <= maxProducts) // Used to be == 
                { 
                    initCoverflow(); 
                } 
                else 
                { 
                    trace("More images than the maxProducts stated by user. Please increase the maxProduct nr or delete some images."); 
                } 
        }  
     
     
        //____________________________________________________________________________Initiations 
     
        private function initCoverflow() : void 
        { 
            if(coverflow)  
            { 
                removeChild(coverflow); 
                coverflow = null; 
            } 
            coverflow = new CoverFlow(images); 
            coverflow.x = stage.stageWidth / 2; 
            coverflow.y = stage.stageHeight / 2; 
            addChildAt(coverflow, 1); 
        } 
     
    (...)  
            //____________________________________________________________________________Error catching 
     
     
            private function handleXMLError( event:IOErrorEvent ):void  
              { 
                 trace("Fehler beim Aufrufen von XML."); 
              } 
        } 
    }  
    
    

    Why do you need to pass the event to the drawCover at all? You can just do:

    public function onBackgrLoaded(event : Event) : void {
         cover = new Sprite();
         backgrBitmap = event.target.content as Bitmap;
         cover.addChildAt(backgrBitmap, 0);
         // How do I call the method drawCover to load once this method is finished????
         drawCover();
     }
    

    But if you insist, you drawCover function should look like this:

    private void drawCover(e:Event):void

    or:

    private void drawCover(e:Event_=_null):void

  • Problems with the auto-completion pop-up, flashing on

    I just upgraded to 18.0.1 on my Windows 7 64-bit OS. When I start typing in something in an entry box or the address bar the pop-up window that appears to show me what I typed in the past (I'm the appellant autocomplete popup) glitters in the market. It happens for a split second, then disappears, but the shadow around the area there. It flashes during a split second when I use my arrows or the mouse to move through the list, but I don't know what I choose. It's almost as if it times out, but the shadow around the box is running.

    Any whey ideas what is happening.

    Try disabling hardware acceleration in Firefox.

  • Question / problems with the TV Toshiba 40TL938 (40TL938F)

    Hello world
    I bought the Toshiba TV 40TL938 french version (40TL938F), in an online store.

    I have a few question / problem and I hope you could help me.
    -When I play subtitles embedded video MKV files via USB, works well, but for me, they are too small, too thin and too white. I can make them biger, more large and with a black shadow around him? If so, how could I do that?
    -When I play MKV via DLNA (with XBMC) video files, there are no subtitles more. Whose fault is this? My TV? XBMC? Do you think, how can I fix?
    -does anyone know if DTS will be supported sooner or later in 2012 toshiba TV models such as my 40TL938

    Thank you very much in advance for your help!
    Backslash
    French user of a beautiful Full HD 3D 40 inch toshiba LED TV :)

    > when I play subtitles embedded video MKV files via USB, works well, but for me, they are too small, too thin and too white. I can make them biger, more large and with a black shadow around him? If so, how could I do that?

    76 user manual page:
    http://www.Toshiba-OM.NET/LCD/PDF/English/TL938-4046-English.PDF
    You will need to check the option: + Subtitle + type

    > when I play MKV via DLNA (with XBMC) video files, there is no subtitles more. Whose fault is this? My TV? XBMC? Do you think, how can I fix?
    I guess this isn't taken in charge by using DLNA

    > does anyone know if DTS will be supported sooner or later in 2012 toshiba TV models such as my 40TL938
    I have found no information about the DTS :(

  • IdeaPad Yoga 13 - HDMI of bad image quality on the TV 1080 p screen?

    Hi people, I have recently connected my Yoga via HDMI to my TV Samsung 40 ". Unfortunately, the image quality does not as good as my old T61 via VGA hooked up to my TV. Image via HDMI on my TV has some sort of "shadows" around the edges at all. I use a HDMI Basics Amazon cable that is capable of 3D and Ethernet over HDMI - I think this cable should be ok.

    Did it someone else faced with problems with the picture quality of the Yoga on a TV via HDMI before?

    Just for completeness: it was my TV sharpness settings. I had to turn off completely disable the artifacts.

Maybe you are looking for

  • How to make a material test

    I have a 27-inch iMac made in middle of 2010 running os 10.11.5 and wish to proceed with a trial of material.  When I hold down the option key + d I get a message that my mac cannot run and then test. Thank you

  • My new tab: + or Ctrl + T doesn't work anymore. How should I do?

    Perform the + tab at the top right in the browser or by using the ctl & T keys or using new tab in the file Drop Down Menu no longer works. Any ideas?

  • Is itunes in the cloud included in Apple music?

    I have iTunes in the cloud and thought I read that Apple music included this feature.  I don't want to pay for both, but I can't find a definitive indication that it's included.  I'm on my trial of Apple music and just had to pay to renew the iTunes

  • Briefcase auto starts at startup.

    When I start XP for some reason towel opens. I tried to find startup programs in msconfig, but do not see it.Does anyone know how to stop this?Thank you

  • I excluded the Lic of end and I still cannot download updates

    That's what I get for an error message when I try to download all of their failure. Update of security for Microsoft Office 2003 (KB2509503) error Code: 0 x 80070643 Update for Microsoft Word Viewer 2003 (KB978558) error Code: 0 x 80070643 Update for