How to run common routines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • georgem
    Indigo Rose Customer
    • May 2003
    • 6

    How to run common routines

    I have been evaluating AutoPlay and it looks very good but I can't seem to find anyway to run a standard set of actions.
    Have a couple of cases where I want to run the same code but from different events.
    It seems like you have to copy & paste.
    Sort of got it working with creating a new page for the common code, put it in the Page load and then return to original page but it resumes the original page from the start rather than the statement after I called the page.

    Effectively need a gosub/call/exec type function.
    Thanks
  • Corey
    Indigo Rose Staff Alumni
    • Aug 2002
    • 9745

    #2
    Re: How to run common routines

    In some cases using page inheritance can cure your woes. For example put the code on a master page, i.e. "code1" and then just set whichever pages use that code to inherit from that page. It works very well in some cases.

    Flash objects of course can use actionscript functions too, so that works also very well in some other cases. I've used this technique plenty personally, works great.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment

    • georgem
      Indigo Rose Customer
      • May 2003
      • 6

      #3
      Re: How to run common routines

      Thank you both for your comments.
      I tried the Inherit option. This will partly work but appears you have no control over when the code is run.
      i.e. it appears the "code1" page events get run before the page you are invoking.
      Will help in one case but not the other I have.

      Is it feasible to have a Control Structure Action added called EXEC which can invoke a group of code (maybe indicated by a special LABEL and a new RETURN verb). Once RETURN struck it returns to the line after the EXEC.
      Parameters to and from it could be achieved by using variables as currently available.
      The EXEC action could also allow optionally the Page to be specified so you could keep all these routines on a separate page if you wanted.

      Is this the right place to suggest this or should it be in the Suggestion Forum thread?
      Regards
      g.

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9745

        #4
        Re: How to run common routines

        Suggestion forum is a great place... It's a good suggestion, certainly worthy of posting there.

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        Working...
        X