As the others already posted, this is cause you are using the event listener of the widget, which listens on all type of events. It’s like the event handlers for armatures/animations(setFrameEventCallFunc and setMovementEventCallFunc). Those bundle all events in the same callback and have to be filtered by the event type. They work similar to the windows messsage loop.
If you want to implement a specific event, you can use the addEventListenerWithSceneGraphPriority method of the _eventDispatcher. It implements specific callbacks for every event type. This can be also used with widgets(in your case a button), because the widgets are derived from Node and the _eventDispatcher works on Nodes.
HI!
how I can add ability to sprite or node animate visibilty?
now there only rotation, scale and position properties present on time as sub-items of sprite.
I know it possible, because it present for example:
hey!
I found the way to add “visible” property to animation.
it need check “automatic frame recording” and check and uncheck visibility in different frames.
A bit unobiously through.
Hi, I don’t know is it a bug, or an intended behaviour of cocostudio.
First, create the canvas with 640960, and then put a sprite with 6401136 dimension right at the middle (320, 480)
the sprite will have excess in height both in the upper and lower side.
but if you load the cocostudio file in cocos2d-x, and start the iphone 5s simulator (which had 1136 resolution in height), the upper side will be black. how can i achieve what i wanted?
// bring in the main scene from cocos studio
rootNode = CSLoader::createNode("GameScene.csb");
rootNode->setName("rootNode");
addChild(rootNode);
// setup animationtime-line and run what's on it
auto action = CSLoader::createTimeline("GameScene.csb");
rootNode->runAction(action);
action->gotoFrameAndPlay(0, true);
I had manually installed ant, adt-bundle, etc manually, and was using cocos console just fine.
Then I installed CocoStudio2, tried it out and decided to uninstall for the moment, and now cocos-console won’t work anymoe.
I’ve tried re-setting up everything, but I keep on getting errors.
For example, if I try todo a cocos compile -p web -m release, I get the following:
Running command: compile
Building mode: release
running: 'C:\ant\bin\ant -f E:\eclipseworkspaces\cocosws\Titos\publish\html5\bui
ld.xml'
Buildfile: E:\eclipseworkspaces\cocosws\Titos\publish\html5\build.xml
BUILD FAILED
E:\eclipseworkspaces\cocosws\Titos\publish\html5\build.xml:5: java.lang.Unsuppor
tedClassVersionError: com/google/javascript/jscomp/ant/CompileTask : Unsupported
major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoade
r.java:1128)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader
.java:1299)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoa
der.java:1354)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:131
5)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:106
8)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:579)
at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:237)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
179)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:93)
at org.apache.tools.ant.Main.runBuild(Main.java:826)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 0 seconds
Error running command, return code: 1
Is armature going to be supported in the feature?
I have some objects that extends Armature…so CocoStudio 2 working with Node*… Do i need to move from armature to animated node in cocostudio 2?
I’m experiencing a possible bug with Cocos Studio: When I try to publish my Cocos Studio scenes and contents to Xcode…nothing happens. No errors, no hang up. It opens Xcode, creates the project, but it doesn’t publish any of the content I’ve designed in Cocos Studio. Is somebody experiencing the same issue? (Or does somebody know why this is happening to me?)
Thx guys.
PS_ I use Cocos Studio 2.02 and Cocos 2d-x 3.3 + xcode 6.1