1// MovieClip_as.hx: ActionScript 3 "MovieClip" class, for Gnash. 2// 3// Generated on: 20090529 by "bnaugle". Remove this 4// after any hand editing loosing changes. 5// 6// Copyright (C) 2009, 2010 Free Software Foundation, Inc. 7// 8// This program is free software; you can redistribute it and/or modify 9// it under the terms of the GNU General Public License as published by 10// the Free Software Foundation; either version 3 of the License, or 11// (at your option) any later version. 12// 13// This program is distributed in the hope that it will be useful, 14// but WITHOUT ANY WARRANTY; without even the implied warranty of 15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16// GNU General Public License for more details. 17// 18// You should have received a copy of the GNU General Public License 19// along with this program; if not, write to the Free Software 20// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21// 22 23// This test case must be processed by CPP before compiling to include the 24// DejaGnu.hx header file for the testing framework support. 25 26#if flash9 27import flash.display.MovieClip; 28import flash.display.Scene; 29#else 30#if flash8 31import flash.geom.Rectangle; 32import flash.geom.Transform; 33#end 34import flash.MovieClip; 35#end 36import flash.Lib; 37import Type; 38import Std; 39 40// import our testing API 41import DejaGnu; 42 43// Class must be named with the _as suffix, as that's the same name as the file. 44class MovieClip_as { 45 static function main() { 46#if flash9 47 var x1:MovieClip = new MovieClip(); 48#else 49 var x1:MovieClip = flash.Lib._root; 50#end 51 52 // Make sure we actually get a valid class 53 if (Std.is(x1,MovieClip)) { 54 DejaGnu.pass("MovieClip class exists"); 55 } else { 56 DejaGnu.fail("MovieClip lass doesn't exist"); 57 } 58// Tests to see if all the properties exist. All these do is test for 59// existance of a property, and don't test the functionality at all. This 60// is primarily useful only to test completeness of the API implementation. 61#if flash9 62 if (Type.typeof(x1.currentFrame) == ValueType.TInt) { 63 DejaGnu.pass("MovieClip::currentFrame property exists"); 64 } else { 65 DejaGnu.fail("MovieClip::currentFrame property doesn't exist"); 66 } 67//FIXME: This property exists only in the HaXe documentation 68// if (Type.typeof(x1.getCurrentFrame) == String) { 69// DejaGnu.pass("MovieClip::currentFrame property exists"); 70// } else { 71// DejaGnu.fail("MovieClip::currentFrame property doesn't exist"); 72// } 73//FIXME: currentLabel is shown as type TNull but it should be a String. haXe bug? 74// if (Std.is(x1.currentLabel, String)) { 75// DejaGnu.pass("MovieClip::currentLabel property exists"); 76// } else { 77// DejaGnu.fail("MovieClip::currentLabel property doesn't exist"); 78// } 79// DejaGnu.note("Type of currentLabel is "+Type.typeof(x1.currentLabel)); 80 if (Std.is(x1.currentLabels,Array)) { 81 DejaGnu.pass("MovieClip::currentLabels property exists"); 82 } else { 83 DejaGnu.fail("MovieClip::currentLabels property doesn't exist"); 84 } 85 if (Std.is(x1.currentScene,Scene)) { 86 DejaGnu.pass("MovieClip::currentScene property exists"); 87 } else { 88 DejaGnu.fail("MovieClip::currentScene property doesn't exist"); 89 } 90 if (Type.typeof(x1.framesLoaded) == ValueType.TInt) { 91 DejaGnu.pass("MovieClip::framesLoaded property exists"); 92 } else { 93 DejaGnu.fail("MovieClip::framesLoaded property doesn't exist"); 94 } 95 if (Std.is(x1.scenes, Array)) { 96 DejaGnu.pass("MovieClip::scenes property exists"); 97 } else { 98 DejaGnu.fail("MovieClip::scenes property doesn't exist"); 99 } 100 if (Type.typeof(x1.totalFrames) == ValueType.TInt) { 101 DejaGnu.pass("MovieClip::totalFrames property exists"); 102 } else { 103 DejaGnu.fail("MovieClip::totalFrames property doesn't exist"); 104 } 105 if (Type.typeof(x1.currentFrame) == ValueType.TInt) { 106 DejaGnu.pass("MovieClip::trackAsMenu property exists"); 107 } else { 108 DejaGnu.fail("MovieClip::trackAsMenu property doesn't exist"); 109 } 110#else 111 //FIXME: gnash uses incorrect data type Int 112 if (Type.typeof(x1._alpha) == ValueType.TFloat) { 113 DejaGnu.xpass("MovieClip::_alpha property exists"); 114 } else { 115 DejaGnu.xfail("MovieClip::_alpha property should be float, returns type "+Type.typeof(x1._alpha)); 116 } 117 if (Type.typeof(x1._currentframe) == ValueType.TInt) { 118 DejaGnu.pass("MovieClip::_currentframe property exists"); 119 } else { 120 DejaGnu.fail("MovieClip::_currentframe property should be int, returns type "+Type.typeof(x1._currentframe)); 121 } 122 if (Std.is(x1._droptarget,String)) { 123 DejaGnu.pass("MovieClip::_droptarget property exists"); 124 } else { 125 DejaGnu.fail("MovieClip::_droptarget property doesn't exist"); 126 } 127 if (Type.typeof(x1._focusrect) == ValueType.TBool) { 128 DejaGnu.pass("MovieClip::_focusrect property exists"); 129 } else { 130 DejaGnu.fail("MovieClip::_focusrect property doesn't exist"); 131 } 132 if (Type.typeof(x1._framesloaded) == ValueType.TInt) { 133 DejaGnu.pass("MovieClip::_framesloaded property exists"); 134 } else { 135 DejaGnu.fail("MovieClip::_framesloaded property doesn't exist"); 136 } 137 //FIXME: gnash uses incorrect data type Int 138 if (Type.typeof(x1._height) == ValueType.TFloat) { 139 DejaGnu.xpass("MovieClip::_height property exists"); 140 } else { 141 DejaGnu.xfail("MovieClip::_height property should be float, returns type "+Type.typeof(x1._height)); 142 } 143 if (Type.typeof(x1._lockroot) == ValueType.TBool) { 144 DejaGnu.pass("MovieClip::_lockroot property exists"); 145 } else { 146 DejaGnu.fail("MovieClip::_lockroot property doesn't exist"); 147 } 148 if (Std.is(x1._name, String)) { 149 DejaGnu.pass("MovieClip::_name property exists"); 150 } else { 151 DejaGnu.fail("MovieClip::_name property doesn't exist"); 152 } 153//FIXME: This property is defined but not implemented 154// if (Std.is(x1._parent, MovieClip)) { 155// DejaGnu.pass("MovieClip::_parent property exists"); 156// } else { 157// DejaGnu.fail("MovieClip::_parent property doesn't exist"); 158// } 159 if (Std.is(x1._quality, String)) { 160 DejaGnu.pass("MovieClip::_quality property exists"); 161 } else { 162 DejaGnu.fail("MovieClip::_quality property doesn't exist"); 163 } 164 //FIXME: gnash uses incorrect data type Int 165 if (Type.typeof(x1._rotation) == ValueType.TFloat) { 166 DejaGnu.xpass("MovieClip::_rotation property exists"); 167 } else { 168 DejaGnu.xfail("MovieClip::_rotation property should be float, returns type "+Type.typeof(x1._rotation)); 169 } 170 //FIXME: gnash uses incorrect data type Int 171 if (Type.typeof(x1._soundbuftime) == ValueType.TFloat) { 172 DejaGnu.xpass("MovieClip::_soundbuftime property exists"); 173 } else { 174 DejaGnu.xfail("MovieClip::_soundbuftime property should be float, returns type "+Type.typeof(x1._soundbuftime)); 175 } 176 if (Std.is(x1._target, String)) { 177 DejaGnu.pass("MovieClip::_target property exists"); 178 } else { 179 DejaGnu.fail("MovieClip::_target property doesn't exist"); 180 } 181 if (Type.typeof(x1._totalframes) == ValueType.TInt) { 182 DejaGnu.pass("MovieClip::_totalframes property exists"); 183 } else { 184 DejaGnu.fail("MovieClip::_totalframes property doesn't exist"); 185 } 186 if (Std.is(x1._url, String)) { 187 DejaGnu.pass("MovieClip::_url property exists"); 188 } else { 189 DejaGnu.fail("MovieClip::_url property doesn't exist"); 190 } 191 if (Type.typeof(x1._visible) == ValueType.TBool) { 192 DejaGnu.pass("MovieClip::_visible property exists"); 193 } else { 194 DejaGnu.fail("MovieClip::_visible property doesn't exist"); 195 } 196 //FIXME: gnash uses incorrect data type Int 197 if (Type.typeof(x1._width) == ValueType.TFloat) { 198 DejaGnu.xpass("MovieClip::_width property exists"); 199 } else { 200 DejaGnu.xfail("MovieClip::_width property should be float, returns type "+Type.typeof(x1._width)); 201 } 202 //FIXME: gnash uses incorrect data type Int 203 if (Type.typeof(x1._x) == ValueType.TFloat) { 204 DejaGnu.xpass("MovieClip::_x property exists"); 205 } else { 206 DejaGnu.xfail("MovieClip::_x property should be float, returns type "+Type.typeof(x1._x)); 207 } 208 //FIXME: gnash uses incorrect data type Int 209 if (Type.typeof(x1._xmouse) == ValueType.TFloat) { 210 DejaGnu.xpass("MovieClip::_xmouse property exists"); 211 } else { 212 DejaGnu.xfail("MovieClip::_xmouse property should be float, returns type "+Type.typeof(x1._xmouse)); 213 } 214 //FIXME: gnash uses incorrect data type Int 215 if (Type.typeof(x1._xscale) == ValueType.TFloat) { 216 DejaGnu.xpass("MovieClip::_xscale property exists"); 217 } else { 218 DejaGnu.xfail("MovieClip::_xscale property should be float, returns type "+Type.typeof(x1._xscale)); 219 } 220 //FIXME: gnash uses incorrect data type Int 221 if (Type.typeof(x1._y) == ValueType.TFloat) { 222 DejaGnu.xpass("MovieClip::_y property exists"); 223 } else { 224 DejaGnu.xfail("MovieClip::_y property should be float, returns type "+Type.typeof(x1._y)); 225 } 226 //FIXME: gnash uses incorrect data type Int 227 if (Type.typeof(x1._ymouse) == ValueType.TFloat) { 228 DejaGnu.xpass("MovieClip::_ymouse property exists"); 229 } else { 230 DejaGnu.xfail("MovieClip::_ymouse property should be float, returns type "+Type.typeof(x1._ymouse)); 231 } 232 //FIXME: gnash uses incorrect data type Int 233 if (Type.typeof(x1._yscale) == ValueType.TFloat) { 234 DejaGnu.xpass("MovieClip::_yscale property exists"); 235 } else { 236 DejaGnu.xfail("MovieClip::_yscale property should be float, returns type "+Type.typeof(x1._yscale)); 237 } 238 if (Std.is(x1.blendMode, Dynamic)) { 239 DejaGnu.unresolved("This property has not been implemented"); 240 } else { 241 DejaGnu.xfail("MovieClip::blendMode property should be object, returns type "+Type.typeof(x1.blendMode)); 242 } 243//FIXME: This property is defined but not implemented 244// if (Std.is(x1.cacheAsBitmap, Bool)) { 245// DejaGnu.pass("MovieClip::cacheAsBitmap property exists"); 246// } else { 247// DejaGnu.fail("MovieClip::cacheAsBitmap property doesn't exist"); 248// } 249//FIXME: This property is defined but not implemented 250// if (Std.is(x1.filters, Array)) { 251// DejaGnu.pass("MovieClip::filters property exists"); 252// } else { 253// DejaGnu.fail("MovieClip::filters property doesn't exist"); 254// } 255//FIXME: This property is defined but not implemented 256// if (Std.is(x1.focusEnabled, Bool)) { 257// DejaGnu.pass("MovieClip::focusEnabled property exists"); 258// } else { 259// DejaGnu.fail("MovieClip::focusEnabled property doesn't exist"); 260// } 261//FIXME: Not sure about which version of Flash implements this property. 262// if (Std.is(x1.forceSmoothing, Bool)) { 263// DejaGnu.pass("MovieClip::forceSmoothing property exists"); 264// } else { 265// DejaGnu.fail("MovieClip::forceSmoothing property doesn't exist"); 266// } 267//FIXME: This property is defined but not implemented 268// if (Std.is(x1.hitArea, MovieClip)) { 269// DejaGnu.pass("MovieClip::hitArea property exists"); 270// } else { 271// DejaGnu.fail("MovieClip::hitArea property doesn't exist"); 272// } 273 if (Type.typeof(x1.opaqueBackground) == ValueType.TInt) { 274 DejaGnu.xpass("MovieClip::opaqueBackground property exists"); 275 } else { 276 DejaGnu.xfail("MovieClip::opaqueBackground property doesn't exist"); 277 } 278#if flash8 279//FIXME: This property is defined but not implemented 280// if (Std.is(x1.scale9Grid, Rectangle)) { 281// DejaGnu.pass("MovieClip::scale9Grid property exists"); 282// } else { 283// DejaGnu.fail("MovieClip::scale9Grid property doesn't exist"); 284// } 285#end 286 if (Std.is(x1.scrollRect, Dynamic)) { 287 DejaGnu.unresolved("This property has not been implemented"); 288 } else { 289 DejaGnu.xfail("MovieClip::scrollRect property doesn't exist"); 290 } 291//FIXME: This property is defined but not implemented 292// if (Std.is(x1.tabChildren, Bool)) { 293// DejaGnu.pass("MovieClip::tabChildren property exists"); 294// } else { 295// DejaGnu.fail("MovieClip::tabChildren property doesn't exist"); 296// } 297//FIXME: This property is defined but not implemented 298// if (Std.is(x1.tabEnabled, Bool)) { 299// DejaGnu.pass("MovieClip::tabEnabled property exists"); 300// } else { 301// DejaGnu.fail("MovieClip::tabEnabled property doesn't exist"); 302// } 303 if (Type.typeof(x1.tabIndex) == ValueType.TInt) { 304 DejaGnu.xpass("MovieClip::tabIndex property exists"); 305 } else { 306 DejaGnu.xfail("MovieClip::tabIndex property doesn't exist"); 307 } 308//FIXME: This property is defined but not implemented 309// if (Std.is(x1.trackAsMenu, Bool)) { 310// DejaGnu.pass("MovieClip::trackAsMenu property exists"); 311// } else { 312// DejaGnu.fail("MovieClip::trackAsMenu property doesn't exist"); 313// } 314#if flash8 315 if (Std.is(x1.transform, Transform)) { 316 DejaGnu.pass("MovieClip::transform property exists"); 317 } else { 318 DejaGnu.fail("MovieClip::transform property doesn't exist"); 319 } 320#end 321 if (Type.typeof(x1.useHandCursor) == ValueType.TBool) { 322 DejaGnu.pass("MovieClip::useHandCursor property exists"); 323 } else { 324 DejaGnu.fail("MovieClip::useHandCursor property doesn't exist"); 325 } 326#end 327 //This method exists in both AS2 and AS3 328 if (Type.typeof(x1.enabled) == ValueType.TBool) { 329 DejaGnu.pass("MovieClip::enabled property exists"); 330 } else { 331 DejaGnu.fail("MovieClip::enabled property doesn't exist"); 332 } 333// Tests to see if all the methods exist. All these do is test for 334// existance of a method, and don't test the functionality at all. This 335// is primarily useful only to test completeness of the API implementation. 336#if flash9 337 if (Type.typeof(x1.addFrameScript) == ValueType.TFunction) { 338 DejaGnu.pass("MovieClip::addFrameScript method exists"); 339 } else { 340 DejaGnu.fail("MovieClip::addFrameScript method doesn't exist"); 341 } 342 if (Type.typeof(x1.gotoAndPlay) == ValueType.TFunction) { 343 DejaGnu.pass("MovieClip::gotoAndPlay() method exists"); 344 } else { 345 DejaGnu.fail("MovieClip::gotoAndPlay() method doesn't exist"); 346 } 347 if (Type.typeof(x1.gotoAndStop) == ValueType.TFunction) { 348 DejaGnu.pass("MovieClip::gotoAndStop() method exists"); 349 } else { 350 DejaGnu.fail("MovieClip::gotoAndStop() method doesn't exist"); 351 } 352 if (Type.typeof(x1.nextFrame) == ValueType.TFunction) { 353 DejaGnu.pass("MovieClip::nextFrame() method exists"); 354 } else { 355 DejaGnu.fail("MovieClip::nextFrame() method doesn't exist"); 356 } 357 if (Type.typeof(x1.nextScene) == ValueType.TFunction) { 358 DejaGnu.pass("MovieClip::nextScene() method exists"); 359 } else { 360 DejaGnu.fail("MovieClip::nextScene() method doesn't exist"); 361 } 362 if (Type.typeof(x1.play) == ValueType.TFunction) { 363 DejaGnu.pass("MovieClip::play() method exists"); 364 } else { 365 DejaGnu.fail("MovieClip::play() method doesn't exist"); 366 } 367 if (Type.typeof(x1.prevFrame) == ValueType.TFunction) { 368 DejaGnu.pass("MovieClip::prevFrame() method exists"); 369 } else { 370 DejaGnu.fail("MovieClip::prevFrame() method doesn't exist"); 371 } 372 if (Type.typeof(x1.prevScene) == ValueType.TFunction) { 373 DejaGnu.pass("MovieClip::prevScene() method exists"); 374 } else { 375 DejaGnu.fail("MovieClip::prevScene() method doesn't exist"); 376 } 377 if (Type.typeof(x1.stop) == ValueType.TFunction) { 378 DejaGnu.pass("MovieClip::stop() method exists"); 379 } else { 380 DejaGnu.fail("MovieClip::stop() method doesn't exist"); 381 } 382#else 383 if (Type.typeof(x1.attachAudio) == ValueType.TFunction) { 384 DejaGnu.pass("MovieClip::attachAudio method exists"); 385 } else { 386 DejaGnu.fail("MovieClip::attachAudio method doesn't exist"); 387 } 388#if !(flash6 || flash7) 389 if (Type.typeof(x1.attachBitmap) == ValueType.TFunction) { 390 DejaGnu.pass("MovieClip::attachBitmap() method exists"); 391 } else { 392 DejaGnu.fail("MovieClip::attachBitmap() method doesn't exist"); 393 } 394 if (Type.typeof(x1.beginBitmapFill) == ValueType.TFunction) { 395 DejaGnu.pass("MovieClip::beginBitmapFill() method exists"); 396 } else { 397 DejaGnu.fail("MovieClip::beginBitmapFill() method doesn't exist"); 398 } 399 if (Type.typeof(x1.getRect) == ValueType.TFunction) { 400 DejaGnu.pass("MovieClip::getRect() method exists"); 401 } else { 402 DejaGnu.fail("MovieClip::getRect() method doesn't exist"); 403 } 404 if (Type.typeof(x1.lineGradientStyle) == ValueType.TFunction) { 405 DejaGnu.pass("MovieClip::lineGradientStyle method exists"); 406 } else { 407 DejaGnu.fail("MovieClip::lineGradientStyle method doesn't exist"); 408 } 409#end 410 if (Type.typeof(x1.attachMovie) == ValueType.TFunction) { 411 DejaGnu.pass("MovieClip::attachMovie() method exists"); 412 } else { 413 DejaGnu.fail("MovieClip::attachMovie() method doesn't exist"); 414 } 415 if (Type.typeof(x1.attachVideo) == ValueType.TFunction) { 416 DejaGnu.pass("MovieClip::attachVideo() method exists"); 417 } else { 418 DejaGnu.fail("MovieClip::attachVideo() method doesn't exist"); 419 } 420 421 if (Type.typeof(x1.beginFill) == ValueType.TFunction) { 422 DejaGnu.pass("MovieClip::beginFill() method exists"); 423 } else { 424 DejaGnu.fail("MovieClip::beginFill() method doesn't exist"); 425 } 426 if (Type.typeof(x1.beginGradientFill) == ValueType.TFunction) { 427 DejaGnu.pass("MovieClip::beginGradientFill() method exists"); 428 } else { 429 DejaGnu.fail("MovieClip::beginGradientFill() method doesn't exist"); 430 } 431 if (Type.typeof(x1.clear) == ValueType.TFunction) { 432 DejaGnu.pass("MovieClip::clear() method exists"); 433 } else { 434 DejaGnu.fail("MovieClip::clear() method doesn't exist"); 435 } 436 if (Type.typeof(x1.createEmptyMovieClip) == ValueType.TFunction) { 437 DejaGnu.pass("MovieClip::createEmptyMovieClip() method exists"); 438 } else { 439 DejaGnu.fail("MovieClip::createEmptyMovieClip() method doesn't exist"); 440 } 441 if (Type.typeof(x1.createTextField) == ValueType.TFunction) { 442 DejaGnu.pass("MovieClip::createTextField method exists"); 443 } else { 444 DejaGnu.fail("MovieClip::createTextField method doesn't exist"); 445 } 446 if (Type.typeof(x1.curveTo) == ValueType.TFunction) { 447 DejaGnu.pass("MovieClip::curveTo() method exists"); 448 } else { 449 DejaGnu.fail("MovieClip::curveTo() method doesn't exist"); 450 } 451 if (Type.typeof(x1.duplicateMovieClip) == ValueType.TFunction) { 452 DejaGnu.pass("MovieClip::duplicateMovieClip() method exists"); 453 } else { 454 DejaGnu.fail("MovieClip::duplicateMovieClip() method doesn't exist"); 455 } 456 if (Type.typeof(x1.endFill) == ValueType.TFunction) { 457 DejaGnu.pass("MovieClip::endFill() method exists"); 458 } else { 459 DejaGnu.fail("MovieClip::endFill() method doesn't exist"); 460 } 461 if (Type.typeof(x1.getBounds) == ValueType.TFunction) { 462 DejaGnu.pass("MovieClip::getBounds() method exists"); 463 } else { 464 DejaGnu.fail("MovieClip::getBounds() method doesn't exist"); 465 } 466 if (Type.typeof(x1.getBytesLoaded) == ValueType.TFunction) { 467 DejaGnu.pass("MovieClip::getBytesLoaded() method exists"); 468 } else { 469 DejaGnu.fail("MovieClip::getBytesLoaded() method doesn't exist"); 470 } 471 if (Type.typeof(x1.getBytesTotal) == ValueType.TFunction) { 472 DejaGnu.pass("MovieClip::getBytesTotal() method exists"); 473 } else { 474 DejaGnu.fail("MovieClip::getBytesTotal() method doesn't exist"); 475 } 476 if (Type.typeof(x1.getDepth) == ValueType.TFunction) { 477 DejaGnu.pass("MovieClip::getDepth() method exists"); 478 } else { 479 DejaGnu.fail("MovieClip::getDepth() method doesn't exist"); 480 } 481#if !flash6 482 if (Type.typeof(x1.getInstanceAtDepth) == ValueType.TFunction) { 483 DejaGnu.pass("MovieClip::getInstanceAtDepth() method exists"); 484 } else { 485 DejaGnu.fail("MovieClip::getInstanceAtDepth() method doesn't exist"); 486 } 487 if (Type.typeof(x1.getNextHighestDepth) == ValueType.TFunction) { 488 DejaGnu.pass("MovieClip::getNextHighestDepth method exists"); 489 } else { 490 DejaGnu.fail("MovieClip::getNextHighestDepth method doesn't exist"); 491 } 492#end 493 if (Type.typeof(x1.getSWFVersion) == ValueType.TFunction) { 494 DejaGnu.pass("MovieClip::getSWFVersion() method exists"); 495 } else { 496 DejaGnu.fail("MovieClip::getSWFVersion() method doesn't exist"); 497 } 498 if (Type.typeof(x1.getTextSnapshot) == ValueType.TFunction) { 499 DejaGnu.pass("MovieClip::getTextSnapshot() method exists"); 500 } else { 501 DejaGnu.fail("MovieClip::getTextSnapshot() method doesn't exist"); 502 } 503 if (Type.typeof(x1.getURL) == ValueType.TFunction) { 504 DejaGnu.pass("MovieClip::getURL() method exists"); 505 } else { 506 DejaGnu.fail("MovieClip::getURL() method doesn't exist"); 507 } 508 if (Type.typeof(x1.globalToLocal) == ValueType.TFunction) { 509 DejaGnu.pass("MovieClip::globalToLocal() method exists"); 510 } else { 511 DejaGnu.fail("MovieClip::globalToLocal() method doesn't exist"); 512 } 513 if (Type.typeof(x1.gotoAndPlay) == ValueType.TFunction) { 514 DejaGnu.pass("MovieClip::gotoAndPlay() method exists"); 515 } else { 516 DejaGnu.fail("MovieClip::gotoAndPlay() method doesn't exist"); 517 } 518 if (Type.typeof(x1.gotoAndStop) == ValueType.TFunction) { 519 DejaGnu.pass("MovieClip::gotoAndStop() method exists"); 520 } else { 521 DejaGnu.fail("MovieClip::gotoAndStop() method doesn't exist"); 522 } 523 if (Type.typeof(x1.hitTest) == ValueType.TFunction) { 524 DejaGnu.pass("MovieClip::hitTest() method exists"); 525 } else { 526 DejaGnu.fail("MovieClip::hitTest() method doesn't exist"); 527 } 528 if (Type.typeof(x1.lineStyle) == ValueType.TFunction) { 529 DejaGnu.pass("MovieClip::lineStyle() method exists"); 530 } else { 531 DejaGnu.fail("MovieClip::lineStyle() method doesn't exist"); 532 } 533 if (Type.typeof(x1.lineTo) == ValueType.TFunction) { 534 DejaGnu.pass("MovieClip::lineTo() method exists"); 535 } else { 536 DejaGnu.fail("MovieClip::lineTo() method doesn't exist"); 537 } 538 if (Type.typeof(x1.loadMovie) == ValueType.TFunction) { 539 DejaGnu.pass("MovieClip::loadMovie() method exists"); 540 } else { 541 DejaGnu.fail("MovieClip::loadMovie() method doesn't exist"); 542 } 543 if (Type.typeof(x1.loadVariables) == ValueType.TFunction) { 544 DejaGnu.pass("MovieClip::loadVariables() method exists"); 545 } else { 546 DejaGnu.fail("MovieClip::loadVariables() method doesn't exist"); 547 } 548 if (Type.typeof(x1.localToGlobal) == ValueType.TFunction) { 549 DejaGnu.pass("MovieClip::localToGlobal() method exists"); 550 } else { 551 DejaGnu.fail("MovieClip::localToGlobal() method doesn't exist"); 552 } 553 if (Type.typeof(x1.moveTo) == ValueType.TFunction) { 554 DejaGnu.pass("MovieClip::moveTo() method exists"); 555 } else { 556 DejaGnu.fail("MovieClip::moveTo() method doesn't exist"); 557 } 558 if (Type.typeof(x1.nextFrame) == ValueType.TFunction) { 559 DejaGnu.pass("MovieClip::nextFrame() method exists"); 560 } else { 561 DejaGnu.fail("MovieClip::nextFrame() method doesn't exist"); 562 } 563//FIXME: These dynamic functions return a null type value. 564// if (Type.typeof(x1.onData) == ValueType.TFunction) { 565// DejaGnu.pass("MovieClip::onData() method exists"); 566// } else { 567// DejaGnu.fail("MovieClip::onData() method doesn't exist"); 568// } 569// if (Type.typeof(x1.onDragOut) == ValueType.TFunction) { 570// DejaGnu.pass("MovieClip::onDragOut() method exists"); 571// } else { 572// DejaGnu.fail("MovieClip::onDragOut() method doesn't exist"); 573// } 574// if (Type.typeof(x1.onDragOver) == ValueType.TFunction) { 575// DejaGnu.pass("MovieClip::onDragOver() method exists"); 576// } else { 577// DejaGnu.fail("MovieClip::onDragOver() method doesn't exist"); 578// } 579// if (Type.typeof(x1.onEnterFrame) == ValueType.TFunction) { 580// DejaGnu.pass("MovieClip::onEnterFrame() method exists"); 581// } else { 582// DejaGnu.fail("MovieClip::onEnterFrame() method doesn't exist"); 583// } 584// if (Type.typeof(x1.onKeyDown) == ValueType.TFunction) { 585// DejaGnu.pass("MovieClip::onKeyDown() method exists"); 586// } else { 587// DejaGnu.fail("MovieClip::onKeyDown() method doesn't exist"); 588// } 589// if (Type.typeof(x1.onKeyUp) == ValueType.TFunction) { 590// DejaGnu.pass("MovieClip::onKeyUp method exists"); 591// } else { 592// DejaGnu.fail("MovieClip::onKeyUp method doesn't exist"); 593// } 594// if (Type.typeof(x1.onKillFocus) == ValueType.TFunction) { 595// DejaGnu.pass("MovieClip::onKillFocus() method exists"); 596// } else { 597// DejaGnu.fail("MovieClip::onKillFocus() method doesn't exist"); 598// } 599// if (Type.typeof(x1.onLoad) == ValueType.TFunction) { 600// DejaGnu.pass("MovieClip::onLoad() method exists"); 601// } else { 602// DejaGnu.fail("MovieClip::onLoad() method doesn't exist"); 603// } 604// if (Type.typeof(x1.onMouseDown) == ValueType.TFunction) { 605// DejaGnu.pass("MovieClip::onMouseDown() method exists"); 606// } else { 607// DejaGnu.fail("MovieClip::onMouseDown() method doesn't exist"); 608// } 609// if (Type.typeof(x1.onMouseMove) == ValueType.TFunction) { 610// DejaGnu.pass("MovieClip::onMouseMove() method exists"); 611// } else { 612// DejaGnu.fail("MovieClip::onMouseMove() method doesn't exist"); 613// } 614// if (Type.typeof(x1.onMouseUp) == ValueType.TFunction) { 615// DejaGnu.pass("MovieClip::onMouseUp() method exists"); 616// } else { 617// DejaGnu.fail("MovieClip::onMouseUp() method doesn't exist"); 618// } 619// if (Type.typeof(x1.onPress) == ValueType.TFunction) { 620// DejaGnu.pass("MovieClip::onPress() method exists"); 621// } else { 622// DejaGnu.fail("MovieClip::onPress() method doesn't exist"); 623// } 624// if (Type.typeof(x1.onRelease) == ValueType.TFunction) { 625// DejaGnu.pass("MovieClip::onRelease() method exists"); 626// } else { 627// DejaGnu.fail("MovieClip::onRelease() method doesn't exist"); 628// } 629// if (Type.typeof(x1.onReleaseOutside) == ValueType.TFunction) { 630// DejaGnu.pass("MovieClip::onReleaseOutside() method exists"); 631// } else { 632// DejaGnu.fail("MovieClip::onReleaseOutside() method doesn't exist"); 633// } 634// if (Type.typeof(x1.onRollOut) == ValueType.TFunction) { 635// DejaGnu.pass("MovieClip::onRollOut method exists"); 636// } else { 637// DejaGnu.fail("MovieClip::onRollOut method doesn't exist"); 638// } 639// if (Type.typeof(x1.onRollOver) == ValueType.TFunction) { 640// DejaGnu.pass("MovieClip::onRollOver() method exists"); 641// } else { 642// DejaGnu.fail("MovieClip::onRollOver() method doesn't exist"); 643// } 644// if (Type.typeof(x1.onSetFocus) == ValueType.TFunction) { 645// DejaGnu.pass("MovieClip::onSetFocus() method exists"); 646// } else { 647// DejaGnu.fail("MovieClip::onSetFocus() method doesn't exist"); 648// } 649// if (Type.typeof(x1.onUnload) == ValueType.TFunction) { 650// DejaGnu.pass("MovieClip::onUnload() method exists"); 651// } else { 652// DejaGnu.fail("MovieClip::onUnload() method doesn't exist"); 653// } 654 if (Type.typeof(x1.play) == ValueType.TFunction) { 655 DejaGnu.pass("MovieClip::play() method exists"); 656 } else { 657 DejaGnu.fail("MovieClip::play() method doesn't exist"); 658 } 659 if (Type.typeof(x1.prevFrame) == ValueType.TFunction) { 660 DejaGnu.pass("MovieClip::prevFrame() method exists"); 661 } else { 662 DejaGnu.fail("MovieClip::prevFrame() method doesn't exist"); 663 } 664 if (Type.typeof(x1.removeMovieClip) == ValueType.TFunction) { 665 DejaGnu.pass("MovieClip::removeMovieClip() method exists"); 666 } else { 667 DejaGnu.fail("MovieClip::removeMovieClip() method doesn't exist"); 668 } 669 if (Type.typeof(x1.setMask) == ValueType.TFunction) { 670 DejaGnu.pass("MovieClip::setMask() method exists"); 671 } else { 672 DejaGnu.fail("MovieClip::setMask() method doesn't exist"); 673 } 674 if (Type.typeof(x1.startDrag) == ValueType.TFunction) { 675 DejaGnu.pass("MovieClip::startDrag() method exists"); 676 } else { 677 DejaGnu.fail("MovieClip::startDrag() method doesn't exist"); 678 } 679 if (Type.typeof(x1.stop) == ValueType.TFunction) { 680 DejaGnu.pass("MovieClip::stop() method exists"); 681 } else { 682 DejaGnu.fail("MovieClip::stop() method doesn't exist"); 683 } 684 if (Type.typeof(x1.stopDrag) == ValueType.TFunction) { 685 DejaGnu.pass("MovieClip::stopDrag() method exists"); 686 } else { 687 DejaGnu.fail("MovieClip::stopDrag() method doesn't exist"); 688 } 689 if (Type.typeof(x1.swapDepths) == ValueType.TFunction) { 690 DejaGnu.pass("MovieClip::swapDepths() method exists"); 691 } else { 692 DejaGnu.fail("MovieClip::swapDepths() method doesn't exist"); 693 } 694 if (Type.typeof(x1.unloadMovie) == ValueType.TFunction) { 695 DejaGnu.pass("MovieClip::unloadMovie() method exists"); 696 } else { 697 DejaGnu.fail("MovieClip::unloadMovie() method doesn't exist"); 698 } 699#end 700 701 // Call this after finishing all tests. It prints out the totals. 702 DejaGnu.done(); 703 } 704} 705 706// local Variables: 707// mode: C++ 708// indent-tabs-mode: t 709// End: 710 711