A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: problem passing a variable

  1. #1
    Senior Member
    Join Date
    May 2006
    Posts
    119

    problem passing a variable

    I am trying to pass this variable to an array and play the contents of the array from a button. But so far to no avail. Can anyone tell me if im even on the right track here?

    (the variable, created when a button is pressed...is what Im trying to do)
    on (press) {
    startDrag(tile_i);
    this = tile;
    tile.attachSound("I.mp3");
    }
    on (release) {
    stopDrag();
    if (tile_i._droptarget == tile_1.DropZone)
    //trace("test");
    soundSeq.push("tile"); //to send the variable to the array
    }
    --------------
    (the array and play function)

    soundSeq = Array();
    _root.button.onRelease = function() {
    for (z=0; z<soundSeq; ++z) { // I figure this will play the array
    soundSeq[z].play();
    }
    };

    Thanks in advance for any pointers!

    Mark

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    soundSeq = Array();

    use - soundSeq = new Array();
    or - soundSeq = [];

    and - for (var z=0; z<soundSeq.length;z++)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center