Simple drawing app...

i want to create a simple drawing app.... the user can draw
rectangles on the screen with drag and drop mouse action...
when a recatngle is drawn... the user can
1) stretch the size of the rectangle and
2) can 'drag' it around the screen with the mouse.
can any one help me with this... thanks.

hey kglad....
i got something like this so far.....
still a bit stuck on drawing a recatangle that can be
scalable by the user and can be draged around the screen...
will i have to keep on creating movie clips for every
rectangle the user wants to create....
im trying to buld a simple room map app, where the user can
draw a plan of a house.. each room will be a rectangle.
onMouseDown = function () {
this.createEmptyMovieClip("rectang", 1);
rectang.lineStyle(1, 0x000000, 100);
rectang.moveTo(_xmouse, _ymouse);
onMouseMove = function () {
rectang.clear();
//draw rect here...
onMouseUp = function () {
};

Similar Messages

  • Looking for very simple drawing app for tablet [Solved]

    Hey,
    Im running Arch with XFCE on an Asus T91MT tablet/netbook, with a resistive screen & pen.
    I'm looking for a very basic, lightweight, tablet-oriented drawing/sketching/doodling app, to make notes, draw ideas/concepts, etc.
    I've tried MyPaint, which doesn't work because the screen isn't pressure sensitive (I would only need one pen size anyway), and a few other apps.
    SmoothDraw (windows app) is exactly what i'm looking for, but it doesn't install on wine. And wine doesn't help with the "keeping it light" idea, so I would prefer something native.
    Any suggestion is welcome!
    Last edited by Feroxium (2011-07-29 01:13:00)

    Feroxium wrote:Yup, solved
    umm...yeah, edit the first post in this thread and append [SOLVED] to the thread subject/title.
    That way others looking for similar info, might be able to quickly gauge if a solution is available in the thread or not.

  • Can I create a simple Drawing App with Crayon, Marker, Paint Bucket and Eraser in Edge?

    I need to create an 'app' that allows user to 'color'/'paint' in simple colorbook pages with a specific color palette or if I can have an expanded color palette great..
    any thots
    I have found the code to do it, but I am not a coder that is why I am investigating Edge...
    Many thanks

    Hi, mark-
    It's going to be hard to do without code in Animate.  Yoshoika Ume-san did a little project in an earlier version of Animate that did it, but it was heavily code centric.
    Thanks,
    -Elaine

  • Simple Drawing Application?

    I am trying to work out a loading of a ship with all the dimensions I have...
    Is there a simple drawing app like Visio for windows (which comes with office) for the Mac??
    I would like to do it to scale, looked on version tracker/ mac update but cannot find anything!
    Thanks

    Hi there Dirtydog.
    The two roughly equivalent programs I know of are Omnigraffle, and ConceptDraw.
    http://www.omnigroup.com/applications/omnigraffle/
    http://www.conceptdraw.com/en/
    Neither of them are free I'm afraid.

  • Looking for a simple drawing application for my grand-daughters

    Well, that's more or less it, I'm looking for a simple drawing application for my grand-daughters. In the children section of iTunes store, there's only a few books and nothing more. I bought the iPad mainly for my grand-children to teach them a bit and I don't find interesting things for them.
    Can anybody help me with that?
    Pedro Godfroid Goffin

    Brushes is a nice finger drawing app. Since you didn't say how old they are, I don't know if the interface is to difficult for them to use.
    Sketchbook is another nice drawing app.
    Neither are free.
    Glor

  • Simple drawing surface - Edge

    Hi I wants to do a simple drawing surface that you can easily pop into your pages, similar to the basic windows paint program.
    I find A jQuery paint plugin (http://wpaint.websanova.com) but i can't use it. Please help me or prepare me dome file or something like that.
    THX
    Daniel Poland

    hey kglad....
    i got something like this so far.....
    still a bit stuck on drawing a recatangle that can be
    scalable by the user and can be draged around the screen...
    will i have to keep on creating movie clips for every
    rectangle the user wants to create....
    im trying to buld a simple room map app, where the user can
    draw a plan of a house.. each room will be a rectangle.
    onMouseDown = function () {
    this.createEmptyMovieClip("rectang", 1);
    rectang.lineStyle(1, 0x000000, 100);
    rectang.moveTo(_xmouse, _ymouse);
    onMouseMove = function () {
    rectang.clear();
    //draw rect here...
    onMouseUp = function () {
    };

  • Looking for a high-res drawing app for the iPad

    I've tried a few of the available iPad drawing apps like Sketchbook Pro and Brushes. It's a little hard to tell, because documentation tends to be short on details, but it appears that most of them (with the exception of Brushes) only let you work and export images at 1024 by 768 resolution. That isn't really high enough resolution for professional work.
    Brushes is the only exception I've found. You work on the iPad in Brushes at 1024 by 768, but they have this OS X app that can convert your exported images to a higher res.
    To me that's crazy awkward and time-consuming, and I think Brushes is OK as a drawing app, but not necessarily what I'm looking for.
    Can anyone give me some better insight into the matter?
    Is there some underlying technical reason that all of these apps have a hard limit of 1024 by 768 resolution?
    Is there an app other than Brushes that can produce pro-level (high resolution) image files on the iPad?
    Thanks,
    JS

    Yubz Magnum really has great sound. They come in four colors too.
    Check out the new remodeled MacOSG website! 24-hour Apple-related news & support.
     MacOSG: An Apple User Group  iTunes: MacOSG Podcast  Follow us on Twitter: MacOSG

  • Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online   Right now there is no app store for

    Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online
    Right now there is no app store for Filemaker Go.   Filemaker Forgot about us.
    So I want to create a simple native iPhone App that all it does
    is launch
    fmp://~/filename.fmp12?$VariableName=value
    This URL will launch the Filemaker Go App
    Filemaker Go is a app that the user will have to have
    downloaded already on the device..
    The Simple Native app will launch the Filemaker Go.
    The fmp  URL has the information where the Filemaker Pro database is hosted
    and get  the user where they need to be..
    Help Me please
    iPhone 5s, iOS 8.1.3

    That would be software. And, you said "upload." That's "uploading software." Why do you question what you stated?
    I don't know where you even want to upload this software. The only way it can be downloaded to a device is through the iTunes store. Do you even know what you want to do?

  • Im looking for a drawing app that i can draw on a grid paper

    im looking for a drawing app that i can draw on a grid paper any suggestions?

    an app that when i open it has a graph paper on it and i can use the grid to draw things. something like paint but has graph paper on it

  • Not all export options are showing in Adobe Illustrator Draw app!?

    I downloaded the Adobe Illustrator Draw App. Did a test run on the features. Meaning i just doodled. Then i went to export However only two choices show. A copy of image to Creative Cloud and one other. There is no way to put actual file with layers so i can open it in illustrator on desktop.
    i deleted the app and re- downloaded the app. But still only 2 options show, which do not help.
    If anyone has any suggestions please let me know!!!
    Also, if can, please ket me know if this app is only for CC files on desktop?
    i have CS6 programs on desktop not CC.
    Thank you,
    Joleen

    Hi dkendall-ks,
    The "Send to Illustrator" functionality sends the file to your CC Adobe Illustrator desktop (Mac or Windows) application. For this functionality to work you need to :
    1. Have the latest CC Adobe Illustrator 18.1.0
    2. Be signed in with the Creative Cloud desktop app with the same account you are signed in your iOS Adobe Illustrator Draw app.
    Once you have completed the steps above, the artwork you send from Adobe Illustrator Draw will be opened in your desktop CC Adobe Illustrator app as vector objects (except for images that you had imported).
    Hope this helps,
    Jose

  • Can't get simple Struts app to work when using DCs

    Hello,
    I need to use Struts to develop web apps. I took a simple example app of 3 screens and was able to get it working fine in local development.
    Then I tried to do same thing using DCs in a Track. The first page of the app is a jsp called login.jsp. That file has the following two lines at the beginning:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    This works fine in local development. However in the DC I get the following error when I try to run login.jsp:
    Application error occurs during processing the request.
      Internal error while parsing JSP page C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/com.firstenergycorp/pilot_webapp~strutsear/servlet_jsp/struts/root/login.jsp.
      Details:   com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Tag library descriptor cannot be found for uri:{1}.  The ID of this error is
    Exception id: [000F1FCC15FA00450000000F00000CA4000400A8BC089FE5].
    The struts-html.tld and struts-bean.tld are both in the WEB-INF folder of my Web Module DC.
    So why am I getting this error?
    Thanks in advance for any help.
    David.

    David,
    we are using Struts in our application without any problems. But we don't deploy via JDI but build the ear-files in Netweaver Studio and deploy with SDM.
    I guess the tag libs are not added properly to the war file of your productive environment. Can you check whether they contain the files in the correct path ?
    And you shouldn't mix Tag Libs and struts.jar of different versions (e.g 1.0 + 1.2). That will result in the very same error message.
    Regards, Astrid
    Regards, Astrid

  • A litle help please...  drawing app.

    Hi all,
    I'm trying to adapt a file I downloaded (legally) and I'm having some trouble as I'm still stuck in the days of AS2 and this has
    been built in AS3. As you will see it's a drawing app that allows a few options for brush size, blur etc.,
    What I'd like to do is to duplicate the brush_tool_mc  with settings for full brush size and full blur to use as a spray can tool.
    All my attempts so far have ended in disaster and multiple output errors !  : (
    Any help / pointers / guidance much appreciated.
    Best wishes
    Tony
    Source and example is here:
    http://www.nocircleno.com/graffiti/examples/2.x/graffiti_advanced_demo.html
    CODE:  (Main.as)
    *      Example Application built with the Graffiti Library
    *      www.nocircleno.com/graffiti/
    *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    *     OTHER DEALINGS IN THE SOFTWARE.
    package {
        import flash.display.Bitmap;
        import flash.display.BitmapData
        import flash.display.MovieClip;
        import flash.display.SimpleButton;
        import flash.display.Sprite;
        import flash.display.LineScaleMode;
        import flash.display.CapsStyle;
        import flash.display.JointStyle;
        import flash.text.TextField;
        import flash.geom.Point;
        import flash.text.TextFormat;
        import flash.ui.Keyboard;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.events.KeyboardEvent;
        import flash.display.BlendMode;
        import flash.net.navigateToURL;
        import flash.net.FileReference;
        import flash.net.URLRequest;
        import flash.net.URLRequestMethod;
        import flash.net.URLRequestHeader;
        import flash.text.Font;
        import flash.utils.ByteArray;
        import fl.controls.CheckBox;
        import fl.controls.ColorPicker;
        import fl.controls.Slider;
        import fl.controls.ComboBox;
        import fl.events.ColorPickerEvent;
        import fl.events.SliderEvent;
        import fl.data.DataProvider;
        import com.nocircleno.graffiti.GraffitiCanvas;
        import com.nocircleno.graffiti.display.Text;
        import com.nocircleno.graffiti.display.GraffitiObject;
        import com.nocircleno.graffiti.events.CanvasEvent;
        import com.nocircleno.graffiti.events.GraffitiObjectEvent;
        import com.nocircleno.graffiti.tools.BrushTool;
        import com.nocircleno.graffiti.tools.BrushType;
        import com.nocircleno.graffiti.tools.LineTool;
        import com.nocircleno.graffiti.tools.LineType;
        import com.nocircleno.graffiti.tools.ShapeTool;
        import com.nocircleno.graffiti.tools.ShapeType;
        import com.nocircleno.graffiti.tools.ToolMode;
        import com.nocircleno.graffiti.tools.ITool;
        import com.nocircleno.graffiti.tools.BitmapTool;
        import com.nocircleno.graffiti.tools.FillBucketTool;
        import com.nocircleno.graffiti.tools.SelectionTool;
        import com.nocircleno.graffiti.tools.TextSettings;
        import com.nocircleno.graffiti.tools.TextTool;
        import com.nocircleno.graffiti.managers.GraffitiObjectManager;
        import com.adobe.images.PNGEncoder;
        public class Main extends MovieClip {
            public var click_message_txt:TextField;
            // ui
            public var brush_tool_mc:ItemButton;
            public var eraser_tool_mc:ItemButton;
            public var line_tool_mc:ItemButton;
            public var rectangle_tool_mc:ItemButton;
            public var fillbucket_tool_mc:ItemButton;
            public var selection_tool_mc:ItemButton;
            public var text_tool_mc:ItemButton;
            public var oval_tool_mc:ItemButton;
            public var clear_btn:SimpleButton;
            public var save_btn:SimpleButton;
            public var undo_btn:SimpleButton;
            public var redo_btn:SimpleButton;
            public var slider_label_txt:TextField;
            public var slider_2_label_txt:TextField;
            public var slider_3_label_txt:TextField;
            public var combo_label_txt:TextField;
            public var stroke_color_mc:ColorPicker;
            public var fill_color_mc:ColorPicker;
            public var slider_mc:Slider;
            public var slider_2_mc:Slider;
            public var slider_3_mc:Slider;
            public var zoom_slider_mc:Slider;
            public var combo_list:ComboBox;
            public var overlay_cb:CheckBox;
            public var overlay_mc:MovieClip;
            public var canvas:GraffitiCanvas;
            public var border:Sprite;
            // tools
            private var _brush:BrushTool;
            private var _eraser:BrushTool;
            private var _line:LineTool;
            private var _shape:ShapeTool;
            private var _selectionTool:SelectionTool;
            private var _textTool:TextTool;
            private var _fillBucketTool:FillBucketTool;
            // props
            private var _brushSize:Number = 2;
            private var _strokeColor:uint = 0x00FF00;
            private var _fillColor:uint = 0xFF0000;
            private var _strokeAlpha:Number = 1;
            private var _fillAlpha:Number = 1;
            private var _brushBlur:Number = 0;
            private var _fontColor:uint = 0x00FF00;
            private var _fontSize:uint = 14;
            private var _brushShapeIndex:int;
            private var _lineStyleIndex:int;
            private var _fontIndex:uint = 0;
            private var _fontList:DataProvider;
            private var _brushShapes:DataProvider;
            private var _lineStyles:DataProvider;
            private var _fileRef:FileReference;
            private var _objectManager:GraffitiObjectManager;
            private var _orginalComboBoxItemsPos = new Object();
            public function Main() {
                // hide message
                click_message_txt.alpha = 0;
                // create canvas
                canvas = new GraffitiCanvas(840, 470, 10);
                canvas.x = 0;
                canvas.y = 120;
                canvas.addEventListener(MouseEvent.MOUSE_WHEEL, scrollHandler);
                canvas.addEventListener(GraffitiCanvas.HISTORY_LENGTH_CHANGE, historyLengthChangeHandler);
                canvas.addEventListener(GraffitiObjectEvent.SELECT, objectEventHandler);
                canvas.addEventListener(GraffitiObjectEvent.ENTER_EDIT, objectEventHandler);
                addChild(canvas);
                // add image over canvas
                overlay_mc = new OverlayImage();
                canvas.overlay = overlay_mc;
                // get instance of graffiti object manager
                _objectManager = GraffitiObjectManager.getInstance();
                // add listeners for keyboard shortcuts
                stage.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler);
                stage.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
                // add event listeners for tool buttons
                selection_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                text_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                fillbucket_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                brush_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                eraser_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                line_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                rectangle_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                oval_tool_mc.addEventListener(MouseEvent.CLICK, toolHandler);
                // setup data providers
                _brushShapes = new DataProvider();
                _brushShapes.addItem({label:"Round", data: BrushType.ROUND});
                _brushShapes.addItem({label:"Square", data: BrushType.SQUARE});
                _brushShapes.addItem({label:"Diamond", data: BrushType.DIAMOND});
                _brushShapes.addItem({label:"Vertical", data: BrushType.VERTICAL_LINE});
                _brushShapes.addItem({label:"Horizontal", data: BrushType.HORIZONTAL_LINE});
                _brushShapes.addItem({label:"Forward", data: BrushType.FORWARD_LINE});
                _brushShapes.addItem({label:"Backward", data: BrushType.BACKWARD_LINE});
                _lineStyles = new DataProvider();
                _lineStyles.addItem({label:"Solid", data: LineType.SOLID});
                _lineStyles.addItem({label:"Dotted", data: LineType.DOTTED});
                _lineStyles.addItem( { label:"Dashed", data: LineType.DASHED } );
                // Setup Font List
                _fontList = new DataProvider();
                var embeddedFonts:Array = Font.enumerateFonts(true);
                embeddedFonts.sortOn("fontName", Array.CASEINSENSITIVE);
                for (var i:int = 0; i < embeddedFonts.length; i++) {
                    _fontList.addItem( {label: embeddedFonts[i].fontName, data: embeddedFonts[i] } );
                // create tool instances
                _brush = new BrushTool(_brushSize, _fillColor, _fillAlpha, _brushBlur, BrushType.ROUND);
                _eraser = new BrushTool(_brushSize, _fillColor, 1, _brushBlur, BrushType.ROUND, ToolMode.ERASE);
                _line = new LineTool(2, _strokeColor, _strokeAlpha, LineType.SOLID);
                _shape = new ShapeTool(2, _strokeColor, _fillColor, _strokeAlpha, _fillAlpha, ShapeType.RECTANGLE);
                _fillBucketTool = new FillBucketTool(_fillColor, true);
                _selectionTool = new SelectionTool();
                _textTool = new TextTool(new TextSettings(Font(_fontList.getItemAt(0).data), new TextFormat(null, _fontSize, _fontColor)));
                // setup color pickers
                stroke_color_mc.focusEnabled = false;
                stroke_color_mc.selectedColor = _strokeColor;
                stroke_color_mc.addEventListener(ColorPickerEvent.CHANGE, colorPickerHandler);
                stroke_color_mc.enabled = false;
                fill_color_mc.focusEnabled = false;
                fill_color_mc.selectedColor = _fillColor;
                fill_color_mc.addEventListener(ColorPickerEvent.CHANGE, colorPickerHandler);
                slider_mc.addEventListener(SliderEvent.CHANGE, sliderHandler);
                slider_2_mc.addEventListener(SliderEvent.CHANGE, sliderHandler);
                slider_3_mc.addEventListener(SliderEvent.CHANGE, sliderHandler);
                overlay_cb.addEventListener(Event.CHANGE, overlayHandler);
                overlay_cb.focusEnabled = false;
                // config combo list
                combo_list.addEventListener(Event.CHANGE, comboEventHandler);
                combo_list.dataProvider = _brushShapes;
                combo_list.focusEnabled = false;
                // store positions
                _orginalComboBoxItemsPos.comboBox = new Point(combo_list.x, combo_list.y);
                _orginalComboBoxItemsPos.comboBoxLabel = new Point(combo_label_txt.x, combo_label_txt.y);
                // disable undo and redo buttons
                undo_btn.mouseEnabled = false;
                undo_btn.alpha = .5;
                redo_btn.mouseEnabled = false;
                redo_btn.alpha = .5;
                // add event listeners
                undo_btn.addEventListener(MouseEvent.CLICK, historyHandler);
                redo_btn.addEventListener(MouseEvent.CLICK, historyHandler);
                clear_btn.addEventListener(MouseEvent.CLICK, clearCanvasHandler);
                save_btn.addEventListener(MouseEvent.CLICK, saveHandler);
                zoom_slider_mc.maximum = canvas.maxZoom;
                zoom_slider_mc.addEventListener(SliderEvent.CHANGE, zoomHandler);
                // assign the brush tool as the default tool
                canvas.activeTool = _brush;
                // set brush tool
                brush_tool_mc.selected = true;
                setSelectedBrushShape(BrushType.ROUND);
                Method    : objectEventHandler()
                Purpose    : This method handles GraffitiObjectEvents.  We use this
                          to know when an object is selected or enters edit mode.
                Params    : e -- GraffitiObjectEvent object.
            private function objectEventHandler(e:GraffitiObjectEvent):void {
                var font:Font;
                var fmt:TextFormat;
                var i:int;
                if (e.type == GraffitiObjectEvent.SELECT) {
                    // get font and text format of selected object
                    font = Text(e.graffitiObject).textSetting.font;
                    fmt = Text(e.graffitiObject).textSetting.textFormat;
                    _fontSize = Number(fmt.size);
                    var fontFromList:Font;
                    var numberFonts:uint = _fontList.length;
                    // find select text font in font list
                    for (i = 0; i < numberFonts; i++) {
                        fontFromList = Font(_fontList.getItemAt(i).data);
                        if (fontFromList.fontName == font.fontName && fontFromList.fontStyle == font.fontStyle) {
                            _fontIndex = i;
                            break;
                    // if text tool is active tool, then update it.
                    if (canvas.activeTool is TextTool) {   
                        TextTool(canvas.activeTool).textSettings = new TextSettings(font, fmt);
                    } else {
                        _textTool.textSettings.textFormat.size = Number(fmt.size);
                    // update ui for objects
                    combo_list.selectedIndex = _fontIndex;
                    slider_mc.value = Number(fmt.size);   
                    fill_color_mc.selectedColor = uint(fmt.color);
                } else if (e.type == GraffitiObjectEvent.ENTER_EDIT) {
                    // if we enter edit mode on an text object, make sure the tool is set to the text tool.
                    if (e.graffitiObject is Text && !(canvas.activeTool is TextTool)) {
                        setActiveTool(text_tool_mc);
                Method    : overlayHandler()
                Purpose    : This method toggles the overlay on and off.
                Params    : e -- Event object.
            private function overlayHandler(e:Event):void {
                if(e.currentTarget.selected) {
                    canvas.overlay = overlay_mc;
                } else {
                    canvas.overlay = null;
                Method    : historyHandler()
                Purpose    : This method undo or redo the drawing depending on the button
                          clicked by the user.
                Params    : e -- MouseEvent object.
            private function historyHandler(e:MouseEvent):void {
                if(e.currentTarget == undo_btn) {
                    canvas.prevHistory();
                    if(canvas.historyPosition == 0) {
                        undo_btn.mouseEnabled = false;
                        undo_btn.alpha = .5;
                    redo_btn.mouseEnabled = true;
                    redo_btn.alpha = 1;
                } else if(e.currentTarget == redo_btn) {
                    canvas.nextHistory();
                    if(canvas.historyPosition == (canvas.historyLength - 1)) {
                        redo_btn.mouseEnabled = false;
                        redo_btn.alpha = .5;
                    undo_btn.mouseEnabled = true;
                    undo_btn.alpha = 1;
                Method    : clearCanvasHandler()
                Purpose    : This method will clear the canvas.
                Params    : e -- MouseEvent object.
            private function clearCanvasHandler(e:MouseEvent):void {
                canvas.clearCanvas();
                Method    : saveHandler()
                Purpose    : This method will save the drawing as a PNG image.
                Params    : e -- MouseEvent object.
            private function saveHandler(e:MouseEvent):void {
                // get drawing as bitmapdata from the Graffiti Canvas instance.
                var canvasBmp:BitmapData = canvas.drawing();
                // create new jpg encoder object and convert bitmapdata to jpg
                var pngEncoder:PNGEncoder = new PNGEncoder();
                var pngStream:ByteArray = PNGEncoder.encode(canvasBmp);
                // make sure you dispose of the bitmapdata object when finished.
                canvasBmp.dispose();
                _fileRef = new FileReference();
                _fileRef.save(pngStream, "graffiti_example_image.png");
                Method    : historyLengthChangeHandler()
                Purpose    : This method will handle the change in the number of stored
                          history items.  This is used to toggle the redo and undo
                          buttons.
                Params    : e -- Event object.
            private function historyLengthChangeHandler(e:Event):void {
                if(canvas.historyLength > 0 && canvas.historyPosition != 0) {
                    undo_btn.mouseEnabled = true;
                    undo_btn.alpha = 1;
                } else {
                    undo_btn.mouseEnabled = false;
                    undo_btn.alpha = .5;
                if(canvas.historyLength > 0 && canvas.historyPosition != canvas.historyLength - 1) {
                    redo_btn.mouseEnabled = true;
                    redo_btn.alpha = 1;
                } else {
                    redo_btn.mouseEnabled = false;
                    redo_btn.alpha = .5;
                Method    : zoomHandler()
                Purpose    : This method will handle the zoom slider event and set the
                          canvas to the new zoom level.
                Params    : e -- SliderEvent object.
            private function zoomHandler(e:SliderEvent):void {
                // set zoom of canvas
                canvas.zoom = e.value;
                // if canvas is zoomed in then display message about dragging canvas with mouse.
                if(canvas.zoom  > 1) {
                    click_message_txt.alpha = 1;
                } else {
                    click_message_txt.alpha = 0;
                Method    : colorPickerHandler()
                Purpose    : This method will handle the color picker event.
                Params    : e -- ColorPickerEvent object.
            private function colorPickerHandler(e:ColorPickerEvent):void {
                var font:Font;
                var fmt:TextFormat;
                var ts:TextSettings;
                if(canvas.activeTool is BrushTool) {
                    _fillColor = e.color;
                    BrushTool(canvas.activeTool).color = _fillColor;
                } else if(canvas.activeTool is LineTool) {
                    _strokeColor = e.color;
                    LineTool(canvas.activeTool).color = _strokeColor;
                } else if(canvas.activeTool is ShapeTool) {
                    if(e.currentTarget == stroke_color_mc) {
                        _strokeColor = e.color;
                        ShapeTool(canvas.activeTool).strokeColor = _strokeColor;
                    } else if (e.currentTarget == fill_color_mc) {
                        _fillColor = e.color;
                        ShapeTool(canvas.activeTool).fillColor = _fillColor;
                } else if (canvas.activeTool is TextTool) {
                    // update color of textformat object
                    fmt = TextTool(canvas.activeTool).textSettings.textFormat;
                    fmt.color = fill_color_mc.selectedColor;
                    // update text tool
                    TextTool(canvas.activeTool).textSettings.textFormat = fmt;
                    // update any selected text with new color
                    if (_objectManager.areObjectsSelected()) {
                        font = Font(combo_list.selectedItem.data);
                        fmt = new TextFormat(null, slider_mc.value, fill_color_mc.selectedColor);
                        ts = new TextSettings(font, fmt);
                        _objectManager.changeSettingsForSelectedObjects(ts);
                } else if (canvas.activeTool is SelectionTool) {
                    font = Font(combo_list.selectedItem.data);
                    fmt = new TextFormat(null, slider_mc.value, fill_color_mc.selectedColor);
                    ts = new TextSettings(font, fmt);
                    // update text tool
                    _textTool.textSettings = ts;
                    if (_objectManager.areObjectsSelected()) {
                        // change settings for selected text
                        _objectManager.changeSettingsForSelectedObjects(ts);
                } else if (canvas.activeTool is FillBucketTool) {
                    FillBucketTool(canvas.activeTool).fillColor = fill_color_mc.selectedColor;
                Method    : sliderHandler()
                Purpose    : This method will handle the slider change.
                Params    : e -- SliderEvent object.
            private function sliderHandler(e:SliderEvent):void {
                var font:Font;
                var fmt:TextFormat;
                var ts:TextSettings;
                if(e.currentTarget == slider_mc) {
                    if(canvas.activeTool == _brush || canvas.activeTool == _eraser) {
                        _brushSize = e.value;
                        BrushTool(canvas.activeTool).size = _brushSize;
                    } else if(canvas.activeTool == _line) {
                        LineTool(canvas.activeTool).lineWidth = e.value;
                    } else if(canvas.activeTool == _shape) {
                        ShapeTool(canvas.activeTool).strokeWidth = e.value;
                    } else if (canvas.activeTool is TextTool) {
                        _fontSize = slider_mc.value;
                        fmt = TextTool(canvas.activeTool).textSettings.textFormat;
                        fmt.size = slider_mc.value;
                        TextTool(canvas.activeTool).textSettings.textFormat = fmt;
                        if (_objectManager.areObjectsSelected()) {
                            font = Font(combo_list.selectedItem.data);
                            fmt = new TextFormat(null, slider_mc.value, fill_color_mc.selectedColor);
                            ts = new TextSettings(font, fmt);
                            _objectManager.changeSettingsForSelectedObjects(ts);
                    } else if (canvas.activeTool == _selectionTool) {
                        _fontSize = slider_mc.value;
                        font = Font(combo_list.selectedItem.data);
                        fmt = new TextFormat(null, slider_mc.value, fill_color_mc.selectedColor);
                        ts = new TextSettings(font, fmt);
                        // update text tool
                        _textTool.textSettings = ts;
                        if (_objectManager.areObjectsSelected()) {
                            _objectManager.changeSettingsForSelectedObjects(ts);
                } else if(e.currentTarget == slider_2_mc) {
                    if(canvas.activeTool is BrushTool) {
                        _fillAlpha = e.value;
                        BrushTool(canvas.activeTool).alpha = e.value;
                    } else if (canvas.activeTool is LineTool) {
                        _strokeAlpha = e.value;
                        LineTool(canvas.activeTool).alpha = e.value;
                    } else if (canvas.activeTool is ShapeTool) {
                        _strokeAlpha = e.value;
                        ShapeTool(canvas.activeTool).strokeAlpha = e.value;
                } else if(e.currentTarget == slider_3_mc) {
                    if(canvas.activeTool is BrushTool) {
                        _brushBlur = e.value;
                        BrushTool(canvas.activeTool).blur = e.value;
                    } else if(canvas.activeTool is ShapeTool) {
                        _fillAlpha = e.value;
                        ShapeTool(canvas.activeTool).fillAlpha = e.value;
                Method    : setActiveTool()
                Purpose    : This method sets the program to use a new tool.
                Params    : toolButton -- One of the Tool Buttons.
            private function setActiveTool(toolButton:ItemButton):void {
                // deselect all button to start
                brush_tool_mc.selected = false;
                eraser_tool_mc.selected = false;
                line_tool_mc.selected = false;
                rectangle_tool_mc.selected = false;
                oval_tool_mc.selected = false;
                selection_tool_mc.selected = false;
                fillbucket_tool_mc.selected = false;
                text_tool_mc.selected = false;
                // show combo box
                combo_label_txt.visible = true;
                combo_list.visible = true;
                combo_list.x = _orginalComboBoxItemsPos.comboBox.x;
                combo_list.y = _orginalComboBoxItemsPos.comboBox.y;
                combo_label_txt.x = _orginalComboBoxItemsPos.comboBoxLabel.x;
                combo_label_txt.y = _orginalComboBoxItemsPos.comboBoxLabel.y;
                // set slider
                slider_mc.minimum = 2;
                slider_mc.maximum = 40;
                // enable all slider ui
                slider_mc.visible = true;
                slider_label_txt.visible = true;
                slider_2_label_txt.visible = true;
                slider_2_mc.visible = true;
                slider_3_label_txt.visible = true;
                slider_3_mc.visible = true;
                slider_2_label_txt.alpha = 1;
                // make sure both color pickers are enabled at this point.
                // let each tool block decide to turn them off.
                fill_color_mc.enabled = true;
                stroke_color_mc.enabled = true;
                // brush tool selected
                if(toolButton == brush_tool_mc) {
                    // set selected tool state
                    brush_tool_mc.selected = true;
                    // config color pickers
                    stroke_color_mc.enabled = false;
                    // set brush shape list
                    combo_label_txt.text = "Brush Shapes";
                    combo_list.dataProvider = _brushShapes;
                    combo_list.selectedIndex = _brushShapeIndex;
                    // config and set brush tool as active tool
                    _brush.color = fill_color_mc.selectedColor;
                    _brush.alpha = _fillAlpha;
                    _brush.blur = _brushBlur;
                    _brush.size = _brushSize;
                    _brush.type = combo_list.selectedItem.data;
                    canvas.activeTool = _brush;
                    // update slider
                    slider_label_txt.text = "Brush Size";
                    slider_mc.value = _brush.size;
                    slider_2_label_txt.text = "Brush Alpha";
                    slider_2_label_txt.alpha = 1;
                    slider_2_mc.enabled = true;
                    slider_2_mc.snapInterval = .1;
                    slider_2_mc.value = _brush.alpha;
                    slider_3_label_txt.text = "Brush Blur";
                    slider_3_label_txt.visible = true;
                    slider_3_label_txt.alpha = 1;
                    slider_3_mc.visible = true;
                    slider_3_mc.snapInterval = 1;
                    slider_3_mc.enabled = true;
                    slider_3_mc.minimum = 0;
                    slider_3_mc.maximum = 20;
                    slider_3_mc.value = _brush.blur;
                // eraser tool selected
                } else if(toolButton == eraser_tool_mc) {
                    // set selected tool state
                    eraser_tool_mc.selected = true;
                    // config color picker
                    fill_color_mc.enabled = false;
                    stroke_color_mc.enabled = false;
                    // set brush shape list
                    combo_label_txt.text = "Brush Shapes";
                    combo_list.dataProvider = _brushShapes;
                    combo_list.selectedIndex = _brushShapeIndex;
                    // config and set eraser tool as active tool
                    _eraser.color = fill_color_mc.selectedColor;
                    _brush.alpha = 1;
                    _brush.blur = _brushBlur;
                    _eraser.size = _brushSize;
                    _eraser.type = combo_list.selectedItem.data;
                    canvas.activeTool = _eraser;
                    // update slider
                    slider_label_txt.text = "Brush Size";
                    slider_mc.value = _eraser.size;
                    slider_2_label_txt.text = "Brush Alpha";
                    slider_2_label_txt.alpha = .5;
                    slider_2_mc.enabled = false;
                    slider_2_mc.snapInterval = .1;
                    slider_2_mc.value = _eraser.alpha;
                    slider_3_label_txt.text = "Brush Blur";
                    slider_3_label_txt.visible = true;
                    slider_3_label_txt.alpha = .5;
                    slider_3_mc.visible = true;
                    slider_3_mc.minimum = 0;
                    slider_3_mc.maximum = 20;
                    slider_3_mc.enabled = false;
                    slider_3_mc.value = _eraser.blur;
                // line tool
                } else if(toolButton == line_tool_mc) {
                    // set selected tool state
                    line_tool_mc.selected = true;
                    // config color picker
                    fill_color_mc.enabled = false;
                    // set line style list
                    combo_label_txt.text = "Line Style";
                    combo_list.dataProvider = _lineStyles;
                    combo_list.selectedIndex = _lineStyleIndex;
                    combo_label_txt.x = slider_3_label_txt.x + 8;
                    combo_list.x = slider_3_mc.x;
                    // config and set line tool as active tool
                    _line.color = stroke_color_mc.selectedColor;
                    _line.alpha = _strokeAlpha;
                    _line.type = combo_list.selectedItem.data;
                    canvas.activeTool = _line;
                    // update slider
                    slider_label_txt.text = "Stroke Size";
                    slider_mc.value = _line.lineWidth;
                    slider_2_label_txt.text = "Line Alpha";
                    slider_2_mc.enabled = true;
                    slider_2_mc.snapInterval = .1;
                    slider_2_mc.value = _line.alpha;
                    slider_3_label_txt.visible = false;
                    slider_3_mc.visible = false;
                // rectangle tool
                } else if(toolButton == rectangle_tool_mc) {
                    // set selected tool state
                    rectangle_tool_mc.selected = true;
                    // config and set shape tool as active tool
                    _shape.strokeColor = stroke_color_mc.selectedColor;
                    _shape.fillColor = fill_color_mc.selectedColor;
                    _shape.strokeAlpha = _strokeAlpha;
                    _shape.fillAlpha = _fillAlpha;
                    _shape.type = ShapeType.RECTANGLE;
                    canvas.activeTool = _shape;
                    // set slide value
                    slider_label_txt.text = "Stroke Size";
                    slider_mc.value = _shape.strokeWidth;
                    slider_2_label_txt.text = "Stroke Alpha";
                    slider_2_label_txt.alpha = 1;
                    slider_2_mc.enabled = true;
                    slider_2_mc.snapInterval = .1;
                    slider_2_mc.value = _shape.strokeAlpha;
                    slider_3_label_txt.text = "Fill Alpha";
                    slider_3_label_txt.visible = true;
                    slider_3_label_txt.alpha = 1;
                    slider_3_mc.visible = true;
                    slider_3_mc.enabled = true;
                    slider_3_mc.minimum = 0;
                    slider_3_mc.maximum = 1;
                    slider_3_mc.snapInterval = .1;
                    slider_3_mc.value = _shape.fillAlpha;
                    // hide combo box
                    combo_label_txt.visible = false;
                    combo_list.visible = false;
                // oval tool
                } else if(toolButton == oval_tool_mc) {
                    // set selected tool state
                    oval_tool_mc.selected = true;
                    // config and set shape tool as active tool
                    _shape.strokeColor = stroke_color_mc.selectedColor;
                    _shape.fillColor = fill_color_mc.selectedColor;
                    _shape.strokeAlpha = _strokeAlpha;
                    _shape.fillAlpha = _fillAlpha;
                    _shape.type = ShapeType.OVAL;
                    canvas.activeTool = _shape;
                    // update slider
                    slider_label_txt.text = "Stroke Size";
                    slider_mc.value = _shape.strokeWidth;
                    slider_2_label_txt.text = "Stroke Alpha";
                    slider_2_label_txt.alpha = 1;
                    slider_2_mc.enabled = true;
                    slider_2_mc.snapInterval = .1;
                    slider_2_mc.value = _shape.strokeAlpha;
                    slider_3_label_txt.text = "Fill Alpha";
                    slider_3_label_txt.visible = true;
                    slider_3_label_txt.alpha = 1;
                    slider_3_mc.visible = true;
                    slider_3_mc.enabled = true;
                    slider_3_mc.minimum = 0;
                    slider_3_mc.maximum = 1;
                    slider_3_mc.snapInterval = .1;
                    slider_3_mc.value = _shape.fillAlpha;
                    // hide combo box
                    combo_label_txt.visible = false;
                    combo_list.visible = false;
                // text tool selected
                } else if (toolButton == text_tool_mc || toolButton == selection_tool_mc) {
                    // disable stroke color picker
                    stroke_color_mc.enabled = false;
                    // ui for text
                    slider_label_txt.text = "Text Size";
                    // set font style list
                    combo_label_txt.text = "Font";
                    combo_list.dataProvider = _fontList;
                    combo_list.selectedIndex = _fontIndex;
                    // turn off ui not needed for text tool
                    slider_2_label_txt.visible = false;
                    slider_2_mc.visible = false;
                    slider_3_label_txt.visible = false;
                    slider_3_mc.visible = false;
                    combo_label_txt.x = slider_2_label_txt.x + 8;
                    combo_list.x = slider_2_mc.x;
                    slider_mc.minimum = 10;
                    slider_mc.maximum = 44;
                    slider_mc.value = Number(_textTool.textSettings.textFormat.size);
                    if (toolButton == selection_tool_mc) {
                        selection_tool_mc.selected = true;
                        // set active tool
                        canvas.activeTool = _selectionTool;
                    } else {
                        text_tool_mc.selected = true;
                        var font:Font = Font(combo_list.selectedItem.data);
                        var fmt:TextFormat = new TextFormat();
                        fmt.size = slider_mc.value;
                        fmt.color = fill_color_mc.selectedColor;
                        _textTool.textSettings = new TextSettings(font, fmt);
                        // set active tool
                        canvas.activeTool = _textTool;
                // fill bucket tool selected
                } else if (toolButton == fillbucket_tool_mc) {
                    // turn off ui not needed for fill bucket tool
                    slider_mc.visible = false;
                    slider_label_txt.visible = false;
                    slider_2_label_txt.visible = false;
                    slider_2_mc.visible = false;
                    slider_3_label_txt.visible = false;
                    slider_3_mc.visible = false;
                    combo_label_txt.visible = false;
                    combo_list.visible = false;
                    // turn off stroke color picker
                    this.stroke_color_mc.enabled = false;
                    this._fillBucketTool.fillColor = fill_color_mc.selectedColor;
                    fillbucket_tool_mc.selected = true;
                    // set active tool
                    canvas.activeTool = _fillBucketTool;
                Method    : toolHandler()
                Purpose    : This method will handle switching between brush and eraser
                          tools.  The two tool buttons call this method on click.
                Params    : e -- Mouse Event object.
            private function toolHandler(e:MouseEvent):void {
                setActiveTool(ItemButton(e.currentTarget));
                Method    : comboEventHandler()
                Purpose    : This method will handle the button events for the different
                          Combo box in the UI.
                Params    : e -- Mouse Event object.
            private function comboEventHandler(e:Event):void {
                var font:Font;
                var fmt:TextFormat;
                var ts:TextSettings;
                if(canvas.activeTool is BrushTool) {
                    // store brush shape index
                    _brushShapeIndex = ComboBox(e.currentTarget).selectedIndex;
                    setSelectedBrushShape(ComboBox(e.currentTarget).selectedItem.data);
                } else if(canvas.activeTool is LineTool) {
                    // store line style index
                    _lineStyleIndex = ComboBox(e.currentTarget).selectedIndex;
                    setSelectedLineStyle(ComboBox(e.currentTarget).selectedItem.data);
                } else if (canvas.activeTool is TextTool) {
                    // update font for text tool
                    font = Font(combo_list.selectedItem.data);
                    TextTool(canvas.activeTool).textSettings.font = font;
                    // update font index
                    _fontIndex = combo_list.selectedIndex;
                    // update font for any selected text
                    if (_objectManager.areObjectsSelected()) {
                        fmt = new TextFormat(null, slider_mc.value, fill_color_mc.selectedColor);
                        ts = new TextSettings(font, fmt);
                        _objectManager.changeSettingsForSelectedObjects(ts);
                } else if (canvas.activeTool is SelectionTool) {
                    font = Font(combo_list.selectedItem.data);
                    fmt = new TextFormat(null, slider_mc.value, fill_color_mc.selectedColor);
                    ts = new TextSettings(font, fmt);
                    // update font index
                    _fontIndex = combo_list.selectedIndex;
                    // update text tool
                    _textTool.textSettings = ts;
                    // update font for any selected text
                    if (_objectManager.areObjectsSelected()) {
                        _objectManager.changeSettingsForSelectedObjects(ts);
                Method    : setSelectedLineStyle()
                Purpose    : This method will update the active line with a new line
                          type.
                Params    : localType -- Type of Line.
            private function setSelectedLineStyle(localType:String):void {
                // update the Brush object if different type
                if(BitmapTool(canvas.activeTool).type != localType) {
                    BitmapTool(canvas.activeTool).type = localType;       
                Method    : setSelectedBrushShape()
                Purpose    : This method will update the active brush with a new brush
                          type.
                Params    : localType -- Type of Brush.
            private function setSelectedBrushShape(localType:String):void {
                // update the Brush object if different type
                if(BitmapTool(canvas.activeTool).type != localType) {
                    BitmapTool(canvas.activeTool).type = localType;
                Method    : scrollHandler()
                Purpose    : This method handles the event from the mouse scroll wheel.
                Params    : e -- MouseEvent object
            public function scrollHandler(e:MouseEvent):void {
                // calculate and set zoom of canvas
                canvas.zoom += (e.delta/3) * 1;
                // sync slider to new zoom value.
                zoom_slider_mc.value = canvas.zoom;
                // if canvas is zoomed in then display message about dragging canvas around.
                if(canvas.zoom  > 1) {
                    click_message_txt.alpha = 1;
                } else {
                    click_message_txt.alpha = 0;
                Method    : keyHandler()
                Purpose    : This method handle the keyboard shortcut to drag allow
                          the user to drag the canvas with their mouse.
                Params    : e -- KeyboardEvent object
            public function keyHandler(e:KeyboardEvent):void {
                if(!_objectManager.areObjectsSelected()) {
                    if(e.keyCode == Keyboard.SPACE) {
                        if(e.type == KeyboardEvent.KEY_UP) {
                            canvas.mouseDrag = false;
                        } else if(e.type == KeyboardEvent.KEY_DOWN) {
                            canvas.mouseDrag = true;
      

    This might be outdated since the discount is applied to the access portion and accessories only now.
    Verizon Corporate Discount List - HowardForums Wiki
    Verizon Employee Discount List for 2015

  • What is a good paint/drawing app?

    In a recent news release fromApple, they mentioned a fellow doing a cover for the New Yorker magazine.
    Does anyone know what paint/draw App he used for this?
    j.v. fromnc

    I believe the App used was Brushes. Brushes is no longer in the App store. It has been replaced by Brushes 3.
    I like Art Rage myself.

  • TS1702 I have an ipod touch,were can i find a simple compass app?

    I have an ipod touch,were can i find a simple compass app?

    There is no compass hardware in an iPod touch, so an app is not possible.
    Regards.

  • KM with DMS to markup a simple drawing

    We have a need to display and markup a simple drawing and store the marked up drawing with a document. I read where you can use DMS with a viewer to "redline" a document and that is stored in a layer not changing the original. We would like to do a similar markup in the portal. But do we need DMS viewer do this.  I had thought that there was a better way with KM in the Portal to keep track of unstructured data. If we can call up a simple drawing put in the fixes and markup and then save the markup with a document or on a document that would be all we need.

    Hi Peter,
    First you need the content manager role and the content admin role
    If you go to the tab content manager, you'll see that you have a subtab "forms builder"
    this is a tool to create your own forms, it is very easy to use
    This link describes how to get started with the xmlform builder:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ee639033-0801-0010-0883-b2c76b18583a
    Don't forget to generate the project to make it available to your portal...
    Afterwards you go to content administration -->portal content --> choose a folder where you want to save your IViews --> New iview --> from template --> KM navigation IView
    You have to fill in the fields <b>layoutset</b> (NewsExplorer and NewsBrowser are standard, NewsBrowser is read-only, and with NewsExplorer you can edit your forms and create new ones)
    Set the <b>layoutset Mode</b> to exclusive
    Fill in the <b>XML Forms Project Path</b> (always /etc/xlmforms/yourproject)
    Afterwards you have to create a page and add the iView to that page
    Then you can add the page to an existing role or create a new one
    If you create a new role, you have to give permissions to your users for that role and add the role in the user administration tab to the user(group)s
    Let me know if you need some extra help

Maybe you are looking for

  • Adobe Form

    Hi I work on Adobe Form.After creation the interface  i have create the form but in it i  face the problem to drag and drop the contents from interface to context . Can you tell me anyone how to contents drop from interface to context. Thanks and Reg

  • HTML Document: How to open in IE window without frame?

    Dear SDN members, We have created some HTML help documents for our ESS users. We added an icon to the different ESS WD iViews and when clicked, these icons link to the HTML file with the help text in it. Please see what I mean in the next screenshot:

  • Import procurement configuration ?

    hi experts Apart from pricing , what are the other configuration has to be done for Import procurement scenario? Thanks

  • Number Format Mask in Forms

    Hi All, If I enter 99999 in the form it has to display 99,999.00. What is the format Mask that I have to use to make it dispaly in this way. Actually I tried 999,999,999.99 but this is leaving empty spaces...and If the number is bigger then It wont d

  • Can I set Spotify Premium to playback on WiFi only

    Hi I am wondering if anyone help? I generally use Spotify Premium on the iphone via WiFi around the house. However occasionally the connection reverts to 3G. I am concerned that I may not notice the switch and I may eat into my data allowance. I am a