how to use fs command

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anuparvathy
    New Member
    • Feb 2007
    • 25

    how to use fs command

    how to use fs command
    --------------------------------------------------------------------------------

    hi...
    i am having a flash template and i am working on asp.net. in my flash template i have buttons.now i want these buttons to direct to diff pages which i have crated in asp.net. so in my action script window i have wriiten this code for one of the buttons:
    on fs_command(pres s)
    {
    getURL("newpage .aspx","_self", "POST");
    }
    is tihs correct???and where and what should i write in asp.net using the fs command?what event should be called and what code should i write to get these buttons working for me....thanking in advance.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    You should have asked your question in the .NET Forum section; not here in the
    .NET Articles section. I'll move your question to the forum for you.

    kind regards,

    Jos

    Comment

    • rsdev
      New Member
      • Jul 2007
      • 149

      #3
      Originally posted by anuparvathy
      how to use fs command
      --------------------------------------------------------------------------------

      hi...
      i am having a flash template and i am working on asp.net. in my flash template i have buttons.now i want these buttons to direct to diff pages which i have crated in asp.net. so in my action script window i have wriiten this code for one of the buttons:
      on fs_command(pres s)
      {
      getURL("newpage .aspx","_self", "POST");
      }
      is tihs correct???and where and what should i write in asp.net using the fs command?what event should be called and what code should i write to get these buttons working for me....thanking in advance.
      getURL is an actionscript command it acts like a hyperlink.

      Code:
      getURL("somepage.aspx", "_blank");
      Will direct the browser to the URL specified. fscommand is used in actionscript to send commands to the client computer, not the browser. So fscommand is for use in a flash movie projector that runs outside of a browser. Don't use this.

      When you say "POST" this means you want to send variables to the query string and pass these to .NET. If you aren't sending data then just use the example above. Otherwise you need to look at the sendAndLoad() function in flash.

      Hope this helps!

      Comment

      • anuparvathy
        New Member
        • Feb 2007
        • 25

        #4
        hi rsdev,

        thank u so much for your reply. as suggested by you i used "blank" instead of "post"as i dont want to pass any variable and i have given it in the following way:
        on (press)
        {
        getURL("Default .aspx","_blank" );

        }
        but when i run this page in .net it is not working.on the button click no new page is opening.is this the only code that has to be written in the action script window of flash? or should i write anything in the source code page of .net.kindly help me.thanking you.

        Comment

        • rsdev
          New Member
          • Jul 2007
          • 149

          #5
          Originally posted by anuparvathy
          hi rsdev,

          thank u so much for your reply. as suggested by you i used "blank" instead of "post"as i dont want to pass any variable and i have given it in the following way:
          on (press)
          {
          getURL("Default .aspx","_blank" );

          }
          but when i run this page in .net it is not working.on the button click no new page is opening.is this the only code that has to be written in the action script window of flash? or should i write anything in the source code page of .net.kindly help me.thanking you.
          You don't have to put anything in the .NET page.

          Just so I understand:

          The button is in a flash movie, that is embedded on aspx page?

          If this is the case then in flash the code above needs to sit inside the behaviour for the button itself. So not on the main timeline. So select the button in the IDE and open the behaviours dialogue in Flash there you should find several options. rollover, rollout, press, release. You need to place getURL in the release section. So the code will be:

          Code:
          on (release)
          {
          getURL("Default.aspx","_blank");
          }
          The on(press) event handles functions inside flash so if you want a sound to play 'click' for instance.

          Your event probably doesn't work because as soon as you release the mouse button the focus is returned to the flash movie and the browser re-direct is lost.

          Comment

          • rsdev
            New Member
            • Jul 2007
            • 149

            #6
            By the way "_blank" is used to open the page in a new window. Use "_self" to open the page in the current window.

            Comment

            • anuparvathy
              New Member
              • Feb 2007
              • 25

              #7
              thank you so much rsdev...it worked!!! as you rightly pointed out it was not on press event, but was on release event that the code has to be written.thank you once again because the button now redirected me to the proper page.

              Comment

              Working...