Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

changing scene setFillColor
Started by robert_f2 Oct 07 2013 05:59 AM

4 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

robert_f2

[GLOBAL: userInfoPane.html]
robert_f2
  • Enthusiast

  • 40 posts
  • Corona SDK

 
I try to change scenes with corona sdk storyboard, 
the spine animation works well when I enter the scene,
I added to the group 
group:insert(skeleton.group)
but when I leave the scene I get this message

..oard(default)\spinestoryboard\spine-corona\spine.lua:153: attempt to call method 'setFillColor' (a nil value)
message
stack traceback:
?: in function <?:218>
[C]: in function 'setFillColor'
...oard(default)\spinestoryboard\spine-corona\spine.lua:153: in function 'updateWorldTransform'
...s)\spinestoryboard(default)\spinestoryboard\play.lua:153: in function <...s)\spinestoryboard(default)\spinestoryboard\play.lua:142>
?: in function <?:218>


[TOPIC: post.html]
#2

Reaver

[GLOBAL: userInfoPane.html]
Reaver
  • Enthusiast

  • 87 posts
  • Corona SDK

setFillColor gets called in the end of the skeleton:updateWorldTransform() function.

 

If you have added a call to this in a function that is a runtimeListener on enter frame you will need to remove the listener when exiting the scene.



[TOPIC: post.html]
#3

robert_f2

[GLOBAL: userInfoPane.html]
robert_f2
  • Enthusiast

  • 40 posts
  • Corona SDK

It works I added

Runtime:removeEventListener("enterFrame",updateAnimation) in the exitscene,

 

now, I can move in the menu and go to different options

 

I have three menus  play options credits

when I click play , I can see the animation 

I click options, I can see the options

I click credits I see the credits

but when I click play again I get this message

 

 

...efault)\spinestoryboard\spine-lua\AnimationState.lua:56: attempt to compare number with nil
message
stack traceback:
    ?: in function <?:218>
    [C]: ?
    ...efault)\spinestoryboard\spine-lua\AnimationState.lua:56: in function 'setAnimationInternal'
    ...efault)\spinestoryboard\spine-lua\AnimationState.lua:129: in function 'setAnimation'
    ...s)\spinestoryboard(default)\spinestoryboard\play.lua:126: in function <...s)\spinestoryboard(default)\spinestoryboard\play.lua:88>
    ?: in function 'dispatchEvent'
    ?: in function 'gotoScene'
    ...s)\spinestoryboard(default)\spinestoryboard\menu.lua:38: in function <...s)\spinestoryboard(default)\spinestoryboard\menu.lua:36>
    ?: in function <?:218>


[TOPIC: post.html]
#4

Reaver

[GLOBAL: userInfoPane.html]
Reaver
  • Enthusiast

  • 87 posts
  • Corona SDK

Looks like the defaultMix value gets returned as nil. This might be because there is a little error in AnimationsStateData.lua where the variable defaultMix is returned instead of self.defaultMix in the getMix function when a mix value has not been defined specifically.



[TOPIC: post.html]
#5

robert_f2

[GLOBAL: userInfoPane.html]
robert_f2
  • Enthusiast

  • 40 posts
  • Corona SDK

Now it works , I put in the exit scene ,

remove and purge scene, but in the log simulator I have this message

nil    
nil    
nil    
nil    
nil    
nil    



[topic_controls]
[/topic_controls]