1 Reply Latest reply on Oct 27, 2009 3:12 AM by TaoHunter

    Scaling objects with onCuePoint function looking bad?

    TaoHunter

      I'm working on a project in which I'm using a background movie playing in a Movie Object and on top of that I'm showing texts and images sort of like they are in the movie itself. The way I did this is by making the movie in After Effects and giving every frame in the movie the required position, alpha and scale parameters for each object in the flash movie.

       

      In Flash I have the following code to play the movie and read those cuepoints:

       

      var connection_nc:NetConnection = new NetConnection();
      connection_nc.connect(null);
      var stream_ns:NetStream = new NetStream(connection_nc);
      stream_ns.onMetaData = function(metaProp:Object)

           traceMeta(metaProp);
      };

       

      my_video.attachVideo(stream_ns);

      stream_ns.play("testclip.flv");

       

      stream_ns.onCuePoint = function(infoObject:Object) {
           holder._x = infoObject.parameters.xpos_Slider;
           holder._y = infoObject.parameters.ypos_Slider;
           holder._xscale = holder._yscale=infoObject.parameters.scale_Slider;
           holder._alpha = infoObject.parameters.alpha_Slider;
      };


      For the position and alpha properties this works pretty well but as soon as the scaling kicks in things go wrong.

      The animation of the holder movieclip becomes very very 'choppy'. I've tried increasing the framerate of the movie but with no result at all.

      The way I see it I should be getting a 25 fps update on the properties so it should look pretty smooth.

       

      Is there any way I can prevent this from happening or is this just some shortcomming in flash?

      Or maybe there is a different/better way to do all this?

       

      Many thanks in advance,

      TaoHunter