1 50 51 package org.openlaszlo.iv.flash.api; 52 53 import java.io.PrintStream ; 54 import org.openlaszlo.iv.flash.parser.*; 55 import org.openlaszlo.iv.flash.util.*; 56 import org.openlaszlo.iv.flash.commands.*; 57 import org.openlaszlo.iv.flash.context.Context; 58 59 64 public class QTMovie extends FlashDef { 65 66 private String url; 67 68 public QTMovie() {} 69 70 public int getTag() { 71 return Tag.DEFINEMOVIE; 72 } 73 74 public void setUrl( String url ) { 75 this.url = url; 76 } 77 78 public String getUrl() { 79 return url; 80 } 81 82 public static QTMovie parse( Parser p ) { 83 QTMovie o = new QTMovie(); 84 o.setID( p.getUWord() ); 85 o.setUrl( p.getString() ); 86 return o; 87 } 88 89 public void write( FlashOutput fob ) { 90 fob.writeTag( getTag(), 2+url.length()+1 ); 91 fob.writeDefID( this ); 92 fob.writeStringZ(url); 93 } 94 95 public void printContent( PrintStream out, String indent ) { 96 out.println( indent+"DefineQTMovie:" ); 97 } 98 99 protected boolean _isConstant() { 100 return !Util.hasVar(url); 101 } 102 103 public void apply( Context context ) { 104 url = context.apply(url); 105 } 106 107 protected FlashItem copyInto( FlashItem item, ScriptCopier copier ) { 108 super.copyInto( item, copier ); 109 ((QTMovie)item).url = url; 110 return item; 111 } 112 113 public FlashItem getCopy( ScriptCopier copier ) { 114 return copyInto( new QTMovie(), copier ); 115 } 116 } 117 | Popular Tags |