2 Replies Latest reply on Feb 6, 2013 7:17 AM by JP_Leya

    The update function on edge!

    JP_Leya

      Hi there!

           I'm having a little trouble on migrating from flash.

       

           How can i do something like:

       

                AS3: MovieClip(parent).addEventListener(Event.EnterFrame, doSomething);

       

            The logic its not the same (frames vs time), but there's a way to acomplish the same result?

           I want to call a function on a symbol, everytime is parent updates!.

       

      Thx

      João Ferreira

        • 1. Re: The update function on edge!
          joel_pau Level 5

          Hi João,

           

          You've got 3 tools:

          • Edge provides you an update panel within code panel: Stage > Timeline > Update. You put your doSomething inside the update panel.

          Note that the Update panel is available for each symbol.

          completeEvents.jpg

          • old tool: setTimeout()
          • new tool: window.requestAnimationFrame()

           

          ==> Demo file: https://www.box.com/s/ryzk0oh50j8v2fi78ca8

          • 2. Re: The update function on edge!
            JP_Leya Level 1

            Hi.. thx for the help!

             

                 But this does not match my problem. Using your example image:

                      - I'm inside the details symbol;

                      - and from there i want to bind/create the update event of the stage.

                

                 Example: I have a scroll bar as a symbol, and i want to control the parent where the scroll bar is inserted. Without having to add code on the parent.. so it can be easly re-used.

             

                 Is it possible?