Donut shape drawing api found, but only works on the scene?

Hello, I found a nice script for the drawing of a donut shape.
I don't know why it doesn't work with the help of 'this' or "_root". You should be able to apply it to a movieclip?
Or am I missing something?

This is the script:

this.createEmptyMovieClip("emptymovie",2);

emptymovie._x = 220;

emptymovie._y = 150;

function DrawCirclePart (mc, xPos, yPos, RADIUS, angle, rotatie, dir) {}

If (dir == 1) {}

angle = angle 0;

rotatie = rotatie-angle;

}

precision = 10;

var length = (Math.PI/(360/angle)) / accuracy;

var controlRadius = radius/Math.cos (span);

var anchorAngle = Math.PI* ((rotatie-90)/180), controlAngle = Math.PI* ((rotatie-90)/180);

for (var i = 0; I < precision; ++ I) {}

controlAngle = anchorAngle + span;

anchorAngle = controlAngle + span;

mc.curveTo (xPos + Math.cos (controlAngle) * controlRadius, yPos + Math.sin (controlAngle) * controlRadius, xPos + Math.cos (anchorAngle) * RADIUS, yPos + Math.sin (anchorAngle) * radius);

}

}

function Wedge (mc, Wradius2, Wradius1, Wrotatie, Wangle) {}

//mc.lineStyle (1, 0, 100);

mc.beginFill (0x0000FF);

