Welcome, Guest
  • Author Topic: Problem with moveTo and lineTo  (Read 3094 times)

    Govinda

    • Mods
    • Systems Administrator
    • *****
    • Posts: 510
    • If You Want To Be Big Then Solve Big Problems
      • View Profile
      • Mitr Learning & Media
      • Email
    Problem with moveTo and lineTo
    « on: 07/07/08, 01:04 »
    Guys,

    I'm facing a issue while creating some circles using moveTo and lineTo.

    I'm creating these circles in an interval of 1 second. The movie is working fine till it reaches to 12-13 circles. But after that the movie strats slowing down. By the time it reaches 20 the movie freezes.

    I've tried using cacheAsBitmap, but it didn't help. May be I'm not using cacheAsBitmap correctly.

    Please help.
    .: Govinda :.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Problem with moveTo and lineTo
    « Reply #1 on: 07/07/08, 08:26 »
    Are you sure that intervals are not cumulating? Use trace(interval) to be sure you always the same integer (intervals are reported as integer numbers)

    Jorge

    Govinda

    • Mods
    • Systems Administrator
    • *****
    • Posts: 510
    • If You Want To Be Big Then Solve Big Problems
      • View Profile
      • Mitr Learning & Media
      • Email
    Re: Problem with moveTo and lineTo
    « Reply #2 on: 07/07/08, 08:51 »
    Hi Jorge,

    Thanks for the reply.

    I've checked the same. I'm getting the same issue even after I change intervals to onEnterFrame.
    .: Govinda :.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Problem with moveTo and lineTo
    « Reply #3 on: 07/07/08, 09:13 »
    If you're drawing all the time inside the same MC, the entire MC is refresehd/calculated on each pass. Try to draw each circle in his own container if possible. Also use Ctrl+ALT+Delete , Performance tab to see how much CPU and Ram is consuming your movie trough time

    Jorge

    Govinda

    • Mods
    • Systems Administrator
    • *****
    • Posts: 510
    • If You Want To Be Big Then Solve Big Problems
      • View Profile
      • Mitr Learning & Media
      • Email
    Re: Problem with moveTo and lineTo
    « Reply #4 on: 07/07/08, 09:21 »
    Each time I'm creating a new movieclip (Using createEmptyMovieClip) and drawing the circle in it.

    Task Manager is showing 100% CPU consumed.
    .: Govinda :.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Problem with moveTo and lineTo
    « Reply #5 on: 07/08/08, 04:35 »
    Also I guess you're using curveTo to optimize render instead of tons of points (strictly, with four curveTo you draw a circle)

    Jorge

    Govinda

    • Mods
    • Systems Administrator
    • *****
    • Posts: 510
    • If You Want To Be Big Then Solve Big Problems
      • View Profile
      • Mitr Learning & Media
      • Email
    Re: Problem with moveTo and lineTo
    « Reply #6 on: 07/08/08, 07:07 »
    Yes, I'm using as you said.
    .: Govinda :.