Adobe Systems, Inc.

TextCaption.as

Go to the documentation of this file.
00001 /****************************************
00002 ** Copyright 2005-2006 Adobe Systems Incorporated
00003 ** Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
00004 ** or a copy at http://opensource.adobe.com/licenses.html)
00005 **
00006 ** ImageClip Class 
00007 ****************************************/
00008 import mx.transitions.*;
00009 import amg.*;
00010 
00011 class amg.TextCaption {
00012         
00013         //class properties
00014         private var iUUID:Number;                                                               
00015         public var strClipType:String = "Text";
00016         private var _mcMainClip:MovieClip;
00017         private var UUID:Number;                                                                //get from SMIL
00018         private var _mcCaption:MovieClip;
00019         public var iCaptionHeight:Number;
00020         public var strCaption:String;
00021         public var bComplete:Boolean = false;
00022         public var iPercentLoaded:Number = 0;
00023 
00024         public function TextCaption(parentClip:MovieClip,capname:String,depth:Number,cap:String){
00025                 this._mcMainClip = parentClip.createEmptyMovieClip(capname,depth);
00026                 this.strCaption = cap;
00027         }
00028         
00029         public function loadCaption():Void{
00030                 _mcCaption = this._mcMainClip.attachMovie("mcTextCaption","caption",1);
00031                 iCaptionHeight = _mcCaption._height + 22;
00032                 this.iPercentLoaded = 100;
00033         }
00034         
00035         public function showCaption(xpos:Number,ypos:Number):Void {
00036                 _mcCaption._x = xpos;
00037                 _mcCaption._y = ypos;
00038                 _mcCaption.txtCaption = strCaption;
00039                 _mcCaption.gotoAndPlay("show");
00040         }
00041         
00042         public function hideMedia(){
00043                         if(_mcCaption._currentframe != 1)
00044                                 _mcCaption.gotoAndPlay("hide");
00045         }
00046 }

Copyright © 2006 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.