1 50 51 package org.openlaszlo.iv.flash.api; 52 53 import org.openlaszlo.iv.flash.parser.*; 54 import org.openlaszlo.iv.flash.util.*; 55 import java.io.PrintStream ; 56 57 62 public final class FreeCharacter extends FlashObject { 63 64 public FlashDef def; 65 66 public FreeCharacter() {} 67 68 public FreeCharacter( FlashDef def ) { 69 this.def = def; 70 } 71 72 public int getTag() { 73 return Tag.FREECHARACTER; 74 } 75 76 public static FreeCharacter parse( Parser p ) { 77 FreeCharacter o = new FreeCharacter(); 78 o.def = p.getDef(p.getUWord()); 79 return o; 80 } 81 82 public void collectDeps( DepsCollector dc ) { 83 if( def != null ) dc.addDep( def ); 84 } 85 86 public void write( FlashOutput fob ) { 87 fob.writeTag( getTag(), 2 ); 88 fob.writeDefID( def ); 89 } 90 91 public void printContent( PrintStream out, String indent ) { 92 out.println( indent+"FreeCharacter: id="+def.getID() ); 93 } 94 95 protected FlashItem copyInto( FlashItem item, ScriptCopier copier ) { 96 super.copyInto( item, copier ); 97 ((FreeCharacter)item).def = copier.copy(def); 98 return item; 99 } 100 101 public FlashItem getCopy( ScriptCopier copier ) { 102 return copyInto( new FreeCharacter(), copier ); 103 } 104 } 105 | Popular Tags |