(mc.moveTo(Math.cos(Math.PI*((Wrotatie-90)/180)) * Wradius1, Math.sin(Math.PI*((Wrotatie-90)/180))*Wradius1);

MC. DrawCirclePart (mc, 0, 0, Wradius1, Wangle, Wrotatie, 0);

(mc.lineTo(Math.cos(Math.PI*((Wrotatie-90+Wangle)/180)) * Wradius2, Math.sin(Math.PI*((Wrotatie-90+Wangle)/180))*Wradius2);

MC. DrawCirclePart (mc, 0, 0, Wradius2, Wangle, Wrotatie, 1);

(mc.lineTo(Math.cos(Math.PI*((Wrotatie-90)/180)) * Wradius1, Math.sin(Math.PI*((Wrotatie-90)/180))*Wradius1);

mc.endFill ();

}

It works

Wedge (this, 30, 50, 320, 180);

This does not work?

Corner (emptymovie, 30, 50, 320, 180);

change Wedge() to:

function Wedge (mc, Wradius2, Wradius1, Wrotatie, Wangle) {}
mc.lineStyle (1, 0, 100);
mc.beginFill (0x0000FF);
mc.moveTo(Math.cos(Math.PI*((Wrotatie-90)/180))*Wradius1,Math.sin(Math.PI*((Wrotatie-90) / 180)) * Wradius1);
  DrawCirclePart(mc,0,0,Wradius1,Wangle,Wrotatie,0);
(mc.lineTo(Math.cos(Math.PI*((Wrotatie-90+Wangle)/180)) * Wradius2, Math.sin (Math.PI* ((Wrotat ie-90+Wangle)/180)) * Wradius2);
    DrawCirclePart(mc,0,0,Wradius2,Wangle,Wrotatie,1);
mc.lineTo(Math.cos(Math.PI*((Wrotatie-90)/180))*Wradius1,Math.sin(Math.PI*((Wrotatie-90) / 180)) * Wradius1);
mc.endFill ();
}

Tags: Adobe Animate

Similar Questions

  • No internet connection AFTER startup, but only works during the boot.

    Hi all

    Have a Win XP MCE (Media Center Edition) Dell laptop running.  I can only connect to internet when the system is even start, and I click on the shortcut to IE or Firefox. Once the system completes the startup it connects me to the internet WITHOUT problem & with good signal and good connection speeds.  System connect wirelessly through a Linksys router.

    If I left the initialization of the system ended up - and I'm trying to connect to IE or Firefox - the hourglass appears for a minute and then disappears and I get no connection!

    This means that I must always start the internet connection while system is always initialize, and if I end the connection I get only back to restart system in place and opening connection when appear the icons on the desktop for IE or Firefox!

    I am puzzled by this and have no idea what to do to solve the problem!
    TNX a lot!

    Cindy

    Hello

    • What were the changes made before the issue occur?

    Verify that if the problem exists in Mode safe mode with networking, if the computer works as expected in mode safe mode with networking, and then we can solve the problem in the clean boot state.
    a. refer to the article below for the procedure safe mode in Windows XP
    A description of the options to start in Windows XP Mode
    http://support.Microsoft.com/kb/315222

    b. it is a possibility that there is a startup program that is launched with a command line and it appears.
    You need to perform a clean boot to find the program that is causing and then disable or remove.
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353/en-us
    Note: When you are finished troubleshooting, follow the steps as explained in the article to reset the computer to start as usual.

  • Satellite A210 - 10 c only works with the 800 Mhz instead of 1.6 Ghz

    Hello

    I have a very big problem. One day, I look in Vista on my resource monitor and see that the max freuquence is only 50%.

    So first of all I think that is no problem because the assets 'energy savings' energy recorded.
    I have a Satellite A210 - 10 c portable.

    So I switch to maximum power and perform a test of prime95. But hell, the max freuquence has not changed. I also installed everest and cpu z, but all programs show the same to me:

    My laptop only works with the 800 Mhz instead of 1.6 Ghz!

    I'm looking for drivers for the AMD processor, but you need not for Vista. Update all the drivers of Toshiba and Programms and BIOS (in fact, it is the 1.9).

    Nothing helps.

    As a last test, I reinstalled Vista, but also did not help.

    And now I'm at a loss what to do.

    I hope someone can help me.

    Good bye...

    Have you installed the Vista using the recovery CD or the original CD of Microsoft Vista?

    I ask because the restore CD contains all drivers for Toshiba and yellow exclamation marks should not be apparently in Device Manager.

    If you used the original CD of Vista I think that you have not installed the Package of Intel Robson.

    I found the package of Robson on the Toshiba driver-> Satellite P200 area page.

    Maybe you should check this.

    Your comments would be appreciated

  • Sent items from MS outlook do not appear in Thunderbird, but it works in the reverse (envoys since Thunderbird appears in Outlook). How to solve this problem?

    Sent items from MS outlook do not appear in Thunderbird, but it works in the reverse (envoys since Thunderbird appears in Outlook). How to solve this problem?

    I guess you have a pre existing account using the POP Protocol, that not only downloads the contents of the Inbox.

    Hotmail, Live, MSN, Outlook dot com now support IMAP which is a synchronized messaging service, changes in one are reflected in the other.

    File menu (alt + F) > New > existing e-mail account and add your account to the Thunderbird again. Make sure you have "account type selected IMAP and your all synchronized will.

    If it's like my account, your IMAP e-mail account will come with a subfolder under the pop called deleted folder that contains all mail I have downloaded in the past years.

    If you right-click your \new IMAP account in the folders pane on the right immediately after you create it and choose to subscribe you can unsubscribe from this folder if you don't see it

  • LabVIEW 2013 executable only works on the development machine?

    Hi all

    I created an executable to distribute my test software, but it only works on the development computer. With success, I gave my front executables with labview 2012 on the target computers by simply creating the .exe in the project and then Explorer in installing labview nessary drivers and run the engine of time without problems. Now, I created a new test with Labview 2013 program and I can not get my new test .exe application to run on the target computer. Has anyone seen this kind of problem before?  Any help will be appreciated.

    Thank you


  • Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    I tried to do this by using the search but it will find only them, if they occur as a long chain, that is to say "Here's the answer" rather than how they occur in the document it is to say "Here 's" a bunch of information that leads you to 'the answer'. The search feature so standard did not help.

    Then I tried to do this by using the tool to delete (obviously not the application of writing!) because it allows me to search for multiple words or phrases, however it is not highlight what page both are found. I tried to turn on the preference to enable deletions of comments and even if it meant that I could then go through all the comments, it's still not faster than my document is more than 1,000 pages, which meant there were too many total comments for me to be able to easily identify which page had both.

    Any ideas?

    There is no built-in way to search for two strings and limited to show only the results that appear on the same page.

    It can be done by using a custom script, however.

  • CSS only works on the page and not in the css doc

    So I have the following code for the shadows: h3.a {text-shadow:-50px 50px white, 1px 1px #00F}.  I put it on my css doc which is connected to my page, but it does not appear.  then I put it in the top of the page, and then it appeared.  Why it only works on the page?

    I just passed something like that for a few hours yesterday and realized that I was not saving the page external .css real after adding new styles.

  • BlackBerry Z10 headphone only works with the left ear

    My headphones (beats studios) only works with the left ear when connected. The helmet has never had a problem on my old iPhone 4 and currently with my rMBP so I know that's not the headphones. Any suggestions?

    There seems to be a problem with the jacket of the head. They are defective for a few pieces and the jacket cannot recognize the HP in the same case, what makes the phone to give no sounds on the notification.

    Try to use different headphones. If the problem persists try replacing the model.

  • Hello! I live in Brazil, I try to buy the creative cloud to the picture and it does not work because I changed the country! I don't know what's wrong, they say to call this 1800 426 570 phone number but no work at the Brazil! Does anyone know another fo p

    Hello! I live in Brazil, I try to buy the creative cloud to the picture and it does not work because I changed the country! I don't know what's wrong, they say to call this 1800 426 570 phone number but no work at the Brazil! Does anyone know another phone number to provide payment information?

    Hi Luciano,

    Please click on the following link: Contact Customer Care

    *Remember to stay signed with your Adobe ID ( email id used to purchase the subscription ) before accessing the link above*.

    Select the exact options indicated below in the capture to get support of screen options:

    Let us know if that helps.

    Kind regards

    Sandrine Bani

  • Firefox does not start, no error message, only works in the background

    I click on Firefox it does not start
    no error message it does not start
    It works in the background in 32-bit
    I have re installed it but nothing changes

    It is possible that your security (firewall, antivirus) software blocks or limit Firefox or the process of plugin-container without you inform, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox and the plugin-container in the permissions list in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

  • L50-B-1NM satellite - wifi only works near the router

    Hi just bought this laptop for my daughter Toshiba L50-B-1NM 15.6 inches processor Ci3 4 GB 1 TB and wifi only works if he was sitting next to the router.

    It will connect to the internet if the ethernet cable is connected, BUT for wifi, the laptop has been sitting almost touch the router. The rest of the House works well.

    Please could you help me before I take it back to the shop and eventually making a fool of myself.

    I'm really not good with technology so if you do not answer could you explain to me like a baby please ;) lol

    Thank you very much, totally disappointed at the moment because it cost me a lot of money for it :(

    Hi maria,

    I think you should consider a fact: the L50-B-1NM Satellite was equipped with an Intel 802.11ac + card agn combo Wifi/BT.

    802.11 AC is a new WLan standard that isn't taken care of by all old WLan routers.
    But of course, the standard 802.11 A / G or N must be supported by older devices correctly.

    I think first of all you must check if the wireless performance question isn't related to energy saving settings. I guess during wifi problems, the laptop uses battery power
    In this case we would use different power plan settings.

    Please check the settings that are in the advanced within the current energy saving Central WLan power settings.

    Where this doesn t help you solve the problem of WiFi signal weak, you should contact the authorized Toshiba maintainer to check the connection to the WLan antenna.

    It may be possible that the antenna isn't properly connected, which is originally a weak WiFi signal.

    Because the laptop is under warranty, it should be fix toll-free number.

    Greetings

  • Satellite L20 keyboard & touchpad work not but keyboard works in the BIOS

    On my laptop Satellite L20 not work keyboard and the touchpad and keyboard works in the BIOS, USB ports also does not (USB mouse).

    Can I get the BIOS update file (traditional update on the boot CD, no BONE!)

    Sorry for my bad English.

    If the update of the traditional BIOS is not available on the download page the only way to get it is to contact the nearest authorized service provider. They have all versions.

    But this problem of keyboard and mouse is really strange. can you use if you start the operating system in safe mode?

  • for my HP pavilion's fingerprint sensor only works at the initial log in not any other time

    I used to have my fingerpt put in place for all my accounts that require a password to connect.  It has stopped working, except on the first connection.  I don't know how to get this feature.

    And... my keys stick but only on some programs.

    better to go to a link of Mozila Firefox browser, you're not the only person who has experienced problems with IE... and this isn't the only issue that IE got...

  • can I submit a webworks App (blackberry 10) for approval, but only tested in the emulator in the vm player?

    can I submit a webworks App (blackberry 10) for approval, but only tested in emulator in the drive of the VM, since I don't have any blackberry Device?

    where to find the differences between the web of BB and phonegap works,... preparation & submission?

    Or otherwise if I have a html5/css3/js/jQmobile approx... How loan submit? Android App Phonegap already submitted in the game of Google... but as I see there are differences between the BB web works and phonegap.

    We understand that not all developers have access to a physical device, which is the Simulator comes in. The Simulator you usually gives a good idea of how your application will run on a physical device, and you can absolutely submit this application for review of the BlackBerry World. If problems arise, the BlackBerry World team will let you know of those that need to be corrected before the application can be approved for sale.

    This is true for WebWorks, Android, etc. The BlackBerry World team reviews your application and provide feedback if there are all the important issues which seem to be broken. If you have tested the application elsewhere however, generally you should not be from.

  • Multimedia file sharing only works if the two devices are connected using the same protocol

    So I'm frustrated!

    I spent an hour trying to get my Windows 7 computer to share my music with my XBox 360. I have two machines on my network, one connected by Ethernet to the router and the other connected by WiFi. I tried everything I could find online to get the WiFi connected machine appears in the "Music Player" on my XBox system - follow all sharing, make sure that my router has UPnP, restarted a bouquet of services, etc..
    Nothing! During this time, my machine connected to Ethernet was watching me in the face. He has appeared on the XBox without problem. I started to compare the settings on both machines and found no difference.
    Then I remembered, boredom, I had setting up WiFi sync for Windows Phone my wife. In fact, it was this session of troubleshooting that lead me to put this machine on the WiFi in the first place! Seems to set up WiFi sync, Windows Phone and the target of the machine must be, not only connected to the same network (obviously), but for some reason any the $ @$ crazy, both connected by WiFi. I just connected this computer by WiFi - not happy, a faster speed with my wired connection - and immediately fixed the problem itself.
    Then, remembering that, I moved my XBox WiFi network and - presto - my second machine appears without a problem.
    My question is... WTF! ???
    This is ridiculous - this is the same network! Why things must be connected using the same protocol?

    Hi, Edward Petersen,.

    Please contact the Microsoft community. I'll help you solve the problem with sharing music using media sharing.

    Some routers isolate the cable connections and wireless, you can check if you have the option in the configuration of the router to share media

    If the problem occurs, you can contact the router manufacturer for assistance.

    Hope this information helps. If you need help with Windows, simply reply that we will be happy

    to help you.

Maybe you are looking for