Jump to content
Search Community

incubus last won the day on March 11 2014

incubus had the most liked content!

incubus

Members
  • Posts

    10
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by incubus

  1. Sorry, we're not typically awake at 5 o'clock in the morning;)

     

    The problem is that you are using a TweenMax tween to control the position of handle_mc AND timeline tweens in flash. You can't do both. To test just add to frame1's code:

     

    handleMC.x = 10;

     

    When you compile you will see none of your timeline animation at all :(

     

    ---

     

    I would suggest removing ALL the frames past frame1 and the guide layer from shoot_mc. 

     

    SInce you already have the Bezier tween built you can do the same exact animation you were doing inside the shoot_mc movie clip. 

     

    You can literally tween the progress of the Bezier tween you already created kind of like this:

     

    function footAnimationFinished():void
    {
    tween = TweenMax.to(handleMC,.2, { bezier:{values:[
                   {x:shoot_mc.d1.x,y:shoot_mc.d1.y},
                   {x:shoot_mc.d2.x,y:shoot_mc.d2.y},
                   {x:shoot_mc.d3.x,y:shoot_mc.d3.y},
                   {x:shoot_mc.d4.x,y:shoot_mc.d4.y},
                   {x:shoot_mc.d5.x,y:shoot_mc.d5.y},
                   {x:shoot_mc.d6.x,y:shoot_mc.d6.y},
                   {x:shoot_mc.d7.x,y:shoot_mc.d7.y}
               ],
                   type:"thru",
                   curviness:0
               },
                   ease:Linear.easeNone,
                   paused:true
               });
    
    
    
    
    handleMC.buttonMode = true;
    handleMC.addEventListener(MouseEvent.MOUSE_DOWN, onDownPoints);
    handleMC.addEventListener(MouseEvent.MOUSE_UP, onUpPoints);
    handleMC.addEventListener(MouseEvent.CLICK,onClick);
    }
    
    //This will tween the progress of your tween 
    var autoTween:TweenMax = TweenMax.to(tween, 1, {progress:0.5, repeat:10, yoyo:true});
    
    
    function onDownPoints(event:MouseEvent):void
    {
    autoTween.pause();
    startMouseY = mouseY - (handleMC.y + (handleMC.height/2))+225;
    startMouseX = mouseX - (handleMC.x + (handleMC.width/2))+225;
    stage.addEventListener(MouseEvent.MOUSE_MOVE, update);
    stage.addEventListener(MouseEvent.MOUSE_UP, onUpPoints);
    }

    I attached a CS5 fla:

     

    You will see that the dragging kind of works, but I think your formula needs a little tweaking. 

    Unfortunately I don't know exactly what to recommend there.

    Hopefully some of this helps you.

     

    Sorry again. I'm still trouble with bezier. As you can see that fla file "Mouse UP" event doesnt work properly :( Am I doing correct way using to "tween.reverse() after that tween.resume()" 

     

    which one is works properly ? also may I use tween.updateTo() method?

    • Like 1
  2. Sorry, we're not typically awake at 5 o'clock in the morning;)

     

    The problem is that you are using a TweenMax tween to control the position of handle_mc AND timeline tweens in flash. You can't do both. To test just add to frame1's code:

     

    handleMC.x = 10;

     

    When you compile you will see none of your timeline animation at all :(

     

    ---

     

    I would suggest removing ALL the frames past frame1 and the guide layer from shoot_mc. 

     

    SInce you already have the Bezier tween built you can do the same exact animation you were doing inside the shoot_mc movie clip. 

     

    You can literally tween the progress of the Bezier tween you already created kind of like this:

     

    function footAnimationFinished():void
    {
    tween = TweenMax.to(handleMC,.2, { bezier:{values:[
                   {x:shoot_mc.d1.x,y:shoot_mc.d1.y},
                   {x:shoot_mc.d2.x,y:shoot_mc.d2.y},
                   {x:shoot_mc.d3.x,y:shoot_mc.d3.y},
                   {x:shoot_mc.d4.x,y:shoot_mc.d4.y},
                   {x:shoot_mc.d5.x,y:shoot_mc.d5.y},
                   {x:shoot_mc.d6.x,y:shoot_mc.d6.y},
                   {x:shoot_mc.d7.x,y:shoot_mc.d7.y}
               ],
                   type:"thru",
                   curviness:0
               },
                   ease:Linear.easeNone,
                   paused:true
               });
    
    
    
    
    handleMC.buttonMode = true;
    handleMC.addEventListener(MouseEvent.MOUSE_DOWN, onDownPoints);
    handleMC.addEventListener(MouseEvent.MOUSE_UP, onUpPoints);
    handleMC.addEventListener(MouseEvent.CLICK,onClick);
    }
    
    //This will tween the progress of your tween 
    var autoTween:TweenMax = TweenMax.to(tween, 1, {progress:0.5, repeat:10, yoyo:true});
    
    
    function onDownPoints(event:MouseEvent):void
    {
    autoTween.pause();
    startMouseY = mouseY - (handleMC.y + (handleMC.height/2))+225;
    startMouseX = mouseX - (handleMC.x + (handleMC.width/2))+225;
    stage.addEventListener(MouseEvent.MOUSE_MOVE, update);
    stage.addEventListener(MouseEvent.MOUSE_UP, onUpPoints);
    }

    I attached a CS5 fla:

     

    You will see that the dragging kind of works, but I think your formula needs a little tweaking. 

    Unfortunately I don't know exactly what to recommend there.

    Hopefully some of this helps you.

     

    waaov thank you so much! you save my butt again :)

  3. Sorry, using Flash Pro all I can say is that my CPU resources are showing no odd behavior. After videos load Flash is only using 15% or so. No spikes, no fans kicking in.

     

    I don't know what else to suggest. Have you tried loading less videos? Does that help?

    Thank you ! it works as you said :) My problem be due to intelliJ idea.

  4. Hi, i have a foot illustration and basically i want to click and drag foot object it's drags according to my movieclip point's x and y values. But when foot movieclip instructor animation played then i click the foot object it's position broken. I know i didn't explain clearly. Sorry my english. Here is below my source files. When you can see swf i hope you will understand, what i am trying to say.

     

    source file : https://dl.dropboxusercontent.com/u/54591390/shoot_cursor.fla

  5. If you add the following bold code to your complete handler

     

     private function completeHandler(event:LoaderEvent):void
            {
                queue = LoaderMax.getLoader("videoListLoader");
    trace(queue);
                queue.vars = { auditSize:false  };
                videosArray = queue.getChildren();
                queue.load(true);
                queue.addEventListener(LoaderEvent.PROGRESS, onVideoProgress);
    trace("all done");
    addChild(videosArray[0].content)
     
            }

     

    You will see that the first video is playing, which is odd because you are setting autoplay="false" in your xml. 

     

    autoplay should be autoPlay (cap P). 

     

    Do a find and replace in your xml and make that change.

    When you re-test you should see much less CPU usage as 25 videos are no longer playing at the same time (and also note you will not see the first video playing any more either).

     

    To target and play the first video just use:

    videosArray[0].playVideo();

    after the videos have loaded

     

    But still my IDE (intellijIDE) is terminated.

  6. Hey all, I've problem with videoloader when I want to load bunch of video (each video size 2,30 mb and I have 25 videos its total size is 60 mb) I'dont know what problem is.

     

    Here is code below. Please take a look at and tell me what I'm doing wrong: 

    package
    {
        import com.greensock.TweenMax;
        import com.greensock.loading.VideoLoader;
        import com.greensock.loading.LoaderMax;
        import com.greensock.events.LoaderEvent;
        import com.greensock.loading.XMLLoader;
        import com.greensock.loading.SWFLoader;
        import flash.display.DisplayObject;
        import flash.display.MovieClip;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.Event;
    import flash.system.LoaderContext;
    
    
    import videos.QueueVideoLoader;
    
    [SWF(frameRate=30, width=1366, height=768)]
    
        public class Preloader extends MovieClip
        {
            LoaderMax.activate([SWFLoader, XMLLoader, VideoLoader]);
    
            private var loadermax:LoaderMax;
            private var videosArray:Array;
            private var queue:LoaderMax;
            private var libAssets:PreloaderClass;
            private var loaderContext:LoaderContext;
    
            public function Preloader()
            {
                stage.align     = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
    
                loaderContext = new LoaderContext();
                loaderContext.checkPolicyFile = false;
    
                LoaderMax.defaultContext = loaderContext;
    
                videosArray = [];
               
    
                loadermax = new LoaderMax({name:"mainQueue", auditSize:false , onProgress:progressHandler,onComplete:completeHandler,onError:errorHandler});
                loadermax.append(new XMLLoader("assets/xml/data.xml",{ name: "video_xmldata"}));
                loadermax.append(new SWFLoader("GolKacti.swf", { name:"content_swf" }));
                loadermax.load();
            }
    
            
            private function completeHandler(event:LoaderEvent):void
            {
                queue = LoaderMax.getLoader("videoListLoader");
                queue.vars = { auditSize:false  };
                videosArray = queue.getChildren();
                queue.load(true);
                queue.addEventListener(LoaderEvent.PROGRESS, onVideoProgress);
                QueueVideoLoader.videoData = videosArray;
            }
    
            private function onVideoProgress(event:LoaderEvent):void
            {
                if(event.target.progress == 1)
                    addChild(LoaderMax.getContent("content_swf"));
            }
    
            private function progressHandler(event:LoaderEvent):void
            {
                trace("progress");
                
                if(Number(event.target.progress)==1)
                {
                  //  addChild(LoaderMax.getContent("content_swf"));
                }
            }
    
            private function errorHandler(event:LoaderMax):void
            {
                trace("hata");
            }
        }
    }
    
×
×
  • Create New...