Autor | Zpráva | ||
---|---|---|---|
tito100 Profil |
pozdravujem všetkých.
potreboval by som troška poradiť. v dokumentacii som našiel príklad ako použit prograssbar . použivam ho v externom AS3 scripte, vo vlastnej triede , a píše mi to hlášku: 1046: Type was not found or was not a compile-time constant: ProgressEvent. package { import flash.display.MovieClip; import flash.geom.Point; import fl.controls.Label; import fl.controls.ProgressBar; import fl.controls.ProgressBarMode; public class Cell { public var Width:int = 0; public var Height:int = 0; public var Link:String = ""; public var NumbColumns:int = 0; public var NumbRows:int = 0; public var Cells:Vector.<Vector.<Cell>> = new Vector.<Vector.<Cell>>(); public var CellsSing:Array = new Array("A","A","B","C","D"); public var Parent:Cell ; public var Children:Cell ; public var subNumb:int; public var ParentMc:MovieClip; public var MainMc:MovieClip; public var pb:ProgressBar = new ProgressBar(); public var progressReport:Label = new Label(); public function Cell(_link:String,_columns:int,_rows:int,_parentMc:MovieClip,_parents:Cell=null, _subNumbs:int=0) { Link=_link; NumbColumns=_columns; NumbRows=_rows; Parent=_parents; subNumb=_subNumbs; MainMc=_parentMc; progresBar.addEventListener(ProgressEvent.PROGRESS,updateProgressReport); addChild(progresBar); function updateProgressReport(e:ProgressEvent):void // <<<------------------------------------------ TADY { progressReport.text = Math.round(progresBar.percentComplete) + "% Loaded"; } progresBar.move(MainMc.width/2,MainMc.height/2); progressReport.autoSize = TextFieldAutoSize.LEFT; progressReport.move(MainMc.width/2,MainMc.height/2); MainMc.addChild(progresBar); MainMc.addChild(progressReport); MainMc.visible=false; var childName:String; var childMc:MovieClip; ................... skušal som importovat import fl.controls.ProgressEvent; nepomohlo vopred dakujem za rady |
||
DoubleThink Profil * |
#2 · Zasláno: 29. 1. 2010, 14:03:43
|
||
tito100 Profil |
#3 · Zasláno: 29. 1. 2010, 14:27:55
ano. už som to našiel. a zistil že tam mam viacej chýb. tak som to spravil niejak takto :
package { import flash.display.MovieClip; import flash.geom.Point; import fl.controls.Label; import fl.controls.ProgressBar; import flash.events.ProgressEvent; import flash.text.TextField; import flash.events.MouseEvent; import flash.text.TextFieldAutoSize; public class Cell { public var Width:int = 0; public var Height:int = 0; public var Link:String = ""; public var NumbColumns:int = 0; public var NumbRows:int = 0; public var Cells:Vector.<Vector.<Cell>> = new Vector.<Vector.<Cell>>(); public var CellsSing:Array = new Array("A","A","B","C","D"); public var Parent:Cell ; public var Children:Cell ; public var subNumb:int; public var ParentMc:MovieClip; public var MainMc:MovieClip; public var progresBar:ProgressBar = new ProgressBar(); public var progressReport:Label = new Label(); public function Cell(_link:String,_columns:int,_rows:int,_parentMc:MovieClip,_parents:Cell=null, _subNumbs:int=0) { Link=_link; NumbColumns=_columns; NumbRows=_rows; Parent=_parents; subNumb=_subNumbs; MainMc=_parentMc; progresBar.addEventListener(ProgressEvent.PROGRESS,updateProgressReport); function updateProgressReport(event:ProgressEvent):void { progressReport.text = Math.round(progresBar.percentComplete) + "% Loaded"; } progresBar.move(MainMc.width/2,MainMc.height/2); progressReport.autoSize = TextFieldAutoSize.LEFT; progressReport.move(MainMc.width/2,MainMc.height/2); MainMc.addChild(progresBar); MainMc.addChild(progressReport); MainMc.visible=false; var childName:String; var childMc:MovieClip; .................................... len problem nastava teraz ten. že mi to nespusti. teda spusti, ale zamrzne. usudzujem že je to preto že sa vytvára as 2400 týchto tried Cell . hmm... |
||
Časová prodleva: 14 let
|
0