1 Reply Latest reply on Nov 16, 2010 1:03 PM by Sean_Wilson

    Is it better to put Lingo to BeginSprite or EnterFrame

    miche_r Level 1

      I have done some projectors using VizionDB database, and I have put most of the Lingo to EnterFrame. However, some people on this board have said that it's not good programming method, and it would be better to put code to BeginSprite. I'm starting a new project now, and I'm planning to use BeginSprite more than before. However, I'm wondering now why BeginSprite is better than EnterFrame? Isn't there less code when EnterFrame is used?

       

      For example, I have a page with 30 text fields, and all values are from the database. Earlier the values to all fields were inserted in one EnterFrame script, but now there's BeginSprite script in 30 sprites. I'd like to get some opinions from other developers about this, thanks!

       

      PS. I used the EnterFrame in a way that it's not repeated over and over again, but it's done once and after that it goes to the next frame.

        • 1. Re: Is it better to put Lingo to BeginSprite or EnterFrame
          Sean_Wilson Adobe Community Professional
          PS. I used the EnterFrame in a way that it's not repeated over and over again, but it's done once and after that it goes to the next frame.

          It sounds like the way you have used your enterFrame message is pretty much optimal. There is no "correct" way, and since you have enterFrame working for you (and understand the potential pitfall of having it run X times per second depending on your frame rate) then there's nothing lost by sticking with it.

           

          However, depending on your needs, you might be able to construct a single behavior that utilises #beginSprite and use the getPropertyDescriptionList handler to customise it to different sprites you attach it to.