can someone help me convert actionscript 2.0 to actionscript 3.0 for my interactive sketch notebook?

If anyone can come back to me, I'd be grateful help.

I worked on the provision of an interactive drawing buffer but started from a model that was in actionscripts 1 & 2. but when I converted to actionscript 3.0, there are errors.

I understand not really good coding and hoped someone could help me to make it work for actionscript 3.0.

Here is the code for actionscript 2.0 (it works perfectly when in the right format)

lineThickness = 0;

selectedColor = "0x000000";

_root. OnMouseDown = startDrawing;

_root. OnMouseUp = stopDrawing;

startDrawing() {} function

If (_xmouse < 455) {}

_root. LineStyle (lineThickness, selectedColor);

_root. MoveTo (_root._xmouse, _root._ymouse);

_root. OnMouseMove = drawLine;

}

}

drawLine() {} function

_root. LineTo (this ._xmouse, this ._ymouse);

}

stopDrawing() {} function

delete this.onMouseMove;

}

line0.onPress = function() {}

lineThickness = 0;

};

line3.onPress = function() {}

lineThickness = 3;

};

Line6.onPress = function() {}

lineThickness = 6;

};

colorRed.onPress = function() {}

selectedColor = "0xFF0000";

};

colorGreen.onPress = function() {}

selectedColor = "0x00FF00";

};

colorBlue.onPress = function() {}

selectedColor = "0x0000FF";

};

colorYellow.onPress = function() {}

selectedColor = "0xFFFF00;

};

colorMagenta.onPress = function() {}

selectedColor = "0xFF00FF";

};

colorCyan.onPress = function() {}

selectedColor = "0x00FFFF";

};

colorBlack.onPress = function() {}

selectedColor = "0x000000";

};

eraser_btn.onPress = function() {}

_root. Clear();

};

use:

var lineThickness:int = 0;

var selectedColor:int = 0 x 000000;

this.addEventListener (MouseEvent.MOUSE_DOWN, startDrawing);

this.addEventListener (MouseEvent.MOUSE_UP, stopDrawing);

function startDrawing(e:MouseEvent):void {}

If (mouseX<455)>

{with (this.) Graphics)}

lineStyle (lineThickness, selectedColor);

moveTo (mouseX, mouseY);

this.addEventListener (MouseEvent.MOUSE_MOVE, drawLine);

}

}

}

function drawLine(e:MouseEvent):void {}

{with (this.) Graphics)}

lineTo (mouseX, mouseY);

}

}

function stopDrawing(e:MouseEvent):void {}

this.removeEventListener (MouseEvent.MOUSE_MOVE, drawLine);

}

for (var i: int = 0; i<>

This ["Line" + i] .addEventListener (MouseEvent.MOUSE_DOWN, downF);

This ["line" + i] .ivar = i;

}

function downF(e:MouseEvent):void {}

lineThickness = MovieClip (e.currentTarget) .ivar;

}

var colorA: Array = [[colorRed, 0xff0000], [colorGreen, 0x00ff00],..., [CouleurJaune, 0x000000]];

for (i = 0; i<>

colorA [i] [0] .addEventListener (MouseEvent.MOUSE_DOWN, colorF);

colorA [i] [0] .ivar = i;

}

function colorF(e:MouseEvent):void {}

selectedColor = MovieClip (e.currentTarget) .ivar;

}

erase_btn.addEventListener (MouseEvent.MOUSE_DOWN, eraseF);
function eraseF(e:MouseEvent):void {}
This.Graphics.Clear ();
}

Tags: Adobe Animate

