LzSprite.as (swf8):
Extra calls to resourceevent('playing',...) not needed here:
this.owner.resourceevent('play', null, true);
+ this.owner.resourceevent('playing', true);
and here:
- if ( this.playing ) this.owner.resourceevent('stop', null, true);
+ if ( this.playing ) {
+ this.owner.resourceevent('stop', null, true);
+ this.owner.resourceevent('playing', false);
+ }
I'm not sure setting "playing" is required in the setter, maybe
"playing" should just be updated from the kernel through resourceevent():
+function $lzc$set_playing (b:Boolean) :void {
+ var changed = b !== this.playing;
+ this.playing = b
+ if (changed) {
+ if ( b ) {
+ this.play();
+ } else {
+ this.stop();
+ }
}
+ if (this.onplaying.ready) this.onplaying.sendEvent(b);
}
Just like Tucker said in LPP-7273, the setter for "playing" merely
describes an intent:
I can see that this could be a little complex since `playing` is supposed to
represent the actual state of the clip, so the setter for `playing` can only
express an intent
And please update the following files:
- examples/music/music.lzx
- lps/components/lz/mr-ed.lzx
- test/lfc/legals/multiframeresource.lzx
- test/lfc/resourceplayfalse.lzx
- test/multiresource.lzx
- laszlo-explorer/scripting/audioplayer.lzx
On 1/9/2011 8:58 PM, Max Carlson wrote:
Aha! Okay, I'll un-deprecate onplay/stop. Otherwise, what do you think?
On 1/9/11 11:55 AM, André Bargull wrote:
html5 also has onplay and onstop in addition to onplaying [1].
[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#global-attributes
On 1/9/2011 8:51 PM, Max Carlson wrote:
Because the same information (should be) available in onplaying, we
don't need 3 events.
On 1/9/11 11:49 AM, André Bargull wrote:
Why all of sudden also deprecating onplay/onstop?
On 1/9/2011 8:23 PM, Max Carlson wrote:
Change maxcarlson-20110109-O0R by maxcarl...@friendly on 2011-01-09
11:03:54 PST
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Deprecate view.play/onplay/onstop in favor of view.playing
attribute
Bugs Fixed: LPP-7273 -<view> `play` attribute should be deprecated,
replace with `playing` (and make that read/write)
Technical Reviewer: ptw
QA Reviewer: [email protected]
Details: LzSprite - Use resourceevent() to set playing attribute.
LaszloView - Update docs on playing attribute to be read/write, add
onplaying event. Deprecate onplay/onstop. Add deprecated warning to
view.play virtual setter.
Tests: test/lfc/legals/multiframeresource.lzx runs like before across
all runtimes
Files:
M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
M WEB-INF/lps/lfc/views/LaszloView.lzs
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/maxcarlson-20110109-O0R.tar