Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Flash CS, reference root from external class -


i made class , put in same package of timeline.as (the document class):

package {     import flash.utils.timer;     import flash.events.timerevent;      public class counter2 extends timer {          public function counter2(delay:number, repeatcount:int=0) {             super(delay, repeatcount);             super.addeventlistener(timerevent.timer, timerhandler);         }          public override function start():void {             super.start();         }         public override function stop():void {             super.stop();         }         public function timerhandler(evt:timerevent) {             trace(evt.target.currentcount);         }     } } 

this class instanciated in timeline.as constructor. there way reference timeline(root) class? and, if so, how?

thanks!

the static stage object accessible objects on display list. try creating public method in custom timer class & use pass (and store) reference stage.... so:

document class (or object on display list):

package {     import testdependency;     import flash.display.movieclip;      public class main extends movieclip     {         public var td:testdependency;          function main() {             td = new testdependency(1000);             td.bindtostage(this.stage);         }     } } 

your custom class (not in display list:

package {     import flash.display.stage;     import flash.utils.timer;     public class testdependency extends timer     {         private var stageref:stage;          function testdependency(delay) {             super(delay);         }          public function bindtostage($stageref:stage)         {             this.stageref = $stageref;             trace(this.stageref.stagewidth);         }     } } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -