A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: !! Unloading a Variable!! Help Needed

  1. #1
    Junior Member
    Join Date
    Apr 2003
    Posts
    16

    !! Unloading a Variable!! Help Needed

    Hi,

    I need some help unloading a variable when you click on a button and I need to know what to add to the button (on press) to unload the variable. heres my script:


    myVar = "home.swf";

    function loadFunction(movie) {

    loaderClip.loadMovie(movie);

    trace(movie+" is loaded");

    }

    // names of clips loaded

    myClips = ["section1.swf", "section2.swf", "section3.swf", "section4.swf"];

    for (var n = 0; n<4; n++) {

    var fakeName = this["but"+n];

    fakeName.myNum = n;

    fakeName.onPress = function() {

    _root.animationClip.play();

    myVar = myClips[this.myNum];

    };

    }


    and here is the script that loads the variable:
    stop();

    _root.loadFunction(_root.myVar);

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Load or unload?

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