actionscript: populate variables based on parameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daJunkCollector
    New Member
    • Jun 2007
    • 76

    actionscript: populate variables based on parameter

    My code is posted below. I have function that is being executed from an external interface. The parameter is passed to the function based on an external html combo box.

    I need the variables in the function to populate based on the paramter that is passed. In this example parameter1 will equal a State's name. Could you please provide with some recommendations :

    Code:
    function externalZoom(parameter1) {
      stateZoom = true;
      usa._xreg = variable1;
      usa._yeg = variable2;
      zoomMap (_root.variable3, _root.variable4);
      stopButtons();
      variable5._alpha=100;
      countyGone = variable6;
      fadeCounties (_root.variable6);
      _root.stateLabel = variable7;
    }
    As you can see, the Variables 1-7 will be different for every state.

    Final Briefing:
    Just to clarify, this function already exists in my code and I pass a parameter for each of the 7 variables in the function. I now have a problem because I can only pass one parameter (the State's name).

    Thanks for any and all feedback.
  • daJunkCollector
    New Member
    • Jun 2007
    • 76

    #2
    I am considering using a super long switch statement. Any feedback is still appreciated.

    Comment

    Working...