How would I create for example a happy face?

I would I go so doing/creating lets say a happy face using drawRect and lines and such? I know how to get The eyes and the circle. But not the mouth smiling. I also wanna try to do it when I click a button it will frown instead of smile. Which is easy. All I need to figure out how the happy face can be done.

public void paint(Graphics g)
   g.drawArc(int x, int y, int width, int height, int startDegrees, int arcDegrees);
}good luck

Similar Messages

  • How would I create buttons states for MCs I am creating abstract MCs

    I am creating a generic website that would have abstract MCs that would load jpg or TXT fields for the user interface to allow for fast updates to the site. The MCs that would make up the user interface would be empty and load things into it using XML or PHP later on. How would I create button states for the user interface MCs.  I started creating a function for every MC button state but I thought there might be a more efficient way.
    would creating a array help in this case?
    and is using URLRequest the way to link to pages with in a movie well the flash movie that is the site it's self?
    /*---------------------------- THE START OF MY ACTION SCRIPT ------------------------------*/
    var waywardLogo_mc:MovieClip = new MovieClip;
    var theCollection_mc:MovieClip = new MovieClip;
    var newsPage_mc:MovieClip = new MovieClip;
    var whatthe#$@!doyouwant!?_mc:MovieClip = new MovieClip;
    /*---------------------------- onOver ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    theCollection_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    newspage_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    /*---------------------------- onOut ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    theCollection_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    newspage_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    /*---------------------------- onClick ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.CLICK,onClick);
    theCollection_mc.addEventListener(MouseEvent.CLICK,onClick);
    newspage_mc.addEventListener(MouseEvent.CLICK,onClick);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.CLICK,onClick);
    function onOver(event:MouseEvent):void
    event.target.alpha = .5;
    function onOut(event:MouseEvent):void
    event.target.alpha = 1;
    function onClick(event:MouseEvent):void
    event.target.URLRequest("");
    /*---------------------------- onover, onOut, onClick buttonModes ------------------------------*/
    waywardLogo_mc.buttonMode = true;
    theCollection_mc.buttonMode = true;
    newspage_mc.buttonMode = true;
    whatthe#$@!doyouwant!?_mc.buttonMode = true;

    click insert/new symbol, tick movieclip, assign a name, tick export for actionscript and in the class textfield enter a name (say ButtonClass) and click ok.
    attached to the first frame of your new movieclip, type stop() in the actions panel.  put whatever graphic you want on-stage for your button's up stage.  create another keyframe, label it "over" and put whatever graphic you want for button's over state on-stage.
    in a layer above those graphics, you'll probably want to add a dynamic textfield so each of your buttons can have different text.  assign the textfield and instance name (say tf) and extend its timeline to the last frame of your movieclip button.
    then when you want to create a button, on your timeline you can use:
    var b:ButtonClass=new ButtonClass();  // these two lines need to be entered for each button
    buttonhandlerF(b,someX,someY);
    //-------code between dotted lines only needs to be entered once no matter how many buttons you add --------------------
    function buttonhandlerF(b:ButtonClass,x:Number,y:Number){
    b.addEventListener(MouseEvent.MOUSE_OVER,overF);
    b.addEventListener(MouseEVent.MOUSE_OUT,outF);
    b.x=x
    b.y=y
    addChild(b);
    function overF(e:MouseEvent){
    e.currentTarget.gotoAndStop("over");
    function outF(e:MouseEvent){
    e.currentTarget.gotoAndStop(1);
    //-------code between dotted lines only needs to be entered once --------------------
    // you'll also want to create a click listener and listener function
    the code between the dotted lines is amenable to being added to a ButtonClass.as class file if want to expand your capabilities.

  • I'm going to install SSD in my Macbook pro, how do I install for example OSX Lion? I dont have any CD as far as I know.

    I'm going to install SSD in my Macbook pro, how do I install for example OSX Lion? I dont have any CD with OSX Lion as far as I know.

    Ideally, you should clone your HD as Bimmer 7 Series explains. 
    However, if your computer originally shipped with Lion or Mountain Lion, a clone is not necessary to merely reinstall OS X. OS X Internet Recovery will create a recovery partition, download the installer package, and install it on a completely empty SSD or HD.
    Even if your computer shipped with Snow Leopard, it may be eligible to download a firmware update that creates the same ability: http://support.apple.com/kb/HT4904

  • How do you copy, for example I work with blue prints and I want to copy a section and copy into another new page?

    How do you copy, for example I work with blue prints and I want to copy a section and copy into another new page?

    Forgot to add that it would be an adjustment layer with some kind of mask on it already. The mask is uncentered when copy and pasted which throws it off.
    I guess the same question would go towards doing the same for an object. How to copy and paste it over to a new doc, keeping its position within the document? is this possible?

  • Hi, i was wondering how to share movies for example, to the mac desktop from the macbook pro?

    Hi, i was wondering how to share movies for example, to the mac desktop from the macbook pro?

    Share them how?  View them?  Copy them?
    What kind of movies?  DVDs?  iTunes? Other MPEG, AVI files, etc...

  • How many instance created for 100 request in servlet?

    Let me know the answer

    STM12 wrote:
    Subject: how many instance created for 100 request in servlet?
    Let me know the answerInstances of what?

  • How would you create a read/display only applicaiton montior role for SRM

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

  • How would I create a Summary Chart for the Current Year Using a Count by Month?

    Post Author: MarkS
    CA Forum: Charts and Graphs
    I have a data set of 3 date fields.  I would like to create a summary counting all of the occurrances of each of these dates per month, similar to using a SumProduct() command in excel.
    For example, my data is as follows:
    Registered Date  |    Application Date   |   Sale Date
    1/1/2007             |      2/1/2007            |     2/20/2007    
    1/10/2007           |      2/1/2007            |     3/20/2007
    2/20/2007           |      3/10/2007          |     3/20/2007
    I would like to summarize this information by month as follows:
                          |  Jan '07   |   Feb '07  |  Mar '07  |  TOTAL
    Registered      |      2        |   1           |    0         |   3
    Applications    |     0         |   2           |   1          |  3
    Sales             |     0         |   1            |  2            |  3
    TOTAL           |   2            |  4            |  3            | 9
    Is there any way to do this?

    Post Author: V361
    CA Forum: Charts and Graphs
    Yes, but it will require some effort. Group on "Sale Date"  Change the group to group by month.   You can then create a running total for "Registered Date","Application Date"," Sale Date"      For Registered date, I used Field to summarize Registered Date,  Type of summary was count, Evaluate use a formula, reset on change of group 1 (I only have one group, "Sale Date")  The formula will look like this.
    month ({Registered Date  }) in [1,2,3,4,5,6,7,8,9,10,11,12]
    You would build your other running totals (Counts) using the same methods,
    Once you have these, you should be able to create your chart.

  • How would I create an USB Barcode Scanner Listener using Adobe AIR?

    I want to create a USB barcode scanner listener that would read in the scanned barcode, and place the barcode in a field in my AIR App even if the program wasn't focused on that particular field in the App.  If the client was using the application at the time for something else the scan would be buffered in AIR till requested or the AIR App has been idle for x period of time where upon the field would be brought into focus.
    How would I go about this (I'm developing on windows)  Was hoping for a USB solution within AIR but not fussy at all if I have to go outside AIR to solve this problem.  Java, Flex, ActionScript, Flash, C, C++, C#, VB (currently I've developed the rest of the App using Adobe AIR and JavaScript)
    I thought after some research that I could make a Java App (if all else fails) that listens and buffers the input and passes it along using a socket but JUSB doesn't work on Windows properly.
    I'm not stuck on any one particular implementation or idea just want to get development underway so...  Any ideas? or suggestions would be awesome.  I've googled a lot but haven't found any examples or solid suggestions, so any URL pointing to that information would be great too, if you know of a good one, then I'd be able to read up on any suggestion.
    Thanks,
    Marty

    Thanks Joe,
    Just for anyone else.  I bought a Metologic Scanner - VoyagerCG.  I was trying to get it to work using Java USB for a bit with no luck.  But if you get this scanner or one like it, it can be configured as a Virtual COM Port.  Which is very very easy in Java to set up as a listener and use sockets to transfer the data and listen within AIR.
    This PDF has links to drivers and instructions if this is useful to anyone.
    http://taltechnologies.com/products/Eclipse-Voyager%20Interface%20Options.pdf
    All the best,
    Marty

  • How would I create a simple script that does these specific things?

    I am trying to create a script that does these few simple task but I can't seem to compile all the cmdlets together into one. I can pick one task out and have a command for it but I want one script to do it all. Here are the tasks I need it to do.
    store the current location (as in C:\scripts)
    test to see if a folder C:\output exists, if it does not, create it
    prompt the visitor for a folder name (no C:\)
    obtain a directory listing of that folder showing all .ps1 files only
    place the results of this listing in a file named PS1_files_[folder name].txt in the c:\output folder
    repeat this task as part of a loop until an empty string is entered
    restore the present location (for example C:\scripts)

    This is a very good script for a someone new to computers to use as a learning exercise.  You will learn how the computer works an learn how to use scripts to manage the computer.
    This is the excat kind of scritp a teach hands you to do on the first day of class.  THe challenge will help you learn.
    Start here to learn how to write a script:http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    Good luck. Post back with specific questions.  Do not forget to include your script and the complete error message.
    You need to learn basic computer logic and decision making.  The learning materials will step you through that.
    ¯\_(ツ)_/¯

  • How would i create dynamic categories.

    http://www.quietlyscheming.com/blog/components/flexbook/
    http://www.rubenswieringa.com/blog/flex-book-component-beta
    I am trying to create a dynamic flipbook, the first one i
    ever made in flex is here.
    http://proof7.com/holiday2008/
    Now I am trying to create a book with a few different
    categories. 8 to be specific.
    How would I go about creating a book with sub categories that
    will allow me to click a menu or button, to flip to the next
    category, but the actual page contents be dynamic?
    The other members of my team say that it can be achieved
    through XML, but I havent seen any examples showing how to
    dynamically generate pages from the DB. Some say use the URLloader.
    The code is from the QS version. I like this one because it
    has the zoom but I have to figure out how to get it to talk with
    the backend first.
    Any help would be greatly appreciated.
    Court

    http://www.rubenswieringa.com/blog/flex-book-component-beta
    Nobody ever created a project that had more than 1 category
    with this component?

  • How would you create this effect?

    I am curious if there is a fairly straight-foward away of creating the effect seen in this image. I am talking about the pixelated effect made up of many little red boxes of various hues at the top part of the image.
    I was thinking of zooming in real close to an image in photoshop and doing a screen capture, but I'd rather have a vector image that can be easily scaled in size and easy to change the hue to different colors.
    Something like this able to be done in illustrator without building it a box at a time?
    Regards,

    Well I'd say that PDF is a vector.
    The PDF contains nothing other than a raster image. It contains no vector paths.
    (By the way: "A vector" is a single expression of a direction. Calling a vector-based illustration "a vector" is like calling a raster-based image "a pixel.")
    I zoomed in as close as I could and didn't see any pixels.
    All you could see is pixels. That's all that's there.
    If it's raster I'd be interested in knowing what resolution...
    Its resolution is 1. It's a single-pixel raster image (as given away in its title).
    I've never experienced a raster image that didn't get more pixelated the larger you scaled it up.
    Yes, you have. That's exactly what I demonstrated in post 5 and in the PDF.
    The operative word in your comment is more pixelated. That misconception is the point of the demonstration. Your image is already pixelated, and that's exactly what you want. It won't be "more" pixelated whatsoever, no matter how large you scale it.
    At the heart of the [quite common] misconception is this: What you are calling "resolution" is not. True resolution is the measure of the amount of information contained. A raster image contains only a fixed amount of information. PPI is merely a scale factor. It's merely an expression of information density, not quantity. As you can see, that PDF is every bit as "resolution independent" (i.e.; scaleable) as a vector square.
    The same priciple applies to your raster image. Your whole intent in your posted example is to display pixelation. So if the very thing you're trying to depict is the pixelation of, say, a 10 pixel x 20 pixel raster image, then all you need in order to depict that at any scale is a 10 pixel by 20 pixel raster image. At a scale of 10 PPI, you've got a perfect depiction of 10 square Pixels Per Inch. At a scale of 200%, you've got a perfect depiction of 5 square Pixels Per Inch (i.e.; 10 Pixels Per 2 Inches). You can scale it to the size of the moon and you'll have a perfect depiction of 10 Pixels Per Moon. It's just as scaleable as a 10 x 20 array of vector squares.
    In other words: All the actual resolution of your raster image (all its information—all its pixels, in all their squareness) is already visible. Reducing its information density (by scaling it larger) will not reveal more of its actual information (the square shape of its pixels—the information that one usually wants to conceal or disguize about raster images, but not in this case).
    The whole purpose of making sure your raster images have "sufficient resolution" in desktop publishing is to disguise the squareness of their pixels (what is commonly called "pixelation"). But that is exactly what you are intending to depict in this case. And you want to be able to depict that with equal clarity at any scale. There's no need to re-draw it as vector paths in order to do that. In this situation, you are not trying to avoid "pixelation," you are trying to show it, which is exactly what a raster image does by its nature.
    Think of it this way: If all you are trying to draw is 200 squares, it can easily be argued that a raster image is more "data efficient" than a file containing 200 square vector paths. For each vector path, you have to include four coordinate pairs (800 anchor points). For a raster image, all you need is 200 color values.
    This is not just a symantic or academic or pompous know-it-all point of argument. It's a point widely applicable to many common situations, and something every graphics professional should understand. For example, consider the software instructions author who pointlessly frets over the misunderstood "requirement" for pixel density when his illustrations necessarily consist of screenshots that are, after all, supposed to accurately and clearly depict what the user sees on his screen. Or the fact that you see single-pixel raster images scaled to the full width of the page, or dimensions of a table cell or large section of a whole background on web pages everyday. Or the widespread misconception that intentionally fuzzy raster effects like soft drop shapows "require" 300 PPI.
    JET

  • How would i find for permissions for certain directory

    hello
    how would i find in my web docs (/home/user/htdocs) all directories named "templates_c" so i can do a chmod on them.
    they need to be writable by the app, but i think 775 is not enough, i think they might need tto be 777 or atleast o+w i believe.  its for smarty template engine to write the template files on initial compilation.
    i have been trying various wildcard version of find and chmod, but i dont want to foul things up.
    Last edited by wolfdogg (2012-01-07 02:50:14)

    wolfdogg wrote:
    i ran as root, it didnt find anything.  there is atleast 3 of those directories in there.  i had to manually set them again.  there is probably more.  Is there something i can change on that last command that might be keeping it from finding anything?
    its just a local testing server, i had the permissions chowned to "http", but the problem comes when everytime i upload a new file across ftp when logged in as user, it goes back to user, so i ended up chowning everything to user instead.
    Could you please confirm whether you tried the commands Samuvuo suggested? Please specify whether the following command found the required directories:
    sudo find /home/user/htdocs -type d -name "template_c"
    Although, I would personally run the command like so, cos I'm noob:
    find ~/htdocs -type d -regex ".*/template_c.*"

  • How would I create an assembly of forms using only form names?

    I want to create an assembly of forms by passing only the names of the forms stored in the LC repository to the Assembly service. How would I do that? Is the assembly service the correct service to use in this case? Thank you.

    String classname = "Abc.class";
    Class class = Class.forName(classname); // catch ClassNotFoundException
    Object object = class.newInstance(); // catch InstantiationExceptiion
    MyIntrface myInterface = (MyInterface)object; // catch ClassCastException

  • How would I create a crowd scene?

    Alright, Lets say I have guy A walking (
    http://i34.photobucket.com/albums/d145/Trebor321/Walk1.swf
    No problem right? Okay, now lets add a couple more folks. (
    http://s34.photobucket.com/albums/d145/Trebor321/?action=view&current=walk2.swf
    Now you see how it slows down? Now imagine that with even
    more people, and people that aren't carbon copies as well as an
    actual background, and it slows to about 12 FPS(right now it's at
    23). Any way to avoid that? I'm open to anything, thanks a bunch.

    The fact of the matter is that the more things going on in a
    SWF, the more strain on the processor. A truly animated crowd scene
    in Flash is pretty impossible. As the reply above said, if you want
    to do this at all, you must simplify the vector art to the bare
    minimum (no crease lines in the trousers, no gradients, no blurs or
    other filters). You also have to look for ways to cheat. For
    example, by the time you get around 5 rows back, the characters
    should be solid silhouettes of various hues (not just tinted
    versions of your character, but separately animated solid-fill
    movie clips). This slightly reduces processor strain, and serves to
    frame your foreground characters nicely. Any distant characters
    should be just a vaguely moving mass, with semicircles popping in
    and out to give an impression of movement. This makes sense
    aesthetically as well. Take a look at animated productions for
    broadcast, and also most computer games: the further away an object
    (especially an animated character) is, the less detail is
    shown.

Maybe you are looking for