Reflow 2004-03-12 - By Keith L. Miller
Back Ok, I know I've been posting a lot about the Tree Component, but I'm so close to finishing this thing that I'm just trying to clean things up a bit. Sorry if I'm getting annoying. Anyway, heres the latest issue.
I've set up a check to determine if the .swf is resized and when this happens stretch the tree componet to fit the window. My app is going to be in an html page so this works nice for when the user expands there browser. The flash movie jsut shrinks and grows with the bowser. Here is some simple code for anyone wnating to do this:
var reflowListener:Object; reflowListener = new Object (); reflowListener.onResize = function (){ _root.myTree._x = 0; _root.myTree._y = 0; _root.myTree.setSize (Stage.width, Stage.height, true); };
Stage.align = "TL"; Stage.scaleMode = "noScale"; Stage.addListener (reflowListener); reflowListener.reflow();
myTree.setSize (Stage.width, Stage.height, true);
Ok, that works great except that it has a strange effect on the tree. Normally, say you have a tree with 4 branches and they are all expanded. Clicking on the top branch to close it causes the tree to collapse using the default transistion effect (slides up smoothly for example), but when the above code is applied to the movie, clicking on the top branch causes the tree to collapse with no transition effect.
I hope that makes sense, if not just try the code on an existing tree you have and you'll see what I mean. Does anyone know why this would happen AND OR how to fix it?
Thanks again to everyone for being so patient with me,
Keith
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106760 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|