4 Replies Latest reply on May 24, 2006 6:44 AM by robdodson

    Panicking Student - Please Help - Tween Class Question

    robdodson
      Hello,

      I'm working on a map site which will feature all of these little markers on one large map that the user will be able to zoom in on and move around. Unfortunately I think I might have overestimated the power of the tween class. Here is a link to my project so far: http://www.stationarynotes.com/studioI/MapFinal.html

      The bluish area is a button which, when pressed, uses the tween class to zoom in on the map. Clicking on one of the markers uses another tween class to pan the map while an animation function runs to scale the marker up.

      Unfortunately, because of all this processor intensive work, the site CRAWLS! Do you think it would be better for me to switch over to actually keyframing my zoom-ins and my marker scaling? Or maybe I just should pan the map and scale the marker simultaneously, maybe I should wait for one to finish and then do the other.

      Oh jeez....I just wish there was some sort of magic bullet to fix all of this for me. Maybe some special way to package the site and the graphics so that they're optimized for this kind of animation. I have about 8 days left to finish the whole thing...
      any advice is greatly appreciated.

      Thank You,
      Rob
        • 1. Re: Panicking Student - Please Help - Tween Class Question
          2m Level 2
          It doesn't seem so slow on my machine, but I do see, that it will be slow on others, and it also will become slower with every thing you will add.

          As often it is very unlikely that ther will be some kind of silver bulett. In fact it is to be expected to be slow. You're using all vector art as far as I can see so flach will render every frame (no matter what kind of tween timeline or as you use) from taht data. As Flash by design is not using specialices featuers of modern gpus for that purpose all the work is done by the cpu.

          Right now I would have two ideas how to improve performance.

          Number one would be to reduce the level of detail at least while zooming, which means: turn of as much graphical details as possiple after click -> zoom -> and turn them on again when the final destination is reached.

          Number two would only work if your on Flash 8. Instad of scaling the vector art, you could use a chached bitmap copy of it to zoom (maybe blur it a bit - but that also might hit on performance) and rerender it when the final zoom is reached.
          (I only understand that in theory, as I rarley target Flash 8 until today, but in theory that should help greatly, but combining it with the tween classes might not be a walk in the park - I'd be expecting some rough terrain...)
          • 2. Re: Panicking Student - Please Help - Tween Class Question
            robdodson Level 1
            The zoom is not what bothers me so much as the panning of the map when the user clicks on a marker. Would switching to a jpeg of the map when it's at that level help any? Also, I don't think I have time to figure this out, but I should probably replace all of the contents on my markers with one image and then load everything after the user has clicked on them. Here is the site i'm basing my design on: http://www.curatingthecity.org/map.jsp
            and that's how they do it.
            • 3. Re: Panicking Student - Please Help - Tween Class Question
              Nickels55 Level 2
              Your site works great on my machine (P4 2 Ghz 1 Gig ram). I have no slowdown on the panning or zooming.
              • 4. Panicking Student - Please Help - Tween Class Question
                robdodson Level 1
                Well I just had a major breakthrough. I didn't realize there was a _quality setting!!! I've got it setup now to switch the _quality to "LOW" whenever there's an animation about to happen, and back to "HIGH" whenever it's finished. Here's a link explaining it a bit better: http://www.actionscript.com/reference/_quality.php

                Here's a link to my new page: http://www.stationarynotes.com/studioI/MapFinalHigh.html