7 Replies Latest reply on Jul 21, 2010 2:56 PM by Ned Murphy

    set an undefined Loaded variable's alpha to 0


      Hi, I'm trying creating a flash navigation bar that can be edited via a simple text file. I'm able to load my different variables properly but i also want to give the user the ability to remove links. I can simply leave the variable from the text file blank and and have the text in the swf disappear but i also want to be able to set the alpha of the movieclip behind the text to zero when the variable is left blank. Alternatively, even if the user could simply set the variable to the string "Blank" and both the alpha of the dynamic text and movieclip would change to zero that would be functional as well. Here is the code i have so far.



      NavLoadVar = new LoadVars();


      NavLoadVar.onLoad = function() {

           b1.text = NavLoadVar.b1text;

           b2.text = NavLoadVar.b2text;

           b3.text = NavLoadVar.b3text;

           b4.text = NavLoadVar.b4text;

           b5.text = NavLoadVar.b5text;

           b6.text = NavLoadVar.b6text;

           b7.text = NavLoadVar.b7text;

           b8.text = NavLoadVar.b8text;



      if (NavLoadVar.b1text == "Blank") {

           divider1._alpha = 0;