13 Replies Latest reply on Apr 16, 2007 12:14 PM by bknysh

    Drag and Drop external SWF scope problem?

      I've created a flash program with a drag and drop activity. It works fine on its own. I'm now trying to load it into the main flash program as an external swf. The drag and drop doesn't work. The drag and drop target comparison expression never equals.

      A trace of the "eval(this._droptarget)" says the variable is undefined. Since it works stand alone (i.e., the variable shows as defined and the expression works), I don't know why it shows up as undefined after loading into another movie. I'm assuming this is a scope problem. I thought that "this." was a relative statement referring to itself. Why is this variable no longer defined after the flash movie has been loaded into another flash movie?

      Drag_1_1.onPress = function():Void {
      Drag_1_1.onRelease = function():Void {
      trace (eval(this._droptarget));
      trace (Drop_1_1);
      if (eval(this._droptarget) == Drop_1_1) {
      this._x = 295;
      this._y = 215;