Jump to content
Search Community

Imageloader with Tweenlite not working

lemonlemon test
Moderator Tag

Recommended Posts

hi,

 

imageloader with tweenlite works ok when testing locally, but externally image loads without tweenlite effect.

Here´s the code:

 

stop();

 

import com.greensock.*;

import com.greensock.events.LoaderEvent;

import com.greensock.loading.*;

 

//create an ImageLoader:

var loader:ImageLoader = new ImageLoader("images/pic1.jpg",

{name:"photo1", container:this, x:300, y:200, width:600, height:470,

scaleMode:"proportionalInside", centerRegistration:true, onComplete:onImageLoad});

 

//begin loading

loader.load();

 

//when the image loads, fade it in from alpha:0 using TweenLite

function onImageLoad(event:LoaderEvent):void {

TweenLite.from(event.target.content, 1, {alpha:0});

}

Link to comment
Share on other sites

It sounds like maybe you have unrelated code elsewhere in your project that is throwing an error which essentially halts ActionScript execution at that point - I don't see any obvious errors here. But feel free to post a sample set of files that demonstrates the issue (the simpler the better please - no need to post your production files).

Link to comment
Share on other sites

What do you mean by "they may conflict with TweenLite and LoaderMax"? Those classes don't typically cause any kind of conflicts. I just meant that maybe you've got code somewhere (unrelated to GreenSock tools) that is throwing an error which is halting ActionScript execution. That would make it LOOK like TweenLite/Max is broken when it actually has nothing to do with a TweenLite/Max problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...