Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

noob

Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Location
    Saint-Petersburg, Russia

noob's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. One sleepless night and i did it So, there one external loaded swf with some movieclip inside. Let's say it is a spaceship. I want to duplicate this ship, so I go like this: var mc:MovieClip = MovieClip(LoaderMax.getLoader("ship").rawContent); var movie:MovieClip = mc.getChildAt(0) as MovieClip; var MovieClass:Class = (movie as Object).constructor as Class; var newMovie:MovieClip = new MovieClass() as MovieClip; I address the raw content at first, then I target my movieclip inside that swf and voila, i create a new class, using that movieclip as an object. Now i can create several MovieClass objects and use as much copies of my ship as I like. note: you have to check "export for actionscript" box in the properties of movieclip in your Flash CSx
  2. Hi again. I am trying to create several independent movieclips from loaded SWF content. In other words im trying to duplicate those SWF's. Now im trying something like this: var movie:MovieClip = LoaderMax.getLoader("movie").rawContent; var MovieClass:Class = (movie as Object).constructor as Class; var newMovie:MovieClip = new MovieClass() as MovieClip; But when i try adding newMovie to stage, nothing happens. When i do this: var movie:MovieClip = LoaderMax.getLoade("movie").rawContent addChld(movie) it works perfectly. But of course i am not able to use this content again with another movieclip. Any ideas?
  3. Hi again, guys. Ive got another question regarding SWFLoader. Is it possible to get content from loaded swf and copy it to another MovieClip like i do it with images? So it would be another object with same content and not just a pointer to a loader. var bmp:Bitmap = new Bitmap(LoaderMax.getLoader("myPicture").rawContent.bitmapData
  4. Sup, guys. I am kinda new to AS3, so my problem might be a dumb one, but anyway. So i am loading some image, using ImageLoader like this: var fire:ImageLoader = new ImageLoader(E:/AS3/Projects/Island/fire.png", {name:"fire", onComplete:onImageLoad}); fire.load(); Then in the onImageLoad handler i create two bitmaps using loaded data: private function onImageLoad(event:LoaderEvent):void { var smt:Bitmap = LoaderMax.getLoader("fire").rawContent; addChild(smt); var ant:Bitmap = LoaderMax.getLoader("fire").rawContent; addChild(ant); ant.x = 200; Then i compile my swf and there is only one image on the stage. Also, if i remove one of the images (ant or smt) using removeChild(), the stage becomes clear as if both bitmaps just point to one instance. This is driving me insane for a couple of hours. What am i doing wrong?
×