Similar Questions

  • Can someone help me convert my logo in 300 DPI?

    I have a logo that I need to print on a sticker, but need to be 300 DPI, crisp, clean, etc... The police is a Futura Md BT. can someone help me? Here is a link to the file:

    http://www.makaiman.com/work/LVCLDecal.FW.PNG.zip

    Thank you so much!

    If you want 300 dpi, clear, clean, no matter what size you need to keep your layered PSD file where you have your logo in forms and layers of text with layer styles. When you have that you can use the size of the image to create any image size you want and you save a png file.  The logo is quite simple to create with the shape tools, text tools, and the layer styles. http://www.mouseprints.NET/old/DPR/LVCLDecal.PSD make an 8 "300 dpi PNG all you need to do is check resample and constrain the set 8" wide and 300 DPI in the Image Size dialog box. and you get this:

  • Hello everyone, can someone help me... I just bought my Lightroom for Mac 6.0 and entrust. Unfortunately, development module is not active... He asks me every time to connect to with my Adobe ID... but each time, he told me that I have no inter

    Hi all
    can someone Help me... I just bought my Lightroom 6.0 for Mac et l’ai installed. Unfortunately, development module is not Active ... he asks me each time to connect to with my Adobe ID ... but every time he told me that I no internet connection. While it is true, my internet working properly. I uninstalled lightroom, updated and reinstalled my OS but still the same problem ... what to do?
    Thanks for your help.

    Hello

    Please see the link below see the correct answer.

    Lightroom 5.5 'Module Development disabled, please renew your membership '.

    Also check that you are using your Adobe ID to you connect.

    Try to rename the Gosts file to solve the internet No connection problem.

    Check errors Sign in, activation or connection. CS5.5 and later, Acrobat DC

    Hope this helps

    Assani

  • can someone help me to convert the code in labview 5.1 in labview 8.5

    Hi, can someone help me to convert attached labview V 5.1 VI into a labview 8.5 VI?

    Thanks in advance.

    Altaf

    Here you go

  • I want to convert windows 7 for xp professional can someone help me?

    I want to convert windows 7 for xp professional can someone help me?

    Hello

    Thank you for contacting Microsoft Community.

    Unfortunately, you can not convert Windows 7 to Windows XP. You will need to perform a new installation of Windows XP (for example formatting partition of Windows 7 and then installing Windows XP).

    Try the Windows XP Mode, which requires Windows 7 Professional or ultimate or business (32-bit or 64-bit, both are supported) where a copy of Windows XP must be installed through Windows Virtual PC. You can install and access the applications in Windows XP Mode.

    Note that the support (currently extended support, support mainline has been terminated already) for Windows XP will end soon.

  • Can someone help me? I need a Corel Draw (.cdr) graphic converted to Illustrator

    I'm trying to get a logo from Brandsoftheworld.com but the one I want is in. CDR. I do not have Corel Draw (which is most), but I see that Illustrator 6 can open it. Unfortunately, I'm still on CS5.5. Can someone help me?

    Send it to me. I'll save it as EPS file for you.

    Bob at theindesignguy DOT com

    TwitchOSX <> [email protected]>

    Thursday, January 24, 2013 19:11

    >

    Can someone help me? I need a chart of Corel Draw (.cdr)

    converted to Illustrator

    created by TwitchOSX http://forums.adobe.com/people/TwitchOSX> in

    /InDesign/ - see the full discussion

    http://forums.Adobe.com/message/5020999#5020999

  • Can someone help me understand how to access such RW2 files saved by my Lumix LX100 in Lightroom 4.4?

    Can someone help me understand how to access such RW2 files saved by my Lumix LX100 in Lightroom 4.4?

    Hi Edward,.

    4.4 Lightroom does not support files of Lumix LX100 RW2. You need at least 5.7 version of Lightroom to access these raw files.

    Or, you can use free Adobe DNG Converter to convert raw to DNG files, and then import the DNG in Lightroom.

    For Mac: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5854

    For Windows: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5864

  • Hi, I'm really new to photoshop and I have a design that I need to have transparent background? can someone help please?

    Hi, I am really new to the photo shop and I have a logo design, I need to have the transparent rendering of a white square? can someone help please?

    already have the image on my screen, I can't seem to find the tool to make it transparent as I do with other software.

    When you see a background in Photoshop, it may not be transparent, single layer can have transparency. Background isn't a leyer, even if you see it in the layer panel.

    Double click on background and will convert them in a blanket all Layer 0. Now you can create any form of transparency with the tools you want.

    But when it comes to logos, Photoshop is the wrong choice. You should do logos in Illustrator, not in Photoshop.

  • iOS 10 and iBook. Can someone help me change my iBook to actually resemble a book reading?

    Hello, I am looking for help for iBooks and iOS 10.  Before iOS 10 I could read my iBook in landscape and actually looked like a book I would read if I bought it, but now if I read a book and a landscape I'm not seeing that more in iBooks, now that I'm in class place my iPad iOS 10. Can someone help me?

    Thank you Chrissy

    Hi Chrissyy2008,

    I understand that when read your ebook in iBooks for iOS 10 reviews landscape you're used to seem a little different in the version update of iBooks. With the updates and upgrades will come from small changes in the way in which your apps to display its contents. If you are still able to read the book through view of landscape, this we know that the application works as expected. You can try to adjust the appearance of the iBooks app to have it look exactly as you wish during playback in landscape mode.

    Change the appearance of your books

    You can adjust some features of some ePub books or some books created with iBooks author, including:
    Size of the font. Choose from the included fonts. For the moment, cannot install and use custom fonts.
    Text color and the background. In iBooks 4.0 or later, you can use three themes: white, sepia and night. (Select option at night to read books in the dark.) Turn on the Auto-nuit theme to automatically switch to the theme of the night in low light.
    Scrolling. In iBooks 3.2 or later, you can use the view to scroll to read your books in a continuous vertical scrolling instead of turning pages. This feature is available in any theme.
    Share ideas with friends. In iBooks for iOS 3.0 or later and in iBooks for Mac, you can share the highlights and the selections on Facebook, Twitter, Messages or Mail (United States only).
    You cannot change the appearance of the PDF documents or audio books.
    Not all of these features work with EPUB files created with improved author or some other ePub iBooks.

    You can find this useful link to learn all the features of iOS 10 iBooks app. On iBooks

    Please use the Apple Support communities to post your question. I hope you enjoy your shiny new iOS and more importantly, read ebooks in your iBooks app!

    Have a great day.

  • I want to change the secret question. Can someone help me? TQVM

    I want to change the secret question. Can someone help me? TQVM

    Security issues Apple - ID

    Account security issues almost always require directly contact a representative from Apple to firmly establish your identity as the account holder. You can configure so that Apple you call, either immediately or at a time convenient to you.

    1. go to http://www.apple.com/support/appleid/

    2 choose to contact Support, then click on contact Support

    3. choose other subjects of Apple ID and choose the appropriate topic for your question (questions of security or password)

    4. choose, no thanks, continue

    5. choose the best method for you to contact Apple

    By the end of 2012 Mac minis, macOS?  Watch, 38 mm silver AL, Watch BONES 2.2.2; iPad 2 Air & iPhone 6 + iOS?  Apple Airport Express

  • I have problems with Disk1: i/o error and com.apple.xpc... Can someone help me please?

    Hello

    Problem: when I put my computer to sleep, wake up, there is a noticeable delay in performance. Internet is slow to reconnect, and GUI is unresponsive. This occurs for about 10-15 seconds, and then things come back to life.

    What I tried:

    I opened the console, and I copied the report. I found a few warnings, which I post some (in failure).

    core of the host [0]: CoreStorageGroup::completeIORequest - 0xe00002ca error detected for LVG 'Macintosh HD' (4F6A789B-E1E1-458F-908A-844CDFA246CB), pv 31458C 06-C725-4647-A817-A8C8461D59A2, near LV byte offset = 242813976576.

    LHOST kernel [0]: disk1: i/o error.

    LHOST kernel [0]: sandbox: launchd (1) political system: deny (1) - flags-writing files/private/var/run/dyld_shared_cache_x86_64

    LHOST kernel [0]: sandbox: launchd (1) political system: deny (1) file-writing-break the/private/var/run/dyld_shared_cache_x86_64 link

    LHOST com.apple.xpc.launchd [1] (com.apple.backupd.status.xpc): HideUntilCheckIn of the property is a problem of architectural performance. Please transition away from him.

    LHOST com.apple.xpc.launchd [1] (com.apple.cmio.AVCAssistant): ThrottleInterval zero value. You are not so important. Ignorant.

    com Apple.XPC.launchd [1] (com.apple.trustd.agent): ServiceIPC the key is no longer respected. Please delete.

    LHOST com.apple.xpc.launchd [1] (com.apple.bsd.dirhelper): the TimeOut key is no longer respected. He never did anything anyway.

    com Apple.XPC.launchd [1] (com.apple.ZoomWindow.running): HideUntilCheckIn of the property is a problem of architectural performance. Please transition away from him.

    WindowServer [175]: found 13 display modes 0 x 00000000 [13: 0]

    Also, I restarted in safe mode. The problem persists in the newspaper.

    I created a copy of the computer to restart open log normal startup mode and secure boot mode. Then, I created three files containing - text save messages only in regular boot mode, log in startup mode messages safe and save messages in BOTH.

    Save Messages that appear only in the regular boot

    https://www.dropbox.com/s/up6nkk95768xcrb/onlyinnotnsafe.txt?DL=0

    Save Messages that appear only in the secure boot

    https://www.dropbox.com/s/80w2od220asx7e9/onlyinsafe.txt?DL=0

    Save Messages that appear in trunk too of COURSE and regular

    https://www.dropbox.com/s/zoifq5r4inihjaz/overlap.txt?DL=0

    Can someone help me? Should I think about buying a new HD?

    Also noticed - when I have headphones or whatever it is connected to the phone jacks, iTunes spontaneously opens. In addition, in the log messages

    Thank you!!

    Run disk utility. It is located in/Applications/Utiliites

    With open disk utility select the disk to boot on the left then click the first aid tab, then click: run

    Using disk utility to check or repair disks - Apple Support

  • I have my 5 factory reset iPhone, now I can't set up my iPhone because it must be enabled, and I don't have a sim card. Can someone help me please?

    I have my 5 factory reset iPhone, now I can't set up my iPhone because it must be enabled, and I don't have a sim card to make. Is there a way I can install and use my iPhone without needing to be activated? Can someone help me please?

    To skip the activation of sim card, you can use iTunes if you have a CDMA iPhone. However, if you have a GSM model you will need to insert a sim card to activate your iPhone (it can even be used/inactive). Here is an article that will help you determine if your iPhone is GSM or CDMA: http://osxdaily.com/2012/11/15/determine-iphone-gsm-or-cdma/

  • Please can someone help me for a long time out of the payment itun

    Please can someone help me for a long time out of the payment of itun, I lost my phone.

    This is my information

    ****

    ****

    Thank you

    < personal information under the direction of the host >

    OK so tell me first your reason! It of your personal account, why do you give?

  • iPhone 6 viberates just when it rings after downloading ios9.3.2 can someone help please

    How can I solve my problem after that ios9.3.2 phone dosen't ring just viberates and custom except my wifi password can someone help

    Look on the side of the phone and make sure that the 'secret' not turn it on.

  • IPhoto on the external hard drive will not launch despite the force quit and relaunch several times. Can someone help me?

    I have a MacBook from 2008. 4 years ago I moved my iPhoto on an external hard drive. I have thousands if photos on it. IPhoto on the external hard drive will not launch despite the force quit and relaunch several times. Can someone help me?

    < re-titled by host >

    I moved my iPhoto on an external hard drive.

    Did you move the iPhoto library for the external hard drive or the iPhoto application, or both?

    How is formatted the external hard drive? Is the file system on the drive Mac OS extended (journaled) or other system files?  Is the drive directly connected by USB or similar, or is it a SIN?

    IPhoto on the external hard drive will not launch despite the force quit and relaunch several times.

    I don't understand - if you force quit smoking, launches the application, or you can not force it quit?

    IPhoto is suspended without doing anything, when you launch?

    What version of iPhoto does? And what version of Mac OS X?

Maybe you are looking for

  • Digital inputs delivered to 0 when all loop stops. Extract attatched

    Could someone please tell me how do I get my digital inputs on the left hand side reset to 0 when the loop Gets the signal to stop? Very much appreciated

  • WRT54G-strange situation

    I have a WRT54G that runs from my home office. I have a squeezebox music player that connects to it. My cell phone company has always connected easily. My situation is that I just bought a new laptop. When I first started this new laptop, he had no p

  • internal HD upgrade

    to the top of ranking my c: to a SSD drive, what other cable equipment and items do I need? Ray

  • Hi I have a packard bell 32-bit Vista sp2, once I connect my screen turns off.

    Hi, I'm having problems after I connect to my screen goes blank only thing on the screen is the mouse party color is black, I tried f8 and booting in safe mode, and windows came a few seconds, I also have a problem with windows defender, in lower rig

  • Strange problem of PIX Lan2Lan VPN!

    Hi, I set up my two firewalls pix for lan 2 lan vpn (ipsec) .This two firewalls connects directly with ethernet 0 and each has a local network on ethernet 1. When I try to ping SEARCH1 station2 after a period of and when ike phases are complete ping