|
|
|
[
Permlink
| « Hide
]
Elliot Winard - 28/Jun/07 07:42 AM
attached example file to reproduce bug
To validate, then to Max if reproducible. Possibly sprite-ification broke this.
You only get 'running slowly' if there is a <splash /> tag on the canvas.
The problem is in LzSprite.getAttachPoint. It assume all sprite movieclips are descendants of _root.spriteroot, but the splash mc is a descendant of _root (i.e., parallell to spriteroot).
I'm not sure of the purpose of introducing spriteroot. I guess it keeps _global from being polluted. But then how to reconcile splash being a child of the canvas but its mc is a sibling of the canvas? Barring input from Max, I am exploring putting splash's mc under spriteroot.
Author: max
Date: 2007-07-18 13:58:55 -0700 (Wed, 18 Jul 2007) New Revision: 5697 Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as openlaszlo/branches/legals/WEB-INF/lps/lfc/lzpreloader.as Log: Change 20070718-maxcarlson-L by maxcarlson@plastik on 2007-07-18 11:07:47 PDT in /Users/maxcarlson/openlaszlo/legals-clean for http://svn.openlaszlo.org/openlaszlo/branches/legals Summary: Fix splash tag interaction with the view system New Features: Bugs Fixed: Technical Reviewer: ptw QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: LzSprite.as - Only create _root.spriteroot if it doesn't already exist. lzpreloader.as - Create _root.spriteroot and _root.spriteroot.splash movieclips, storing splash in this.splashroot. In done(), use sprite references and pass in this.splashroot as the movieclip reference. Tests: See Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as =================================================================== --- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2007-07-18 20:12:56 UTC (rev 5696) +++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2007-07-18 20:58:55 UTC (rev 5697) @@ -15,13 +15,15 @@ if (isroot) { - //var is = _root; - var is = _root.attachMovie('empty', 'spriteroot', 1000); + var is = _root.spriteroot; + if (! is) { + var is = _root.attachMovie('empty', 'spriteroot', 1000); + } this.__LZmovieClipRef = is; //is._x=5; //is._y=5; //this.setOpacity(.3); - this.mask = null; + //this.mask = null; this.__LZsvdepth = 1; } else { Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/lzpreloader.as =================================================================== --- openlaszlo/branches/legals/WEB-INF/lps/lfc/lzpreloader.as 2007-07-18 20:12:56 UTC (rev 5696) +++ openlaszlo/branches/legals/WEB-INF/lps/lfc/lzpreloader.as 2007-07-18 20:58:55 UTC (rev 5697) @@ -77,11 +77,15 @@ this.name = iobj.name; this.hideafterinit = iobj.attrs.hideafterinit; var viewprops = {x: true, y: true, width: true, height: true}; + var sr = _root.createEmptyMovieClip("spriteroot", 1000); + var root = sr.createEmptyMovieClip(this.name, 0); + this.splashroot = root; + //this.mydebug('new root' + this.splashroot); for (var i = 0; i < iobj.children.length; i++) { var c = iobj.children[i].attrs; var n = (c.name == null) ? ("child" + i) : c.name; - this.attachMovie(n, n, i + 1); - var mc = this[n]; + root.attachMovie(n, n, i + 1); + var mc = root[n]; mc.name = n; this.protoviews.push(mc); @@ -162,15 +166,14 @@ } var vis = (this.hideafterinit != true) ? true : false; - var svd = canvas.__LZsvdepth; - canvas.__LZsvdepth = 0; + var svd = canvas.sprite.__LZsvdepth; + canvas.sprite.__LZsvdepth = 0; var v = new LzView(canvas, {name:this.name, visible:vis, options: {ignorelayout:true}}); - v.sprite.setMovieClip(this); - canvas.__LZsvdepth = svd; + v.sprite.setMovieClip(this.splashroot); + canvas.sprite.__LZsvdepth = svd; + //this.mydebug('splashmc='+v); - this._visible = vis; - for (var i = 0; i < this.protoviews.length; i++) { var mc = this.protoviews[i]; var ratio = mc.lastframe / mc._totalframes; @@ -178,6 +181,7 @@ width: mc._width, height: mc._height, totalframes: mc._totalframes, ratio: ratio, options: {ignorelayout: true}}); + //this.mydebug('new view='+nv); // If ratio is less than one, animate the remaining way using percentcreated if (ratio < 1) { nv.noteCreated = function (p) { _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins Clicking first button of test.lzx (in bug) causes "Script running slow..." error. Re-opened in r7083. Reproduced in FF 2.0.0.8 and IE7 on Windows XP SP 2.
Results of binsearch:
Roboto:trunk-clean maxcarlson$ ../tools/svn/binsearch.rb Which revision would you like to start searching from? 6506 Found 280 revisions between 6506 and 7437. Synchronizing and building r6506... Done. Do you still see the problem? (y/n) n Synchronizing and building r7076... Done. Do you still see the problem? (y/n) y Synchronizing and building r6835... Done. Do you still see the problem? (y/n) n Synchronizing and building r6972... Done. Do you still see the problem? (y/n) n Synchronizing and building r7007... Done. Do you still see the problem? (y/n) y Synchronizing and building r6984... Done. Do you still see the problem? (y/n) y Synchronizing and building r6977... Done. Do you still see the problem? (y/n) y Synchronizing and building r6975... Done. Do you still see the problem? (y/n) y Synchronizing and building r6973... Done. Do you still see the problem? (y/n) y r6973 is the revision with the problem: ------------------------------------------------------------------------ r6973 | max | 2007-10-23 12:21:10 -0700 (Tue, 23 Oct 2007) | 32 lines Change 20071022-maxcarlson-k by maxcarlson@plastik on 2007-10-22 20:30:29 PDT in /Users/maxcarlson/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix context menus to work without bgcolor set New Features: Bugs Fixed: Technical Reviewer: promanik QA Reviewer: jcrowley Doc Reviewer: (pending) Documentation: Release Notes: Details: Remove extra assignments of width/height/x/y. In setBGColor() if the bgcolor was set for a context menu, reset its alpha to the correct value and allow opacity to be applied. If clearing the bgcolor, don't remove the movieclip and don't allow opacity to be applied. In setOpacity() set the bgcolor alpha if not set by the context menu and overridden by the context menu. In changeOrder() store and restore the current alpha value of the bgcolor movieclip. In setContextMenu() always add a bgcolor view, and set its alpha to 0 to hide it if no bgcolor is currently set. Tests: See ------------------------------------------------------------------------ Author: max
Date: 2007-12-04 12:05:52 -0800 (Tue, 04 Dec 2007) New Revision: 7444 Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as Log: Change 20071204-maxcarlson-X by maxcarlson@Roboto on 2007-12-04 00:26:37 PST in /Users/maxcarlson/openlaszlo/trunk-clean for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix splash and sendToBack() on subviews of canvas New Features: Bugs Fixed: Technical Reviewer: promanik QA Reviewer: enw Doc Reviewer: (pending) Documentation: Release Notes: Details: Preserve old behavior from before r6973 for the canvas. Tests: See Files: M WEB-INF/lps/lfc/kernel/swf/LzSprite.as Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071204-maxcarlson-X.tar Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as =================================================================== --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2007-12-04 18:45:07 UTC (rev 7443) +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2007-12-04 20:05:52 UTC (rev 7444) @@ -1568,14 +1568,22 @@ } // [todo hqm 01-24-07] SWF-specific - var mb = this.__LZbgRef; - if (mb == null) { - this.setBGColor(0xffffff); + if (this.owner == canvas) { + // if this is the canvas sprite + var mc = this.getMCRef(); + if (mc != null) { + mc.menu = cmenu; + } + } else { var mb = this.__LZbgRef; - mb._alpha = 0; + if (mb == null) { + this.setBGColor(0xffffff); + var mb = this.__LZbgRef; + mb._alpha = 0; + } + this._bgcolorhidden = true; + mb.menu = cmenu; } - this._bgcolorhidden = true; - mb.menu = cmenu; if (mb == null && mc == null) { if ($debug) Debug.warn("LzView.setContextMenu: cannot set menu on view %w, it has no foreground or background movieclip", this.owner); _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||