erase the drawing of the scene

Hey, it's a drawing program new and smoother I created from a reference book that I use to learn more about AS3.

I tried to erase everything that was shot on the scene with a similar function in a recent previous post, but I don't get it.

Maybe you can point me in the right direction again.

States 'Flash help' there is a clear() - function? but when I try to use as an error that says that this is no longer supported. I tried addChildAt() and inserted different Num but he just erased everything, including my button.

the current code is:

var drawing: Boolean = false;

this.graphics.lineStyle (5, 0 x 000000);
this.graphics.moveTo (mouseX, mouseY);

this.addEventListener (Event.ENTER_FRAME, onLoop, false, 0, true);
stage.addEventListener (MouseEvent.MOUSE_DOWN, onDown, false, 0, true);
stage.addEventListener (MouseEvent.MOUSE_UP, onUp, false, 0, true);

function onDown(evt:MouseEvent):void {}
drawing = true;
}

function onUp(evt:MouseEvent):void {}
drawing = false;
}

function onLoop(evt:Event):void {}
{if (Drawing)}
this.graphics.lineTo (mouseX, mouseY);
} else {}
this.graphics.moveTo (mouseX, mouseY);
}
removeBtn.addEventListener (MouseEvent.CLICK, removeDrawing);
}

function removeDrawing(event:MouseEvent):void {}
This.Clear (): void;
}

I have other issues to realize that you can solve only one at a time.

See you soon

Try to use...

function removeDrawing(event:MouseEvent):void {}

This.Graphics.Clear ();

This command clears the drawing and resets

things, so if you want to continue drawing...

this.graphics.lineStyle (5, 0 x 000000);

}

Tags: Adobe Animate

