≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
time counter
Posted by:
(you are not logged in)
Enter the missing letter in: "Int?rnational"
(you are not logged in)
Text:
[quote][b][/b] wrote: If you want you can simply use every few seconds do something behavior and set 1000ms as the time and can then set to change a variable there, for example variable name = Timer; operation = Add; value = 1; also make sure to set this variable to zero before first drawing. Now what this will do is it will add a value to the timer every 1 second. For doing it with code. You wanted to achieve something like do something later action. I don't know where you are executing your code. So can't tell much. But you need to have either an OnFramevent or OnAnimate prototype if working inside a behavior. First you need to set your [b]startTime[/b] and [b]endTime[b] outside the onframe or onAnimate function. and then inside you onAnimte or onFrame event you need to compare it with the currentTime [b]now[/b] if the "now" is greater than your endtime you can increase the counter by +1. [code] var startTime = (new Date()).getTime(); var endTime = startTime + 1000; function onFrameDrawing() { var now = (new Date()).getTime(); if(now > endTime) { count = ccbGetCopperCubeVariable("timeshoot"); count = count + 1; ccbSetCopperCubeVariable("timeshoot", count); } }[/code] something like this should work. Hope that helps*holy*[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact