How can I tile an image on stage to fill the background using AS3?

Hi,
I have a small image which is to be tiled on background filling it completely. How can I code it?
Thanks.

I don't know if you cna draw directly to the stage or not (i think not) but this would do the job
package
          import flash.display.Bitmap;
          import flash.display.Sprite;
          import flash.events.Event;
          public class Main extends Sprite
                    [Embed(source="flash.png")]
                    private var Picture:Class;
                    public function Main():void
                              if (stage)
                                        init();
                              else
                                        addEventListener(Event.ADDED_TO_STAGE, init);
                    public function init(e:Event = null):void
                              removeEventListener(Event.ADDED_TO_STAGE, init);
                              var background:Sprite = new Sprite();
                              addChild(background);
                              var image:Bitmap = new Picture();
                              background.graphics.beginBitmapFill(image.bitmapData);
                              background.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
                              background.graphics.endFill();

Similar Messages

  • I am using an Macbook pro in conjunction with a Time Capsule. I back up all my aperture librarys on it, but how can i view these images that are stored on the capsule please ??

    I am using an Macbook pro in conjunction with a Time Capsule. I back up all my aperture librarys on it, but how can i view these images that are stored on the capsule please ??

    If you want to see what is in a file that is backed up by time machine then you have to restore the entire file. Having said that I have had good experience with Time Machine and individual files... if the file is there then all of it's components are almost for sure there. A way to get around this in Aperture would be to use referenced images. The images then still exist as individual files and can be backed up and restored individually. You would have to do so on a file by file basis though and your album information would still only be saved within the Aperture library.

  • My macpro runs slow with or without internet on..... How can I find out if something is running in the background?

    my macpro runs slow with or without internet on..... How can I find out if something is running in the background?

    Please boot in safe mode and test. Still slow? If you connect to a wireless network, you may have to connect with Ethernet in safe mode.
    After testing, reboot as usual (not in safe mode.)
    Mac OS X: Starting up in Safe Mode

  • How can I put a vertical menu ON TOP OF the background image?

    I've taken a screenshot to describe my problem.
    http://i48.tinypic.com/10ndeg4.jpg
    I want to put the menu on top of the background image. Compare it to placing another image on top of the background image. HOW on earth can I do this?

    Did you try putting the image in a <div> and setting the background image for the <div> with CSS.  Then within the <div> place your menu.
    Just a thought.
    LJD

  • How can i convert an image into gif file as jpeg by using com.sun.image.*

    please help me to convert an image into gif format. i have used sun's impl com.sun.image.code.jpeg package to convert a buffered image into a jpeg file. is there any implementatioln available from sun to handle gif files.

    Many. Try for instance google with 'java image encoders'. Go to the URL http://www.google.com/search?q=java+image+encoders and be amazed of the wonders of modern web search tools.

  • How can I permanently stop Backup Asisstant from running in the background?

    Backup Asisstant plus is constantly running in the background of my phone. It is annoying and I can not even open it up under the "manage accounts" section of my phone. When I do this it just has the blue circle spinning forever and ever never openning up at all. Is there a way to fix this or am I just stuck battling this stupid app day after day. It came with the Verizon phone, but I had this before and customer service was able to stop it from running all the time. Now I get told there is nothing Verizon can do. So how can I stop this app permanently and why is there so much comflicting information coming from Verizon agents and its website? I cant seem to get a solid answer.

    I have a galaxy s3. The backup assistant just freezes my phone. It is always running in the background draining memory from my phone slowing it down. It is beyond annoying since even after a hard reset I can not even access the Backup Assistant + to manually change settings, so I would just like it to stay off. It has not helped me recover much in the way it was advertised.

  • How can I get rid of these grey lines in the background of my pages documents?

    I bought an app out of the store that game me new templates to use in pages. I used one of the templates in making invitations for my little cousins birthday party but now there are these grey lines in the background that I cant get to go away. any suggestiions?
    thanks!

    "the store", "these grey lines"? You realise we can't see what you see. Could you describe the problem and the templates better? If you bought the templates from the MAS, which ones are they?
    Perhaps they are just locked objects.
    Can you click on them?
    Menu > Arrange > Unlock
    They may also be master objects:
    Menu > Format > Advanced > Make Master Objects selectable
    Peter

  • How can I keep pictures images from  opening up in the body of an email

    Every time I attach a pic in mac mail, it opens in the body of the email.  I never had this issue with Outlook.
    I typically attach several pics at a time, the email becomes very messy.  Any suggestions on how to keep it from opening.
    I am using jpeg images.
    Plantguy1

    It depends.
    When you copy an image from a website in Firefox (right-click > Copy Image), Firefox stores the HTML code that website is using to display the image. Then when you paste into Yahoo mail, Yahoo uses that code to display the image in your message, by linking out to the source site.
    However, if you copy the image from a source other than a web page, Yahoo mail (webmail interface) can't use this technique and although it sometimes seems to show the image in the post, when I send, I just get a strange "inline image" notation in its place.
    If you access your Yahoo mail on a device in a dedicated mail client, then you usually would have more options because the mail program will encode the image into the message.

  • How can we get an image of selected area of the front panel

    i am plotting some graphs and want a group photo of all those in one shot is it possible????
    n i want to get the graph coordinates on the mouse click.....
    i.e when i click on the graph at any place the values corresponding to it must be retrieved. how do we do that,,...
    i have tried with the labview help but didnt get any help
    help please????????

    Here's a start.  This will get the front panel image and display it as a picture indicator.
    You could use an event structure to capture the mouse clicks on the picture control to set the image area.  Then using the mouse coordinates (referenced from the image coordinates), you can get the image subset "Get Image Subset.vi".
    Message Edited by vt92 on 04-20-2010 08:30 AM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • How can you print mirror image from word 2010 on the HP Photosmart c310 printer

    Trying to print mirror image from Microsoft 2010 on a windows 7 computer to the HP Photosmart C310 printer. Can not find an option. Please advise.

    Judith
    Perhaps you can enlighten us as to what "does not print correctly" actually means.
    Miss-spells your name? or what?
    How have you set up your Page set-up?
    It has to agree with how you are feeding the envelope in and what printer driver you are using.
    Peter

  • Mail, how can you remove an image that shows up in the header?

    I have no idea how this image got where it is, but I would like to remove it. When I open Mail, I see in the address area of the email as it displays in the message viewer, to the very right of that area, there is an image, that I have no idea how it got there or how to remove. The following is a link (I think) Mail/Users/alaska_juliens/Desktop/Picture 7.png ...... that shows what I am talking about. I have gone through my signatures and made sure that image isn't in there and it isn't. Please help, it is driving my husband nuts, we would love to change the image to his company logo if possible, but we don't know if that image even shows up when others receive email from us or not (we email ourselves and it is right there in the address header of the email). Thank you for your time and help.
    Mail/Users/alaska_juliens/Desktop/Picture 7.png

    Typically what shows up there is the address book picture for that contact. If they attach an image it will be added to the address book.
    So go to the contact in address book and change or delete the image.

  • How can i change my AppleID in iCloud to match the one used on iPhone

    My iPhone and iCloud are no longer syncing after the IOS 7 update, and I think its because my iCloud AppleID was automatically set up with icloud in the name, different from my previous ID which had mac in the name. But I cannot find a way to quickly change this.

    Welcome to the Apple community.
    If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple ID.
    This feature has been introduced to make stolen phones useless to those that have stolen them.
    However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details.
    The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device.
    You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
    This article provides more information about Activation Lock.

  • How do I view multiple images from different projects at the same time?

    Hello
    I've been trying to find the answer in the user manual, but no luck so far.
    I did find how to open 2 projects at once, but I can only see one image at a time in the viewer and I have to keep going back and forth between projects to compare images. (These are scans of old photos and I want to eliminate the ones that are poorer quality, so need to compare numerous images from 2 sets of scans)
    How can I view an image from one project at the same time as an image from another? I know that it can be done in the same project by apple-clicking the second, third etc image, but this doesn't work if the images are from different projects.
    Thank you
    Elizabeth

    Thank you again Tony
    I've now created an album, independent of the projects, and dragged test images into it and it does just the job I needed. Now i just need to keep my brain sorted with which ones are which while i'm working
    Elizabeth

  • How can I make an image placed in the body tag expand to the entire width of the browser?

    How can I make an image placed in the body tag expand to the entire width of the browser?I

    background-repeat -- best used with small image tiles.
    background-gradient  - Ultimate CSS Gradient Generator - ColorZilla.com
    background-size:cover - Resizable Full Page Background Image
    Nancy O.

  • How can i control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?

    Sup buddies,
    How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
    As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
    needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
    all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
    TY...Over N Out... 

    hello, kiwi
    quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
    yes.
    maybe,...
    1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    or,
    2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
    another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
    victor

Maybe you are looking for

  • When to use what facelet file

    hello sir 1. I have developed one project , where different types of facelet pages are created. but i m confused, what is the rule to use these facelet file , different options displays are as : new Facelet Composition Page new Facelet Footer new Fac

  • Fetch the records based on number

    Hi experts,     I have a req like if user give input as 5..it should fetch 5 records from database. for example database values are SERNR                MATNR 101                                              A 102                                     

  • Complex form layout and PPR

    I have a form containing several other ADF Faces components. The first component is a selectOneChoice and I use it to trigger a PPR request. The purpose of this request is to conditionnally re-display the jsf components according to the selection (hi

  • Can't activate personnal hotpot

    Hi, I can't activate activate the personnal hotspot on my iPhone, I hope you will be able to help me. Here is the different datas, and things I have tried. iPhone 3GS 5.0.1 Carrier SFR (France) (peronnal hotspot option enabled) Problem : The Personna

  • Installing Oracle Portal on 2000

    Can someone help me executing oracle portal after it has been installed on Win 2000. When I try to access it - I get error Forbidden You don't have permission to access /pls/portal30/portal30.home Help!! Samit