Can someone help me understand this very simple script please?
I have a simple coding question that frustrates the heck out of me. . Basically, the script below moves button_mc. 100 px when you click top then down to 100px when you click it again. I know that the simple script below works but I do not know why
It seems that his say if the variable 'jumping' is 'true' move "button_mc" up to 100 px. "The part I do not understand why ' button_mc" move down to 100 px to second click.
seems to me that it ignores this first function, because 'Skip = false' run the second function and moves to the top of 100px. Then why in the second click it move down? wouldn t it theoretically just skip the first part of the function again?
I hope this makes sense and someone can help me.
I'm so frustrated!
Thank you!!!
var jump: Boolean = false;
button_mc.addEventListener (MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void {}
If (Jumping)
{
Event.Target.y += 100;
jumping = false;
}
on the other
{
Event.Target.y-= 100;
jumping = true;
}
}
button_mc.butonMode = true;
Whenever a movement occurs, the break value is passed to the opposite value. So if it starts wrong, it moves-100 pixels (which is the direction upwards) and the value is changed to true. Similarly, when you click again, it moves 100 + in the direction down.
Tags: Adobe Animate
Similar Questions
-
Good day, I get an error code 205 when I try to download adobe creative cloud desktop app, can someone help me solve this problem? Keep in mind I am not very technical, (smile).
Hi Djseva,
I think the error you encounter can be solved easily by following a few simple steps from the document below:
Error downloading creative cloud applications
If the document does not resolve the problem for you, don't hesitate to go back to Support Adobe & we will be more then happy to help you further by the following link below:
See you soon!
-
I have a problem with my shrink to a smaller size text, when I create a link. Can someone help me understand how to solve this problem? Here is the URL of the page where it happens. Spring Art tour
Tamlyn
Line 22 of your main document
do-size: 14px;
change that to
font size: 1 rem;
-
Hi I find a problem with my iPad 2 Air... I delete almost everything about him and he always tells me almost full storage! can someone help me on this problem pls thank you
Hello
Try a reboot press & hold the power button / stop & menu button
Hold both down until you see the Apple logo.
What is your ipad 16g / 32g or higher?
See you soon
Brian
-
I can't sign into windows live messenger, I get the message that windows live messnger is unavailable currently try again later and also I get the error code 80048820, can someone help me solve this problem.
Hello jabeena, welcome.
This section would apply in fact to the Windows Live programs, but we'll see what we can do to help out you.
I recommend to try this first:
1. disable any antivirus software or security, you have running on your computer. Looking for software to disable that contains a firewall.
2. click on START
3. Type "cmd" (without the quotes). Right-click on the result at the top of the menu START and select 'run as administrator '.
4 type the following and press enterRegsvr32 softpub.dll wintrust.dll initpki.dll
netsh winsock reset
Thank you! Ryan Thieman
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think. -
original title: windows dates
on my computer windows vista home basic, is Drive - D were all my windows updates are stored. I do not stor photos or other long-term files on my computer.
I ' am up to 22 gigabytes of 69.5 gigabits on drive D. Can someone help me with this problem so I don't run out of space.
Also all update my windows go back as far as the year 2008. Note-windows update are the only element which appear on the D drive and also when I backup windows is were I notice less space on this drive. Is there something I can do so I don't run out of space on this drive?
could someone help me with this problem.I have found, do not delete the old windows updates.
they could corrupt your entire system. -
WindowsUpdate_80246007 - cannot install Service Pack 2 for Vista. Can someone help me with this error message? What di I do to solve it?
WindowsUpdate_80246007 - cannot install Service Pack 2 for Vista. Can someone help me with this error message? What di I do to solve it?
2 forums: you can go:
1 Windows Vista IT Pro forum, section of Windows Vista service packs:
Section of Windows Vista service packs:2. Windows Update section:
http://social.answers.Microsoft.com/forums/en-us/vistawu/threadsFor the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.
-
I have a Dell Inspiron Mini Windows 7 starter from a pawn shop and it has the previous owner on this subject and I can not log on because I need there password. Can someone help me with this?
The only safe option is to perform a factory restore. If you do not, then you are likely to be confronted with a machine that is seriously infected or was hacked. Have a look here for instructions:
http://support.Dell.com/support/topics/global.aspx/support/KCS/document?c=us&l=en&s=Gen&docid=DSN_336966&isLegacy=true -
I am trying to download adobe 10 but my computer says that it is blocked and dangerous to download. Can someone help me with this problem
Temporarily disable your Antivirus utility and try again.
-
I have an Adobe Creative account and my payments come out every month; However, I am unable to connect with my new account or access programs I have installed; It only let's login me under my old account. Can someone help me solve this problem?
Hello
I see that you have an adobe account with the same email with forums, however, I don't see no subscription under this account.
If you can't change the email during indexing, see the steps below:
The OOBE and rename it OOBE.old and then try to connect with the correct ID:
Location: -.
Windows C: \ directory users\ user account-App data-local-adobe \oobe
MAC: Go / go to the folder / Application support / Adobe / oobe
If nothing helps, please contact adobe support:
-
I am trying to build a DVD menu, but whenever I click on the button "Toggle the display of the menu" options I get no picture and I am unable to create a menu. Can someone help me with this?
You need to install the library separately:
http://helpx.Adobe.com/Encore/using/download-library-content.html
-
HelloThe receipt number in double in RCV_shipment_headers for org even there? Can someone help me on this issue?
Kind regards
Hello
Please see metalink note below, it will help you to solve the problem.
Duplicate numbers exist in the RCV_SHIPMENT_HEADERS Table for same reception Org (Receipt_Num even, different Shipment_Header_id with the same Ship_To_Org_Id) (Doc ID 1464290.1)
-
I tried to install LR 6 of the CD. After some problems with my Adobe ID, I typed in my serial number, then he told me... OS is not fullfill is the requirements.my OS Win 7 64 bit system. can someone help me with this?
See the link below:
-
When I install CC15 it does not install Acrobat, can someone help me with this (the installation routine)
Check that your current account (and only the adobe, used in the next step id is good) by logging in here and check the status of your subscription, https://www.adobe.com/account.html
then, if it's current, disconnect and then back to your client application using the adobe with the link above in cc id: http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
-
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
Maybe you are looking for
-
Time machine disk disappeared launching parallels
HelloWhen I run the word on Windows 10 on 11 Parallels on my iMac, my Time Machine drive icon disappeared from my office. The time machine software stops the backup of my HD since the drive has disappeared.It reappears when parallels is closed and th
-
Best way to kill your laptop?
Hello Can someone tell me please the best way to kill my hp pavilion dv6-3078tx? Freeze it? It burns? Fill with dust? Fall into the water? Sledge Hammer out? Anything will help if you help me get a kudo and marked as soloution Im really angry against
-
I currently have a Geoforce 8500GT. Is there a better update available. I have 300 w power, windows 7 64 bit, 8 MB of ram ddr2 and single slot pci express.
-
whenever I try to open I get message saying gfxui stopped working im not very has obtained on jargon for computers so in simple terms, can anyone help please. It does not affect anything else in the measure of the im aware.
-
I need to find an autoreplay repair
I need to find a repair for automatic playback on a vista OS. Is this one?