flex - How to scroll elements on canvas in different states and in different containers and not move others -


i generate panels dynamically , put them in other states in way in 1 state have list of panels on left , 1 big panel on right example in 1 state , when click on list on left (with small panels) panels takes places of big panel , big 1 goes in place. have 50 panels on left , want scroll them down don't want big panel go down them want fixed.alt text got , don't know how here code:

enter code here 

protected function canvas1_creationcompletehandler(event:flexevent):void {

            blureffect= new blureffect(myblur,myunblur);              listeventsresult.token=eventservice.listevent();             blureffect.initfilter(event);               panels=generatepanels(panelnumber);             var vbox:vgroup= new vgroup();               states=stateslist.toarray();              trace("stavi sequence sostojba e"+ states[0].tostring());              for(var i:int=0; i<panelnumber ;i++)        // panel list panels , set states             {                  addchild(panels.getitemat(i) panel);                     (states[i] state).overrides=[ new setproperty(panels.getitemat(i),"x",110), new setproperty(panels.getitemat(i),"y",0),                     new setproperty(panels.getitemat(i),"width",widthbigpanel), new setproperty(panels.getitemat(i),"height",heightbigpanel)                     //,new addchild(g2,(panels.getitemat(k) panel))                     //,new setproperty(panels.getitemat(i),"scalez",110)                 ];                 trace("vlegov override za new state");                 var yy:int=0;                   for(var k:int=0;k<panelnumber;k++)                 {                     trace("menuvam state: yy = " + yy);                     if(k!=i){                         vbox.addchild(panels.getitemat(k) panel);                         (states[i] state).overrides = (states[i] state).overrides.concat([ new setproperty(panels.getitemat(k),"x",x), new setproperty(panels.getitemat(k),"y",yy),                             new setproperty(panels.getitemat(k),"width",widthpanel), new setproperty(panels.getitemat(k),"height",heightpanel)                         //,new addchild(g1,(panels.getitemat(k) panel))                         ]);                         yy+=110;                     }                 }                  for(z=0; z<(states[i] state).overrides.length; ++z){                     var tempsetproperty:setproperty= (states[i] state).overrides[z] setproperty;                     trace("\nname: " + tempsetproperty.name);                     trace("target: " + tempsetproperty.target);                     trace("value: " + tempsetproperty._value);                 }                   setcurrentstate("state0");                 addchild(vbox);             }              //sequence.targets=panels.toarray();             t1.targets=panels.toarray();          } 

you regular scrolling, add vertical scroll bar listener, scroll="myscroll(event), repositions large panel scrolling occurs (using original x,y values of panel , verticalscrollposition property).

alternatively, add second canvas on top of first one, , sets background transparent. place large panel on transparent canvas doesnt scroll (and put original canvas when scrolling completes if suits).

both of these heavy(ish) on processing (especially transparent canvas).


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -