ActionScript 3.0 :: Undo Last Action In Drawing?
Jan 12, 2011
I have a problem with functions, i'm creating a painting app in flash as3. i want to draw two different style a pen and rectangle.
When i draw pen style in first frame there is no problem, but when i click rectangle style in second frame it is drawing with both style. How can i stop or kill other function?
How do I make both of the not drawing. And How can i undo my last action in drawing?
[code]...
View 4 Replies
Similar Posts:
Aug 5, 2005
i'm currently devolping a drawing board out of flash but i was wondering instead of erasing all the pen lines drawn just the last pen line drawn,im using kirupa drawing board tut for the all erase just stuck to gewt the last line erase done
View 9 Replies
May 16, 2010
I found this code on a forum which allows for an undo and erase button for a drawing application (and is perfect for what I need) but it's in AS2 and I can barely make sense of it:
Code:
_root.attachMovie("canvas", "canvas", 0);
d = 0;
[code].....
View 5 Replies
May 3, 2009
I somehow hided the frames:How du i undo that?
View 2 Replies
Feb 22, 2007
I have developed an small application in flash 8. It is creating xml at runtime and add new nodes,delete particular nodes at run time. I want to use undo option in this application.
View 5 Replies
Sep 5, 2009
How to implement undo/redo functionality? Actually I have a painting canvas in flash in AS3.0. For it I need UNDO/REDO functionality as user draws.
View 2 Replies
Dec 2, 2009
Im wondering how to implement undo redo functionality with a TextArea. I already have an undoredo framework functionality working, now I have two questions.When do I start/stop a new undo/redo command, eg when a user hits undo, how far back do I go. How do I implement this(1.) in a normal TextAreay thinking:I thinking that I should create a new undo command, when anything but a alphanumber+space is hit. To do this I would use the keyDown event and test if the key is alpha num if it is not I will reset the command.
View 3 Replies
Jan 17, 2011
i've been unsuccessfully attempting to create my own undo/redo classes that work well with any type of possible undo and redo commands.
for example, my simple class works perfectly with undoing/redoing x and y positions of display objects or undoing/redoing values of sliders, etc., but things get dicey when i try to tailor my classes to also work with things like adding and removing items to a list.
is there any well known and well documented solution for general undoing and redoing for actionscript (without Flex)?
View 1 Replies
Nov 16, 2011
I am going to create an application in that i have to implement an Undo and Redo feature. In the application there will be multiple objects located on stage and user can customize the position of the objects. But when user clicks on Undo the object go back to their default position and after clicking on redo object will move on the new position. So my question is how can I apply these feature in my application? Is there any library or any third party classes?
View 3 Replies
Apr 30, 2010
I created some Combobox and, when you select each item, a Movieclipappears with a different width,height and name.When it's in the scene you can Drag it to the position you wish.I made two button:Undo(), Redo()for the user who wish to make a previous action,in other words,put the Movieclip to its previous place.I try something with some Arrays that capture the different position when Drag is stopped.I place a Shared Object for registring all the previous position but I don't know how to make it work.So,I show you my code.function of the combobox:
Code:
ComboBoxclassic.addEventListener(Event.CHANGE,select);
function select(evt:Event)
[code]......
View 0 Replies
Jan 21, 2010
Loads an image to an Image component Transform the image (rotate, flip) with the Matrix Apply filter(s)
Now I am thinking about to create some undo redo functionality. Each time I do a transformation / add an filter I want to be able to go back to the previous image (before the action).
My thought is to have an Array and add the previous bitmap to the stack. But I see that there are some differences between transformations and filters I have also seen the ImageSnapshot and whot i can do and it looks like what I am after.
View 1 Replies
May 8, 2006
im currently developing a flash paint app for the psp and im stuck in a little rut here i need a way to allow the user to change brush size depending on what they press aka if they press pencil get a thin line stroke,if big brush big line stroke is there anyway of doing this?
and the next one how can i make a undo button so it undos the last line done
[Code]...
View 7 Replies
Apr 11, 2007
i'm making a drawing tool in flash with the ability to draw shapes, put text, etc. i need to incorporate undo/redo facility in it. is there some efficient way to go about it? or will i have to go the hard way, remembering in some way the last three actions performed by the user in an array or stack or something??
View 2 Replies
Nov 24, 2009
1. Can I create an UNDO button to my runtime editing website?
2. Can I create a REFRESH button which will only refresh the current frame?
View 2 Replies
Jun 9, 2011
I have a simple TextArea
[Code]..
Everything works as expected, but the undo buffer is reset / stops at the point that a tab was inserted.Is there a way to ensure that the undo buffer remains in tact even with the tab inserted
View 1 Replies
Aug 7, 2010
I wnat to make my movie clip undo redo how to make them in flash application similar to Microsoft office 2003 application..
View 1 Replies
Oct 2, 2006
Code:
_root.navigationMC.onPress = function() {
startPreload("blue.swf");
}
If I wanted to change an action from a button click to a frame-based action, what do I use instead of onPress? The hints from the AS editor are all click-based.
View 1 Replies
May 8, 2009
I have a slideshow that is looped ... it contains 5 slides.I am using a gotoandPlay action to control the slide show.
on (release) {
this._parent.gotoAndPlay("98");
}
There is a fade transition between slides.When a button is released ... I want to gotoandPlay (frame 98) ... and then have it stop 10 frames later on (frame 108). Frame 98 includes the transition ... if I just gotoandStop on frame 108 ... I loose the transition.Is there any way to incorporate a stop action, after a gotoandPlay action on my button ... without naming instances etc.I.E.
on (release) {
this._parent.gotoAndPlay("98");
STOP ON FRAME 108 INTEGRATED HERE
}
Everything I have attempted is not working.
View 1 Replies
May 23, 2009
I just want to make a simple button action using actionscript 2 but I can't get it to work! I'm sorry for even asking but I've been at this for too long now for it to not work I'm using Adobe Flash CS4 and I do the following --
File -> New Flash File (ActionScript 2.0)
Insert -> New Symbol
Name - test
Type - button
Export for ActionScript
Identifier - test
And then draw it in using the keyframes and add the code to 'Actions - Button' for my button
Code:
on(release) {
trace("trace");
}
I click on the button and it animates but no action event in the trace?
View 3 Replies
Nov 9, 2010
i've tried to simulate a pencil tool, for drawing above a imagem, but the drawing is below the picture. How fix it?
[Code]....
View 3 Replies
Nov 4, 2010
How can I get an action to follow another action when a button is clicked? When a button is clicked, I want the timeline to go to a certain frame and play and when it's done playing, to go to another frame and play. I basically want two actions in one function.
[Code]...
View 1 Replies
May 2, 2003
i want to do this:
on (release) {
_root.nextMovie = "externalmovie.swf";
_root.cover.gotoAndPlay("close");
[code].....
View 1 Replies
Jul 22, 2009
Basically I've got a reasonably complex drawing object in a fla and I want to reproduce it in a class definition using the drawing api. However obviously this is a tedious task, so is there some trick or automated method of doing this?
Last time I needed to do this it was a drawing of an arrow and I ended up writing down x,y,width,height values for everything but this one has curves in it which I don't have experience with drawing anyway.
View 2 Replies
Jan 27, 2011
I am using code from a tutorial that I downloaded to get an Home.swf to preload in my "index" page.the problem is that a part of the code reads
movie1_btn.onPress=function(){
startPreload ("Home.swf");
}
which means that I have to create a button to get the .swf file to load, how do I edit this code so that the action begins on it's own at that frame?
View 5 Replies
Sep 28, 2009
I cannot get this to work. Without the "var drawing", "var drawing being true or false" and the "if statement", it works fine. But I need to add the "var drawing" so that you can only draw if you turn it on by pressing the "draw_btn" button. Note, I do not get an error, the script "apparently" contains no errors. Here is the code:
ActionScript Code:
var drawing = false
_root.createEmptyMovieClip("myLine", 0);
[Code].....
View 3 Replies
Jan 13, 2012
I've created a drawing tool which allows the user to draw on the canvas, the problem is that if I try to draw over a movieclip nothing happens. Is there a way I can allow for the user to draw over movieclips? For example if I had a background of paper?
Here's the code I'm using for it:
// This code is for drawing the lines on the page
//1.
var drawingLine:MovieClip = new MovieClip();
addChildAt(drawingLine,0);
[code]....
View 8 Replies
Apr 22, 2011
I'm assisting my professor with a class helping students build an online portfolio. Yesterday, one of the students sent me a bunch of .fla files to review and I made some changes, inserted a bunch of comments in the code and told her to change the rest of her files into the same format. (Adding keyframes, frame labels and button codes, etc.)
Then she emailed me to tell me that she keeps getting this error message every times she makes a mistake and tries to "undo" something.
"Every time I open up the drawing page and another one of my subpages like logo design for example, I work on what you said to do, but if i make a mistake and undo it, I get this error message and all my images disappear completely from the time line. I have attached a screenshot of the error message, maybe you know whats going on but I'll keep working on it and try to not have to undo something because at the moment that seems to be the problem. I have to close flash and reopen everything to make it go away."
[Code]...
View 1 Replies
Feb 18, 2009
I need to draw on stage about 40,000 4x4 squares each a different color. The color is determined by an xml file. I have this working in as2 and have converted it to as3 the problem is the amount of time it takes to draw is causing cs4 to time out. I have extended the script time out to 60 seconds. In cs3 as2 it would draw the squares in about 15 seconds. I was hoping as3 cs4 would improve performance but seems to be the opposite. I have tried several methods such as adding children and various drawing variations. the bellow seems to work the best, but is still causing flash to crash.
ActionScript Code:
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;
[Code]...
View 9 Replies
May 17, 2009
Like, I perform some operations with bitmapdata (puttin' pixel there, filling with color)I have those two functions. bmdCavas it tied to actual Bitmap with image, which is placed on screen.
[Code]...
But this code is not working. Should I redraw image after changing itx bitmapdata or something? or maybe I have to do undo function with bitmap itself?
View 2 Replies
Jul 13, 2009
I converted a bitmap to vector. I am removing all the useless extra points which get created in that process. Occasionally I will mis-click and end up moving or deleting a shape. When that happens I want to use "undo". But ctrl-z and undo from the menu do not simply undo the last action. It also goes and adds useless extra points all over the place. Why? Is there a way to make it quit doing that? It looks to me like it is a very bad bug.
View 3 Replies