I get only a single level of cancellation with the pop method / Cancel button
Hello. Why this code produces only a single level of cancellation? I thought whenever the pop method is triggered on a table, the table shrinks and you can continue to pop as long as the table is not less than 0.
Here is my code:
import flash.display.MovieClip;
import flash.display.Shape;
import flash.events.MouseEvent;
import flash.events.Event;
// http://www.Kirupa.com/Forum/showthread.php?309502-AS3-spiral-effect ... it's one used previously in other files
// http://hub.tutsplus.com/tutorials/create-a-basic-drawing-application-in-Flash--active-1627 ... it's the one used here
var my_mc:MovieClip = new MC();
var container: MovieClip = new MovieClip();
stage.addEventListener (MouseEvent.MOUSE_DOWN, startDrawing);
stage.addEventListener (MouseEvent.MOUSE_UP, stopDrawing);
var shape: Shape = new Shape();
var myArr:Array = new Array();
var myArrRedo:Array = new Array();
var myArrObj:Array = new Array();
var undo_btn:MovieClip = new Btn_mc_undo();
var redo_btn:MovieClip = new Btn_mc_redo();
undo_btn.x = 10;
undo_btn.y = 350;
redo_btn.x = 110;
redo_btn.y = undo_btn.y;
addChild (undo_btn);
addChild (container);
stage.addChild (redo_btn);
var nums:int;
undo_btn.addEventListener (MouseEvent.MOUSE_DOWN, undoEvent);
redo_btn.addEventListener (MouseEvent.MOUSE_DOWN, redoEvent);
function undoEvent(e:MouseEvent):void {}
container.removeChild (myArrObj.pop ());
}
function redoEvent(e:MouseEvent):void {}
nothing yet
}
var num:int = 0;
function startDrawing(e:MouseEvent):void {}
Shape = new Shape();
container.addChild (shape);
Shape.Name = String (num);
myArr.push (shape.name);
myArrObj.push (shape);
shape.graphics.lineStyle (3, 0xcccccc);
shape.graphics.moveTo (mouseX, mouseY);
stage.addEventListener (MouseEvent.MOUSE_MOVE, whileDrawing);
NUM ++;
}
function stopDrawing(e:MouseEvent):void {}
stage.removeEventListener (MouseEvent.MOUSE_MOVE, whileDrawing);
}
function whileDrawing(e:MouseEvent):void {}
shape.graphics.lineTo (mouseX, mouseY);
}
a couple of these lines are surplus to troubleshooting (for example the num ++);
I offered him work. Maybe you have something else in the file which you have not realized.
If you put a trace (e.target) according to your drawing, you'll see that it calls the function of drawing when you click the button (s).
Here is a link to an example file using your code with a few adjustments for lack of content...
http://www.nedwebs.com/Flash/AS3_Draw_Undo.fla
Another remedy would be to create a separate drawing area of the buttons and target this area instead of the scene for your drawing listeners.
It would also be a good idea to use a CLICK listener to the buttons and not a MOUSE_DOWN.
Tags: Adobe Animate
Similar Questions
-
In the levels layer, I have only the option of 'grey '. When I create a fill layer, I can only see different levels of grey, not the color I chose. How can I change this?
Hi elizabethu,
Greetings!
Make sure that the image is not in gray mode.
If it is to change it to RGB mode.
Image-> Mode-> RGB
And try again.
Concerning
Jitendra
-
Use Photoshop Elements 2 and can't seem to get, but a single layer, is displayed in the palette no matter how many picutres I place in the document. What I am doing wrong?
Did some reading and found my problem. Sorry if I caused any problems. Am just true layers again. Thank you all
-
I am trying to install a wintv950q tv. tuner. on my computer, I get massege on framework arror net incompatble with the privious version. I have IE8. onmy computer? How can I fix that?
Hello Tommy275,
Thank you for your message. It is a known problem that occurs when you try to install the .NET Framework 2.0 on a computer on which .NET Framework 2.0 Service Pack 1 installed.To correct this problem, you must perform the steps in the link below, these steps are quite complex. If you have any questions regarding the procedure, please let us know and we will help you in any way we can.Please let us know if it did or did not help to solve your problem.See you soonEngineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.
-
my hp presario says 'boot mrg is missing' and only load windows 7 can correct with the recovery disk
my hp presario says 'boot mrg is missing' and only load windows 7 can correct with the recovery disk
Hello
Here is the vista forums
Try the repost in Forum windows 7 the link below
http://answers.Microsoft.com/en-us/Windows/default.aspx#tab=2
Answers by topic
- Office & Customization
- Files, folders, & search
- Game
- Hardware drivers &
- Install, upgrade, and activate
- Internet Explorer
- Music & Sound
- Networking, mail, electronic, & updated online
- Maintenance & performance
- Photos & Video
- Programs
- Security, privacy, and user accounts
- System repair & recovery
- TV and movies on Windows
- Windows Update
-
Windows Live Mail - only a single Inbox shows message in the message list.
I'm using Vista Home Premium 64.
The Inbox of my mail from Comcast in Windows Live Mail indicates that a message in the message list, but if I click with the right button on the Inbox folder and click Properties it says that I have 24 messages. I know that messages are there but hidden because if I delete the message that is displayed in the message list that which is hidden will appear.
How can I get all the messages to show both in the list of messages?
BTW, all other folders show all messages in their lists respective OK message including my Hotmail account Inbox, only the list Comcast Inbox folder message is this thing that is 'hidden '.
Thanks in advance to all those who may have an answer.
I just thought about it!
Tab 'View' / 'Conversations' must be set to 'Off' then in this case.
Thanks to all who responded!
-
timestamp get only date, time is not included in the selection...
Hi all
I have a question like that, here (defect_status) is a table with two columns of timestamp (start_date and end_date) including the date and time.
I selection of data in the table and return data as refcursor. When I'm extraction of cursor and printing data for the test, I get only part of date, part of an hour is not included when printing the data.
ex:
Ref_cursor OPEN TO select start_date, end_date defect_status;
Here start_date, end_date are the timestamps. but, I get only the date. part of the time not included.
Note: the statement select is written in dynamic sql.
can someone help me please. How can I get date with time.Hello
What of it?
Ref_cursor OPEN FOR select to_char (start_date,' dd/mm/yyyy hh), to_char (end_date,' dd/mm/yyyy hh) of defect_status;
Published by: Divya on October 12, 2010 12:25 AM
-
This didn't happen with the version 3 x, nor with the previous v4. Using the arrow to the left and clicking on the previous page request usually works ok. It happens several times a day. Full error is
XML parsing error: undefined entity
Location: jar:jar:file:///C:/Documents%20and%20Settings/shirley/Application%20Data/Mozilla/Firefox/Profiles/4txi20jj.default/extensions/ [email protected]! /chrome/bandwidthmeter.jar!/content/netError.XHTML392, column 33 line number:
& netOffline.longDesc;I am also getting this error and have been able to understand that its caused by the Bandwidth_Meter_and_Diagnostics - 1.2.5.xpi. This deactivation seems to have stopped the error, but is a major nuisance.
-
is it possible that a single screen will work with the slider and second focus mode
Hello
can you please tell me is it possible that a single screen will work with cursor mode and second focus mode.
Thank you
Hello
I don't think that it is possible to change the mode of the development of your application outside of in the config.xml file.
A custom extension may be able to do this, but I have not seen anyone this yet.
-
Sir... my model of computation used is ASUS Q500A and I also have the problem with my may even of them I also perform step u said in this forum, but may not work... my Windows I have used is windows 8. Please help me tnx
Separated from -.
Hello
Thanks for posting your query in Microsoft Community.
This problem is usually caused due to hardware or driver related issues. I suggest you try to install the latest drivers for the camera on the Asus or Windows Update site and check if it helps.
If the problem persists, then it would be better to contact Asus for more help on this issue. As this could be a problem with the hardware as well.
Support from Asus: http://www.support.asus.com/
Please do not hesitate to visit our Web site for any help with the Windows operating system.
-
I tried to build this in my current file as well. I just need to create a new from scratch so that my site will be better work for phone and tablet with the new sensitive provisions? www.nwtxconf.org. If you are on phone or tablet, you can see the extra space on the right size of the browser that I can't get rid of.
Relax, take a yoga class or singing...
Let it go - Karaoke breakpoint - YouTube
Wait the final notice of Dani at the end!
-
How can I get rid of the TV with the symbol of the camera in my project window, it's too much space.
This is the preview window.
In your support, it is show a folder but if it's a media clip... It is playable (Source Bin overview of monitoring).
Disable it in the drop-down Menu (three bars horizontal bit)
-
Get div to auto may not resize with the browser window
I'm trying to get a div with a paragraph of text will resize automatically when the browser window is resized.
I've seen what happens automatically, when I had no style applied to the < div > tag, but because I have my content centered using a < div > Interior inside a container fixed-width < div >, the inner div is now fixed so despite not having a fixed width.
Here is the page I'm trying to settle (the box with the text is the < div > inner circle in question):
http://beta.deltsig.com/about.html
Here's a test page showing what I want the text to do when the window is resized:
http://beta.deltsig.com/test.html
And here's the CSS of the inner divs and container:
{#div-container}
Width: 768px;
text-align: center;
left margin: auto;
margin-right: auto;
}
.div-redtint-flexsize {}
padding: 1px 20px 20px 20px;
text-align: left;
background-color: #f3e4e4;
-moz-box-shadow: 0 0 7px rgba (0, 0, 0,. 7);
-webkit-box-shadow: 0 0 7px rgba (0, 0, 0,. 7);
box-shadow: 0 0 7px rgba (0, 0, 0,. 7);
}
I tried to add different styles of width to the CSS, but nothing had no effect.
It's a style that I have to change in the container div?
You cannot have two meanings. Your page is fixed (px or em based) or liquid (% based).
A container fixed width parent does everything inside it fixed.
If you want to try to work with liquid layouts, go to file > New > blank page > HTML > layouts and select one of the liquid patterns from the 3rd Panel. Creating success.
Nancy O.
-
Transfer only a single backup time machine to the new drive
Old drive has Time Machine backups for macbook and iMac. A drive is not partitioned.
New B drive has been partitioned and my intention is to transfer a backup to each partition.
I can't drag the folder Backups.backupdb on the new disk as it will put two backups on the same partition.
Can I create a folder Backups.backupdb on each partition, and then drag the backups in their respective folders on their respective partitions?
Thank you.
Try using disk/restore to copy the backup to a new location. Please note that this will reformat the destination partition.
-
Ways to restore by using this section of the support of Firefox do not do.
Hello
Please try pressing F11 on the keyboard or click full-screen output. See also keyboard shortcuts...............................................................................................................................
Useful links:
Beyond the tools > Options - about: config
Files & Firefox profile folder
Maybe you are looking for
-
PDF.js mangles police embedded Viewer
I have a number of documents I want to integrate into the Web pages for easy access. It is a PDF file generated with pdftex locally under MikTeX. They use fonts Adobe Minion Pro. They make seamless in Adobe Reader, Sumatra, PDFXchange and chrome (wit
-
Error bad 5205 satellite on recovery machine
My 5205 s703 came with a bad machine after an attempt to recover from a system failure. I remember using the DMI toshiba update to try to resolve the problem of ID. (he is the ID changing 5205 to 5200 5205). That's why the recovery disk does not work
-
Installed Firefox 3.6.10 now my mouse wheel does not scroll
I just installed FF 3.6.10 update, and now my mouse wheel does not scroll. I checked my settings of the mouse, and everything is OK. Mouse wheel scrolls in applications non-Firefox, including offline and IE records online. The mouse wheel has worked
-
Can someone help me with the passowd of BIOS on a mini 1000. I bought the computer on sale at auction of na and found that it was locked code is CNU9105JLW. Thanks Craniack