all groups > flash actionscript > january 2008 >
You're in the

flash actionscript

group:

avoid blink in scrollpane


avoid blink in scrollpane ken
1/3/2008 9:13:52 AM
flash actionscript:
function scrollPaneLoadTxt(instance:Object,str:String,row:Number,nick:String,sizeN:Number,act:String,color,bold,italic) {
if (instance instanceof mx.containers.ScrollPane) {
delete _root.onEnterFrame;
instanceListener = new Object();
instanceListener.complete = function(evtObject) {
// Load txt into the loaded movie clip
loadTxt(evtObject.target,str,row,nick,sizeN,act,color,bold,italic,instance);
instance.vPosition=ver;
instance.redraw(true);
instance.invalidate();

};
ver=ver+30;
instance.addEventListener("complete", instanceListener);
scroll_sp.contentPath = "clips.swf";
instance.refreshPane();
}

From http://www.developmentnow.com/g/69_0_0_0_0_0/macromedia-flash-actionscript.htm

Posted via DevelopmentNow.com Groups
RE: avoid blink in scrollpane ken
1/3/2008 9:15:11 AM
have a scrollpane to load dinamically movieclip
my problem is that every user can add movieclips but every time the scrollpane refresh all the content and it's very difficult for a user looking at the screen cause of the blinking.
this is the code i use to load a txt field
as you can see I'm tring invalidate and redraw methods but the don't works for me
i need to avoid content bliking somebody can help me please?
thanks



[code]
function scrollPaneLoadTxt(instance:Object,str:String,row:Number,nick:String,sizeN:Number,act:String,color,bold,italic) {
if (instance instanceof mx.containers.ScrollPane) {
delete _root.onEnterFrame;
instanceListener = new Object();
instanceListener.complete = function(evtObject) {
// Load txt into the loaded movie clip
loadTxt(evtObject.target,str,row,nick,sizeN,act,color,bold,italic,instance);
instance.vPosition=ver;
instance.redraw(true);
instance.invalidate();

};
ver=ver+30;
instance.addEventListener("complete", instanceListener);
scroll_sp.contentPath = "clips.swf";
instance.refreshPane();
}


[/code]


From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=69&threadid=1035128

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button