9 Replies Latest reply on Jun 4, 2009 3:59 PM by dzeikei

    Help please!

    bubbleboy21 Level 1

      I am trying to make a "log in" for the people who buy the ability to download stuf from my site, but that is beyond the point. Each one of them is given the same password. I am trying to make it so that they type in the password, click enter, and are taken to the base state where they can download it. I keep getting errors and it won't work. I don't know what i am doing wrong. Please help. This is my code below. The password is supposed to be ilikepie

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#B3BE00, #FFA800]" currentState="Enter">
          <mx:states>
              <mx:State name="Enter">
                  <mx:RemoveChild target="{text1}"/>
                  <mx:AddChild position="lastChild">
                      <mx:TextInput x="154" y="327" id="Input"/>
                  </mx:AddChild>
                  <mx:AddChild position="lastChild">
                      <mx:Button x="357" y="327" label="Enter" id="go" click="checkpassword();"/>
                  </mx:AddChild>
              </mx:State>
          </mx:states>
          <mx:Image x="10" y="10" source="@Embed('../Assets/Sigma Logo.gif')" width="208" height="121"/>
          <mx:Text x="301.5" y="141" text="Downloads" width="93" color="#000000" fontSize="16" id="text1"/>
          <mx:Script>
              <![CDATA[
                  new function checkpassword():void;
                      if (Input.text = ilikepie)
                       {currentState=''}
              ]]>
          </mx:Script>
      </mx:Application>