Jump to content
Search Community

bluebill1049

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by bluebill1049

  1. I would like like to replace a spirte's image.

    But before that, i want to check if the image exist in the directory or not. Is there a way to do it?

     

     

    newImage = new ImageLoader(dir + temChild.category + '/' + temChild.productUrl + '.png', {

    container : temChild,

    height : 80,

    width : 80,

    scaleMode : 'proportionalInside',

    onComplete : onColorImageLoad,

    centerRegistration : true,

    noCache: true,

    autoDispose : true

    });

  2. Hi Carl,

     

    Thanks for your quick reply :) u always very helpful.

    ThrowPropsPlugin.to(_panelContainer.mc_productContainer, {throwProps:{
    		 y:{
    		  velocity:yVelocity,
    		  max:25,
    		  min: -(_panelContainer.mc_productContainer.height - _MINIHEIGHT),
    		  resistance:50
    		 }
    	    },onUpdate : function(){
    	    _scrollBar.y = -(_botScroll/_yOverlap * (_panelContainer.mc_productContainer.y - 25 ));
    	    checkPosition(_panelContainer.mc_productContainer.y);
    		   }, ease:Strong.easeOut
    	    }, 5, 0.3, 1);
    

     

    How do i kill it in this situation?

  3. Hi,

     

    i am very new to greensocks loader.

     

    i have load this XML and would like to loads all the images.

     

    var productXmlLoader:XMLLoader = new XMLLoader(_XMLDIR + productCate + 'Products.xml', {

    onComplete:xmlCompleteHandler,

    estimatedBytes:50000

    });

     

    private function xmlCompleteHandler(e:LoaderEvent):void{

    _categoryChildren = e.target.getChildren();

    //trace(_numberOfXmlChildren);

    for(var i = 0; i <_categoryChildren.length; i++){

    did trace _categoryChildren return me with a loader i think, but i dont know how to add them to the stage.

    is there a way you can go like addChild(******)

    }

    }

  4. var stageProductImageLoader:ImageLoader = new ImageLoader(_IMGDIR + e.target.parent.parent.productCategory + '/' + e.target.parent.parent.productId + ".png",

    {container: _allTempleProducts[0].mc_stageProductContainer,

    height:80,

    x:-15,

    y:0,

    onComplete:onImageLoad,

    hAlign: 'left',

    vLaign: 'top',

    scaleMode: 'proportionalInside',

    centerRegistration: false

    });

     

    private function onImageLoad(e:LoaderEvent):void{

    //trace(e.target.rawContent.width/e.target.rawContent.scaleX)

    trace(e.target.rawContent.width/e.target.rawContent.scaleX);

    }

     

    i had this but it doesn't return me the right width, anything wrong i did?

     

    Cheers

    Bill

  5. Hi there,

     

    var stageProductImageLoader:ImageLoader = new ImageLoader(_IMGDIR + e.target.parent.parent.productCategory + '/' + e.target.parent.parent.productId + ".png",

    {container: _allTempleProducts[0].mc_stageProductContainer,

    height:80,

    x:-15,

    y:0,

    hAlign: 'left',

    vLaign: 'top',

    scaleMode: 'proportionalInside',

    centerRegistration: false

    });

     

    is there i way i can get the image's original width and height, cause i want to know the ratio of the image.

     

    Thanks

    Bill

×
×
  • Create New...