Similar Questions

  • Cannot add scenes or the scene window

    Hello

    I can't add scenes to my flash movie. When I go to insert > scene, the scene button is not selectable. When I go to Windows > scene, the scene window is not selectable. I also have troed using keyboard shortcuts, which have not worked or the other. What can I do about it? I would like to add scenes, as I work on projects large enough and confusing.

    Any help is appreciated.

    Thank you.

    If you can break out using scenes, you are on a better path.  You can work in a movieclip the same way that you work on the main timeline... a MovieClip is pretty much just a portable version.

    Here's a quick guide...

    (1) select: Insert-> new symbol

    (2) in the interface that opens, select MovieClip and give it a name like you would click for a scene... OK

    The step displays the working area for the movieclip and his internal chronology is visible (if you have the open mounting Panel).  You should be able to see the line of sight that mark 0.0 for this movieclip registration mark.  For now just draw something in this context 1 and then choose the command Edition-> edit the Document to return to the main timeline.

    Go to the library and drag a copy of the new movieclip on the stage and find him as you wish - you might consider placing to make it in the upper left corner of the main stage so that it has the same reference as the scene with respect to x and y.  Then, you can double-click this movieclip on the stage to edit and create animation inside.

    If you already have a main storyline with an animation in it, you could select all the layers/images of this animation and right-click and choose copy image.  Then you can paste what you copied inside the movieclip in opening it upward for editing by selecting the keyframe in this and right click and choose Paste frames... all layers and automatically fill the pictures you copied inside the movieclip.

    I recommend you do something simple to get the hang of it.  It is not difficult and is no different than the animation in the main scenario building.

  • Windows 8.1 Flash Pro - Pro: selection of the Menu panes and the window doesn't make it not fully, or are misaligned. Same thing with the scene

    This bug makes the program almost unusable for anyone using Windows 8.1.  I have a Setup dual monitor: 1920 x 1200 and 1920 x 1080, on the other hand, AMD Radeon HD 5700 Series drivers (latest versions), running on an OS Pro Windows 8.1.  When you try to view the various aspects of menu option, windows does not realized fully, or you are hidden.  Also the scene so moves to the lower right, making the program almost unusable. I tested it on a Mac, as well as on a windows machine 7 and it does not work here.  So it seems to be that in a machine Windows Pro 8.1.   I've attached screenshots of what I see.  Notice to the first image, we look on the new component document. You don't see the options fully and that they are shifted to the right out of sight.  The following image shows both the scene shifted to the right, as well as the document pane.  The options are not fully visible and trimmed off the coast.  The window itself is not resizable.  I erased the appdata and re-installed the program. Same result.  I tried to solve this via the cat, but your guarded network connection is lost. Please let me know if someone suffers from this and any resolution. Thank you!

    FlashMenuIssue.jpgFlashMenuIssue1.jpg

    Thank you Sir!  The scale was the problem and the solution.  Clicking on settings-> display-> text and fonts link-> it was set by default at 125%. For anyone else who has this problem, set it to 100% and it will solve these problems.

    Thanks again! Return to development

  • How to reframe the scene

    Hi, I have drawn objects outside the scene, thinking they would be croped automatically when you create the swf file. BUT it doesn't work. The objects are of course on the stage, but pour over the edge... Anyone who knows what I have to do? To actually draw the objects within the scene can be trickey, since they are supposed to be larger than the stage. If I draw them inside the stage there is a risk of a small gap... Hope this is understandable...

    To get only the visible scene in all conditions you can place a mask on the stage, which means that the mask will hide everything that lives in your timeline.  Alternative to that, if any masking will be too complicated, you can try to create the equivalent of a photo frame with a rectangle that you place on a layer above all other layers... it would have a cut to the size of the stage so that the content of the scene is visible, but which also be tall enough to hide anything that falls out of the scene.

  • trying to control the scene

    Hello

    I received excellent responses to my concerns about the AS3 for a simple drawing application.

    At this point, everything works, but I can't get the lines to draw on top of the MovieClip box_mc.

    At this place, my solution is to change the alpha of box_mc to 0. Now I can see my drawings which lie under the box_mc, but to keep within the limits of the MovieClip.

    Maybe my way of thinking is too specific, but I tried to get the drawing lines to stay on top of the box_mc of MovieClip, as if it were a small drawing board.

    I tried to place a reference to the scene in various places and use addChildAt() to see f I can change the location of MovieClip in the hierarchy, but so far nothing has worked. Any suggestion would be great. I enclose the current code.

    Thank you

    All you have to do is add a sprite on top of your box and draw in it. I deleted all managers of button, for clarity - here is the code

    var drawing: Boolean = false;
    var box_mc:Box = new Box();
    var drawBox:Sprite = new Sprite();

    box_mc.x = stage.stageWidth 4;
    box_mc.y = stage.stageHeight 4;
    addChild (box_mc);

    addChild (drawBox);
    drawBox.mouseEnabled = false;
    drawBox.graphics.lineStyle (1, 0 x 000000);
    drawBox.graphics.moveTo (mouseX, mouseY);

    box_mc.addEventListener (MouseEvent.MOUSE_DOWN, onDown);
    box_mc.addEventListener (MouseEvent.MOUSE_OUT, stopDrawing);
    box_mc.addEventListener (MouseEvent.MOUSE_UP, stopDrawing);

    function onDown(evt:MouseEvent):void {}
    drawBox.graphics.moveTo (mouseX, mouseY);
    box_mc.addEventListener (Event.ENTER_FRAME, onLoop);
    }

    function stopDrawing(evt:MouseEvent):void {}
    box_mc. RemoveEventListener (Event.ENTER_FRAME, onLoop);
    }

    function onLoop(evt:Event):void {}
    drawBox.graphics.lineTo (mouseX, mouseY);
    }

  • How to add a container to the scene

    The code below fails to add Test.mxml to the scene. If I change Test.mxml to be a HBox instead of a UIComponent, it works. What should I do to make the content of the Test appear in the TabNavigator if I keep the Test as a UIComponent?

    Thank you!

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML " "xmlns:local ="*" layout = "vertical" creationComplete = "init ()" >
    < mx:Script >
    <! [CDATA]
    private function init (): void {}

    }
    []] >
    < / mx:Script >
    < mx:Panel >
    < mx:TabNavigator width = "300" height = "225" >
    < mx:VBox label = "Login" >
    < mx:Text text = 'Instructions go here... '. "/ >
    < / mx:VBox >
    < mx:VBox label = 'Instructor' >
    < local id: Test = "test" / >
    < / mx:VBox >
    < / mx:TabNavigator >
    < / mx:Panel >
    < / mx:Application >

    Test.MXML

    " < = xmlns:mx mx:UIComponent ' http://www.Adobe.com/2006/MXML ">
    < mx:HBox id = "dashboard" >
    < text mx:Text = "Total correct" / >
    < / mx:HBox >
    < / mx:UIComponent >

    Wrap your Sprites in UIComponent:

    var mySprite:Sprite = new Sprite();

    ... to make the drawing with the Sprite or something else

    var uic:UIComponent = new UIComponent();

    uic.addChild (mySprite);

    myCanvas.addChild (uic);

    If this post has answered your question or helped, please mark it as such.

  • Can't erase the history of Safari completely

    So somehow, I managed to set up the date to December 31, 2100. The only problem is that I opened YT in Safari and now I can't erase it from history. When I remove and reopen Safari it comes back. I tried to erase the history, but it did not help. However, it seems that it has disappeared from my Mac, now I can't remove it to iOS.

    There are solutions to this problem?

    Yes, I absolutely do not learned to play with the date.

    Settings/Safari/clear history and data from the Web site does not work?

  • Erase the iPhone 6, iOS 10 to negotiate?

    I was in a hurry and do not pay attention to all the steps when I was preparing my phone to trade. I disabled the parameter "Find my iPhone" and then "erased all content and settings", then packaged upward and sent to Verizon. I didn't sign icloud first.

    My question is, I'm having a problem?

    No, if you have disabled find my iPhone. You can check it out by going to iCloud.com on a computer, open find my iPhone and see if your device is still on display. This it is, and it is connected to Wifi, you can select it and delete it again. It will ask you your password ID Apple/iCloud, and which will disable and erase the device. If you remove an instrument - this means that find my iPhone has been disabled. I wouldn't remove the device at this point.

    Once you are sure that Verizon is to have no problem with your device, you can then remove it from your iCloud account. But better not to do it until you get the all clear on their part. Easier to solve the problem if you are always bound...

    See you soon,.

    GB

  • How can I erase the data on my laptop before I give it away?

    How can I erase the data on my laptop before I give it away?

    See this document.

    https://support.Apple.com/en-us/HT201065

  • My iPhone was stolen, and find my iPhone is disabled, how can I erase the data on my iPhone

    Hello

    My iPhone was stolen and "Find my iPhone" has been disabled, also phone was not synchronized with iCloud.

    Is it still possible to erase the data on the iPhone.

    Using the IMEI number, can I block my iPhone.

    Indications will be useful.

    Sorry no.

    You can report it to the police and tell your provider of mobile telephony on the flight.

    In addition, change your passwords.

  • Erase the disc, re - install OS

    I have an iMac with three partitions on the system disk. I want to erase the disc (including partitions) and re - install OSX. What is the best way to do it?

    Boot from the recovery partition - hold command-r immediately after pressing the power button.

    Here, you can wipe the drive and install the operating system for the network.

    Edit: This can install the version of the operating system provided with your mac; Then use the normal procedure to update.

  • With the 38.0.5 version, I can't erase the history or add bookmarks! Even in safe mode.

    When I do CTRL-D, nothing appears, and when I select 'Book mark this page', nothing happens.
    In addition, it will NOT erase the history.

    Have refreshed, removed, reloaded, doing everything I can. These two problems.

    You can check for problems with the database places.sqlite file in the Firefox profile folder.

  • By clicking on the address bar or search bar and typing does not erase the previous text inside

    When I click on the address bar or search bar and start typing a new entry, it does not erase the previous text. I always have to remove it first to clear the field and then I can type in the new URL or keyword...

    OK, I found the search the on: configuration database. The problem is that browser.urlbar.clickSelects.All is set to "false". I changed it to "true" and now everything is perfect...

    Also to solve the same problem with the search bar, I changed browser.search.context.loadInBackground from false to true.

  • After erasing the iphone 6 will be triggering after restoration of restrictions?

    After erasing the iPhone 6 will be triggering after restoration of restrictions?

    Until you restore as new and does not use a backup which contained the restriction code, Yes, it will be gone.

  • can I erase the disc without any wireless networks

    I have a time capsule which is my wireless router.  I have not used for time machine because he has older backups of Mac and does not place to save my current iMac.  I can erase the disc without any wireless networks?  I do Air Port utility?

    I can erase the disc without any wireless networks?

    Yes

    I do Air Port utility?

    Yes, see the procedure below

    • Open AirPort Utility
    • Click on the image of the Time Capsule
    • Click Edit in the window that appears
    • Click the disks at the top of the next window
    • Click on clear disk
    • Choose the Quick erase option
    • Click clear

    The procedure will take only a minute or two

Maybe you are looking for