Forum

first autoplay NLA animation in first load (help)

04 May 2015 12:40
I need play on first load only play one animation nla.
And Cyclic mode because need when user press one object animation play work.

I tired this for autoplay nla action:

(My NLA is select and play)

function start_play_auto(){
var play_obj = m_scenes.get_object_by_name('boton');

m_anim.stop(play_obj);
m_anim.set_frame(play_obj, 0);
m_anim.apply_def(play_obj);
m_anim.play(play_obj);
console.log(play_obj);
}

function load_cb(data_id) {
m_app.enable_camera_controls();
m_mouse.enable_mouse_hover_outline();
start_play_auto();
}

But I do not get it to work…
any suggestions?, Thanks.
04 May 2015 17:57
I have tired this too:


and it does not work
04 May 2015 18:20
"Solved"…..
05 May 2015 11:26
Great that everything worked out well
And thanks for sharing solution here!
12 August 2015 07:49
Hi! I'm just jumping around a few random threads to let the B4W design team know how much I appreciate your efforts and helpfulness! I figure nobody looks at the same threads, so a bit of jumping around will cover my bases better!

B4W rocks!

Feel free to delete this!
 
Please register or log in to leave a reply.