0

about zk flash setAutoPlay

asked 2009-04-25 11:19:21 +0800

mantuoluo gravatar image mantuoluo
132 1

hi,
in zk flash component, why setAutoPlay and setloop don't work? setSrc work correctly,
why?
as i know ,setsrc use invalidate event, but setsrc and setautoplay use smartupdate event.

in the click event below,setAutoPlay and setloop won't work, somebody can help me?

thanks! the below is my test zul file:



<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="new page title" border="normal" id="win">
<attribute name="onCreate">
Flash f = new Flash();
f.setWidth("800px");
f.setHeight("300px");
f.setSrc("http://www.zkoss.org/Steps/learn.swf");
f.setAutoPlay(false);
f.setLoop(false);
f.setVisible(true);
f.setParent(self);
</attribute>

</window>

<button label="click">
<attribute name="onClick">
Flash ff= (Flash)win.getFirstChild();
ff.setLoop(false);
alert(ff.isLoop());
</attribute>
</button>
<button label="click2">
<attribute name="onClick">
Flash ff= (Flash)win.getFirstChild();
ff.setAutoPlay(false);
ff.setLoop(false);
ff.setSrc("http://www.zkoss.org/Steps/learn.swf");
alert(ff.isAutoPlay());
</attribute>
</button>
</zk>

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-04-28 09:01:43 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

updated 2009-04-28 09:02:06 +0800

seems you didn't set it to true?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-04-25 11:19:21 +0800

Seen: 151 times

Last updated: Apr 28 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More