Statement if... else does not not for incrementing global vars and jump to the image labels
The problem I have is when I change my simple if statements 'else if' and increment a global variable, it really breaks the original "if". If you drag to the left, right, or bottom, it increments the overall "animCount" var and jumps to the label for specific image and play this animation. Then I would check if the val of animCount has been changed and if calls the user again left, right or down, it takes take-out of the Valley of "animCount" and I then I have another statement that checks for that and jumps to the new label for specific image and play this animation. The problem is that I can't have just a linear version of it down the main scenario for the scene to actually jump around at very specific points.
Here is the code that I have on document.compositionReady that works, but when you add the ElseIf breaks... What the devil I'm hurt!
Hope someone can help please
// Working Code ///////////////////////////////////////////////////////////
// GLOBAL VARS --------------------------------------------
this.animCount = 0;
by scanning
this.swipeStartX;
this.swipeEndX;
this.swipeStartY;
this.swipeEndY;
this.swipePadding = 60; / / avoid slipping when clicked
// ARROW BTNS --------------------------------------------
this.onSwipeLeft = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("anim_4");
}
}
this.onSwipeRight = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("anim_1");
}
}
this.onSwipeDown = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("ice_dunk_1");
}
}
// SWIPE --------------------------------------------
this.onSwipe = function()
{
forehand (scrub left)
If (this.swipeStartX < this.swipeEndX - this.swipePadding)
{
this.onSwipeRight ();
left by scanning (scrub on the right)
} ElseIf (this.swipeEndX < this.swipeStartX - this.swipePadding)
{
this.onSwipeLeft ();
slide downwards (scrub down)
} ElseIf (this.swipeStartY < this.swipeEndY - this.swipePadding)
{
this.onSwipeDown ();
}
}
// End Working Code ///////////////////////////////////////////////////////////
// Bad Code ///////////////////////////////////////////////////////////
// GLOBAL VARS --------------------------------------------
this.animCount = 0;
by scanning
this.swipeStartX;
this.swipeEndX;
this.swipeStartY;
this.swipeEndY;
this.swipePadding = 60; / / avoid slipping when clicked
// ARROW BTNS --------------------------------------------
this.onSwipeLeft = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("anim_4");
}
of other if(this.animCount == 1) {}
-this.animCount;
SYM. Play ("anim_2");
}
}
this.onSwipeRight = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("anim_1");
}
of other if(this.animCount == 1) {}
-this.animCount;
SYM. Play ("anim_5");
}
}
this.onSwipeDown = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("ice_dunk_1");
}
of other if(this.animCount == 1) {}
-this.animCount;
SYM. Play ("anim_3");
}
}
// SWIPE --------------------------------------------
this.onSwipe = function()
{
forehand (scrub left)
If (this.swipeStartX < this.swipeEndX - this.swipePadding)
{
this.onSwipeRight ();
left by scanning (scrub on the right)
} ElseIf (this.swipeEndX < this.swipeStartX - this.swipePadding)
{
this.onSwipeLeft ();
slide downwards (scrub down)
} ElseIf (this.swipeStartY < this.swipeEndY - this.swipePadding)
{
this.onSwipeDown ();
}
}
// End Bad Code ///////////////////////////////////////////////////////////
OK, that should be enough to help you ride--I put in place a machine States, with housing of switch for "onSwipeLeft" only. You can apply cela other shots. Here is a link to the code as well, as the forum sometimes mess up tab, making it really hard to read code. Let me know if you have any questions.
link to the code:
http://www.timjaramillo.com/code/edge/_source/_temp/test.js
// GLOBAL VARS --------------------------------------------
this.currentState is this. STATE_ICEBERG_UP; / / beginning of State
This. STATE_ICEBERG_UP = "iceberg_up";
This. STATE_ICEBERG_FLIPPED = "iceberg_flipped";
This. STATE_CREATURE_UP = "creature_up";
by scanning
this.swipeStartX;
this.swipeEndX;
this.swipeStartY;
this.swipeEndY;
this.swipePadding = 60; / / avoid slipping when clicked
// ARROW BTNS --------------------------------------------
this.onSwipeLeft = function()
{
Switch (this.currentState)
{
this case. STATE_ICEBERG_UP:
SYM. Play ("anim_4");
this.currentState is this. STATE_ICEBERG_FLIPPED;
break;
this case. STATE_ICEBERG_FLIPPED:
SYM. Play ("anim_2");
this.currentState is this. STATE_ICEBERG_UP;
break;
this case. STATE_CREATURE_UP:
SYM. Play ("anim_1");
this.currentState is this. STATE_ICEBERG_UP;
break;
by default:
Console.log ("onSwipeLeft, no break corresponding '");
break;
}
}
this.onSwipeRight = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("anim_1");
}
of other if(this.animCount == 1) {}
-this.animCount;
SYM. Play ("anim_5");
}
}
this.onSwipeDown = function()
{
if(this.animCount == 0) {}
this.animCount ++;
SYM. Play ("ice_dunk_1");
}
of other if(this.animCount == 1) {}
-this.animCount;
SYM. Play ("anim_3");
}
}
// SWIPE --------------------------------------------
this.onSwipe = function()
{
forehand (scrub left)
If (this.swipeStartX< this.swipeendx="" -="" this.swipepadding="">
{
this.onSwipeRight ();
left by scanning (scrub on the right)
} ElseIf (this.swipeEndX< this.swipestartx="" -="" this.swipepadding="">
{
this.onSwipeLeft ();
slide downwards (scrub down)
} ElseIf (this.swipeStartY< this.swipeendy="" -="" this.swipepadding="">
{
this.onSwipeDown ();
}
}
Tags: Edge Animate
Similar Questions
-
I have a Mac Book Pro, which does not include a CD slot and I bought the Suite Adobe 6 CD. Download the program from the Web site using my serial number?
Hi Haley,
Please download Creative Suite 6 applications
Kind regards
Sheena
-
touchpad does not work after re-Assembly and disassembly of the laptop
I have disassembled the toshiba satellite a665, cleaned the fan and put it back together... Now press and keys at the top do any work. I have looked for programs in the control panel and can not find the synaptics pointing device. What I did wrong and how to fix it?
Hello
Check their documentation online with the help of Toshiba, and ask in their forums. There should be
a technical manual that will help the Assembly process. You have probably dislodged a connection or
two. Hardware issues such as this can be corrected with softeware.Toshiba - Forums
http://laptopforums.Toshiba.com/Toshiba - Contacts
http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/navShell.jsp?CF=su_contactToshiba - drivers - access your model
http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp?NAV=downloadToshiba - Support
http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jspI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
Outlook for Mac 2011 does not accept my e-mail and password on the account configuration.
Hi, I entered my email and password correctly, and Outlook said that could not authenticate the gmail server... Does anyone know how to fix this?
I thought about it!
-
The phone rings does not for incoming calls! / spa2101 connected to the router
Hey guys,.
I had this problem for 2 weeks now, my outgoing calls are fine but with the receipt of custom just phone sounds sometimes. He usually works once I restarted the adapter, then after an hour on the phone used ring when I test it.
I opened the ports on my router (5060-5061) and the firewall is disabled.
BTW: I have this software called xlite and when I tried to call for that, it worked fine but the phone did not respond. im guessing theres some configurations that must be accomplished, but what is the question =)
Thank you for any response
Hello
You must change in the line-1/2 tab:
NAT mapping enable: don't-online Yes
NAT keep alive enable: don't-online Yes
Then, you can control the interval keepalive on SIP tab:
NAT Keep Alive Intvl:
(def = 15) -
Ambient light does not in use to develop and return to the library
A window 7 Professional PC
Hi kamsphotok,
If you use Lightroom 6, please turn off the graphics processor of Lightroom preferences.
Please follow the steps below.
Open Lightroom
Go to Lightroom preferences in the Edit menu
Click the performance tab
Deselect the graphics processor
Restart Lightroom
Let us know if that helps.
Kind regards
~ Mohit
-
Running win XP pro sp2 mouse moves, but everything else does not
Running win XP pro sp2 mouse moves, but everything else does not respond after a certain time. Just started doing this last month. Had Xp for several years without ANY problems at all.
Hi BobM202,
1. did you of recent changes on the computer?
2. you receive an error message?
3. do you have security software installed on the computer?
4. are you referring to freezing except office mouse movement?
It is possible that some third-party programs installed on the computer is causing the problem.
I suggest that you put the computer in a clean boot state and check if it helps.
To help resolve the error and other messages, you can start Windows XP by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.
See section to learn more about how to clean boot.
How to configure Windows XP to start in a "clean boot" State
http://support.Microsoft.com/kb/310353
Reset the computer to start as usual
When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
(a) click Start, type msconfig in the search box and press ENTER.
(b) If you are prompted for an administrator password or for confirmation, type your password or click on continue.
(c) under the general tab, click the Normal startup option, and then click OK.
(d) when you are prompted to restart the computer, click on restart.
-
The foot pedal RS27 and Olympus AS-5000 - work of transcription for Windows 8 or 10 (pedal does not work on Windows 7 and do not want to shell out $300 to Olympus again)
Any help Nauru will be stuck with Windows Vista, I had to get three versions of Olympus and their pedals over the years and all they do is change the wiring or jacks, stupid as * I just like five different types.
Desperately need to know if these pedals will work or does he know about the Sony or another software of transcription for the typist, not the dictator.
Help.
Hi Marvin,.
Thank you for the quick update.
Yes, I understand your question. However, if the programs worked with an earlier version of Windows, they can work with Windows or Windows 10 8.1 if you install programs in compatibility mode. If you access the executable file (.exe) for the game, I suggest you follow the steps provided below:
Step 1: Download and save programs on the desktop.
Step 2: Install the programs in compatibility mode.
- Right click on the .exe file and click Properties.
- Go to the compatibility tab.
- Check the box for run this program in compatibility mode for:
- In the list of operating systems, select Windows Vista (or any other compatible OS) .
- Click OK.
- Double-click the executable file to install the program and follow the instructions on the screen.
- Restart your computer.
Additional information:
Make the programs more compatible with this version of Windows
Hope this information is useful. Let us know if you need more help, we will be happy to help you.
-
My player does not allow me to sign a document. The security setting says not authorized for signatures. How can I change the security allowed?
You can not. You must have Acrobat and the file password - change for this.
-
I have a Macbook Pro. I upgraded 10.9.4 one downloaded the demo for creative cloud. It downloaded and installed, but does not open. I stopped and tried to reinstall. The same problem.
Thank you.
I came across the solution. In addition to download creative cloud, I needed to return to the site and download the trials for the programs I want to use - Photoshop and Lightroom. Once I did, I was in business. Save bad if this was done in light on the download site.
Thank you
-
Original title: I do not see my available networks
I get this message when I try to solve the problem: Windows wireless service does not work on this machine and is called autoconfiguration WLAN service. Does not start Windows wireless service failed questions available detection area 5 Windows wireless service does not work on this computer only set not Windows wireless services is also called the autoconfiguration WLAN service. Network Diagnostics log file name: 5894B3A3-5541-48-A8FE-7A7E2E8E3B10. Detection of Repair.Admin.0.etl detail information name of the computer Collection: RODRIC29 - PC Windows Version: 6.1 Architecture: amd64 time: Thursday, August 23, 2012 12:27:11 Publisher details Windows Network Diagnostics detects problems with network connectivity. Package version: 1.0 Editor: Microsoft Windows can help anyone? (Windows 7 Inspiron computer laptop)
Hello
1 have you checked the State of the wireless autoconfiguration WLAN service in the services window?
2. do you have security software installed on the computer? If Yes, is it updated regularly?3. have you done any software or hardware changes on your computer before this problem?
4. What are the troubleshooting steps you have tried to solve the problem?
Refer to these methods.
Method 1:We will first try to manually start the wireless service, i.e. the WLAN AutoConfig service.
(a) click Start, type Services.msc and press enter.
(b) locate the autoconfiguration WLAN service, double-click to open its Properties window.
(c) on the general tab, change the Startup type to Automatic and click on the Start button.
(d) click apply and then click ok.
(e) try to connect to the wireless connection and check the result.
See also:
For more information on the wireless settings, see this link:
http://TechNet.Microsoft.com/en-us/library/ff802404.aspx
Method 2:
Using the troubleshooter from network in Windows 7
http://Windows.Microsoft.com/en-us/Windows7/using-the-network-troubleshooter-in-Windows-7
See also:
Windows wireless and wired network connection problems
Check if it helps.
-
My Mozilla Firefox browser does not open 4.5 sites that I use the most. That is, among other things, Gmail, Facebook, LinkedIn and other 2. I have re installed twice and got a version update, but the problem is still there. Please help me, I am so worry not.
Thank you.
Shakeel.
See:
You can try to reset (power off / on) of the router.
Do a check with some malware malware, analysis of programs on the Windows computer.
You need to scan with all programs, because each program detects a different malicious program.
Make sure that you update each program to get the latest version of their databases before scanning.- http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
- http://www.superantispyware.com/ - SuperAntispyware
- http://www.microsoft.com/security/scanner/en-us/default.aspx - scan Microsoft Security
- http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
- http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
Alternatively, you can write a check for an infection rootkit TDSSKiller.
See also:
- "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
-
Salvation of massage / iMessage does not accept my Apple ID and password what do I do?
Salvation of massage / iMessage does not accept my Apple ID and password what do I do?
Greetings Jan 1506,
If you encounter a problem with trying to implement iMessage on your device, follow the steps in this article to resolve the issue - If you get an error when you try to activate FaceTime or iMessage.
Thank you for using communities of Apple Support.
Be well.
-
My laptop does not recognize that anything that is connected to the USB ports
Help, please. My laptop does not recognize that anything that is connected to the USB ports.
Moved from feedback
Original title: problems with USB ports
Hi Alba.
1. who is the operating system installed on the computer?
2. What is the brand and model of the computer?
This issue may be caused if one of the following situations arises:
- The currently loaded USB driver has become corrupt or unstable
- Your PC requires an update for problems that could conflict with an external hard drive USB and Windows
- Windows may be missing other problems hardware or software updates
- Your USB controllers may have become corrupt or unstable
- External drive can enter selective suspend
- Your PC motherboard may need updated drivers
I suggest to connect the USB device to a different USB port and check.
You can run the Fixit provided in the article and the Coachman.
Reference:
Hardware devices do not work or are not detected in Windows
http://support.Microsoft.com/mats/hardware_device_problems
You can also try the steps in the link and check if it helps:
Reference:
Tips for solving problems of USB devices
http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-solving-problems-with-USB-devicesNote: Apply to Windows 7 as well
Hope this information helps. Response with status so that we can help you.
-
Original title:
I want to play the game "Hellfire". My "D" drive does not have a sufficient free space to download the game from drive "D". How to open a free space to download the game?
I want to play the computer game Diablo "Hellfire". When I try to download the game via the "D" drive, I get a message saying that the "D" drive does
not enough free space to download the game. How can I get more free space on the disk "D"?Hello- What edition of Windows XP work?
- What service pack is installed on the computer?
- What happens if you download the game via the c: drive?
- The place where you download the game?
Check if available hard disk space is available as recommended for the game.The disk cleanup tool lets you free up space on your hard disk by searching your disk for files that you can safely remove. You can choose to delete some or all of the files.You can perform Disk Clean up and then try to re - download the game to see if the problem persists.Description of the tool in Windows XP disk cleanupConsult the following link as well.You receive the error "your computer is running out of memory" message when you start Flight SimulatorI hope this helps!
Maybe you are looking for
-
Tecra A8 PTA83E fan problem: SOLVED!
As I say in this post: http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=21776, my tecra A8 fan still works at high rpm, and the service is unable to solve my problem.Now, the problem seems to be FIXED!I downloaded this update to
-
UPDATING the CHIPSET DRIVER for Z500
Hello! I downloaded, the form of the lenovo, the latest drivers chipset, but after the download site, there is only a single setup file and that's it! I was wondering how do I uninstall the previous version and if there is anything 'special' or 'tric
-
Could not update "WindowsUpdate_80070663" "WindowsUpdate_dt000"
"WindowsUpdate_80070663" "WindowsUpdate_dt000" Why can't so far?
-
Two devices in the file Explorer
Hello! Today, I recognized that my Fuze is represented by two devices (with two different drive letters) in the file Explorer. The first device is named "SANSA FUZE" and can be opened, the other has no name and only an error message appears when I tr
-
Computer doesn't recognize me as an administrator, I am the only one!
I just tried to download an update for a codec RAW to Win Live Photo Gallery. Download would not end because he said I would need administrative access. This often happens during the execution of other functions as well. Quite often, I want to del