Flash ActionScripting

Out of context: Reply #2

  • Started
  • Last post
  • 5 Responses
  • lw-d0

    Wow, bit confused by that. So I have all my code in once place which is great. I have my initial home movie loaded using:

    loadnav = function (temp:String) {
    if (temp == "modeling") {
    modeling_mc = this.attachMovie("modeling_mc", "modeling_mc","0",{_x:25, _y:108.8});
    }
    if (temp == "modeling") {
    modeling_mc = this.attachMovie("modeling_mc", "modeling_mc","0",{_x:25, _y:108.8});
    }
    else if (temp == "home") {
    home_mc = this.attachMovie("home_mc", "home_mc","0",{_x:25, _y:108.8});
    }
    }

    // calling the function on home
    loadnav("home");

    Now I need to target buttons in the movies of each menu. Then basically change the value of loadmenu to reflect the button pressed. I thought that I would target the button using:

    home_mc.modeling_btn.onPress = function() {
    loadmenu = "modeling";
    }

    That makes sense in my head with what I have learnt so far but it doesn't work :(

View thread