Jump to content
Search Community

neuralism

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by neuralism

  1. Thank you geniuses! You guys just saved my life lol. It works like a charm XD

     

    I'll need to go read up more to fully understand the mechanics of the code better.

     

    I'm having one more issue though and that is getting it to reverse once the user does a ROLL_OUT on a hitArea. It's not working and I'm not sure what I'm doing it wrong, using tl.reverse(); at the moment

     

     squareA.x = 0;
     sqaureB.x = 100;
    
     hit_Area.addEventListener(MouseEvent.ROLL_OVER, handler);
     hit_Area.addEventListener(MouseEvent.ROLL_OUT, handler);
    
     public function handler(event:MouseEvent):void
     {
      var tl:TimelineMax = new TimelineMax({ paused:true });
    
      tl.append(new TweenMax(squareA, 0.4, { x: 100, ease:Linear.easeNone }));
      tl.append(new TweenMax(squareB, 0.3, { x: 500, ease:Linear.easeNone }));
    
      if (event.type == MouseEvent.ROLL_OVER)
      {
    TweenMax.to(tl, tl.duration, { currentTime: tl.duration, ease:Expo.easeOut });
      }
    
      if (event.type == MouseEvent.ROLL_OUT)
      {
    tl.reverse();
      }
     }
    
    

  2. Hello all!

     

    Is it possible to get 2 consecutive tweens to follow one overall ease?

     

    let's say i have something like

     

    squareA.x = 0;

    squareB.x = 100;

     

    var tl:TimelineMax = new TimelineMax({ });

     

    tl.append(new TweenLite(squareA, ??, { x: 100 });

    tl.append(new TweenLite(squareB, ??, { x: 500 });

     

    I want squareB to start moving once squareA reaches it have whole thing to be one seamless animation with say Expo.easeOut.

     

    so all in all the it should look like a square moving from 0 to 500 in one seamless motion with easing.

     

    how can I go about this?

     

    Thanks in advance!

  3. Hi All,

     

    My preloader runs a little funny and is not progressing as it should.

    I'm currently loading an xml file which contains a list of other SWFs for the preloader to load.

    It updates the LoaderMax object by appending new SWFLoaders once the xml has been loaded.

     

    import com.greensock.loading.LoaderMax;
    import com.greensock.loading.XMLLoader;
    import com.greensock.loading.SWFLoader;
    
    public var loader:LoaderMax = new LoaderMax( { onProgress: progressHandler, onComplete: completeHandler } );
    
    public function init():void
    {
    loader.append(new XMLLoader("data.xml", { name: "data_xml", onComplete: updateLoader } );
    loader.load();
    }
    
    public function updateLoader(event:LoaderEvent):void
    {	
    var xml:XMLList = XMLList(loader.getContent("data_xml"));	
    
    for (var i:int = 0; i < xml.loadlist.length(); i++) 
    {
    	loader.append(new SWFLoader(xml.loadlist.item[i], { name: "item" + i } ));
    }
    }
    

     

    I know what I'm doing doesn't seem right, can't expect the preloader to predict the files in the xml even before the it has been loaded

    How should I go about compacting this whole process into 1 preloader? It is going to be dynamic so the external swfs will change over time.

     

    XML file example:

     

    <?xml version="1.0" encoding="utf-8"?>
    
    item0.swf
    item1.swf
    item2.swf
    item3.swf
    item4.swf
    item5.swf
    

     

    Thanks in advance!

  4. hello,

     

    I'm currently Tweening a movieclip vector like so

     

    TweenMax.to(mc, 0.5, { rotationY: 360 } );

     

    However, the image becomes lossy even tho it has returned back to it's original position (I understand that if the image is tilted it will definitely be slighty blured out).

     

    Is there anyway to preserve the vector quality when it returns to it's normal position? Or any workaround for that matter?

     

    Thanks in advance!

  5. Hello,

     

    I've loaded some SWFs into a container and need to access the SWFs via the container itself. How should I go about it?

     

    loader.append(new SWFLoader("my.swf"), { onComplete: completeHandler, container: myMovieClip} ));

     

    Let's say I'm now working in the DocumentClass or the timeline of myMovieClip. How do I go about accessing the content that has been loaded onto its stage?

     

    Thanks!

  6. Was wondering if I could get some help.

     

    I don't know what I'm doing wrong.

     

    I'm getting a VerifyError: Error #1053: Illegal override of addChild in com.greensock.TimelineLite when trying to "TweenLite.to" loaded content from LoaderMax.

     

    Any thoughts?

     

    package
    {
    import flash.display.MovieClip;
    
    import com.greensock.TweenLite;
    import com.greensock.loading.SWFLoader;
    import com.greensock.loading.data.SWFLoaderVars;
    import com.greensock.events.LoaderEvent;
    
    public class myClass extends MovieClip
    {
    	var loader:LoaderMax();
    
    	public function myClass()
    	{
    		loader = new LoaderMax(onComplete: completeHandler);
    		loader.append(new SWFLoader("my.swf", new SWFLoaderVars().name("my_swf").container(this)));
    		loader.load();
    	}
    
    	public function completeHandler(event:LoaderEvent):void
    	{
    		var my_swf:ContentDisplay = loader.getContent("my_swf");
    
    		TweenLite.to(my_swf, 0.5, { x: 100 }); // ERROR WHEN TRYING TO TWEEN LOADED OBJECT
    	}
    }
    
    }
    
    

  7. Hi Folks,

     

    is there a way to access attributes on the object that is currently being (or about to be?) Tweened using Tweenmax.allTo?

     

    import com.greensock.*;
    
    var instanceList:Array = new Array(instance0, instance1, instance2);
    
    TweenMax.allTo(instanceList, 0.5, { x: -(instanceList[n].width), y: -(instanceList[n].height) }, 0.1);
    
    

     

    hoping to find out if there is anything like evt.currentTarget from those addEventListener methods?

     

    alternatively I would do

    import com.greensock.*;
    
    var instanceList:Array = new Array(instance0, instance1, instance2);
    
    for (var i:* in intanceList)
    {
    TweenLite.to(instanceList[i], 0.5, { x: -(instanceList[i].width), y: -(instanceList[i].height), delay: 0.05 });
    }
    

     

    But I'm just looking for possibilities on the former.

     

    Thanks!

×
×
  • Create New...