Mel

Animate CC: Alpha property not being recognised

Recommended Posts

Hello all,

 

Long time reader, first time poster.

 

I've been using GreenSock for Flash quite happily for a number of years now but we've just had an update to Animate CC and now I can't get it work at all!

 

For example the following code:

 

import com.greensock.*;


stop();

function setPage(){
    boxOver.addEventListener(MouseEvent.MOUSE_OVER, showInfo);
    boxOver.buttonMode = true;
}

setPage();

function showInfo(e:MouseEvent){
    boxOver.removeEventListener(MouseEvent.MOUSE_OVER, showInfo);
    boxOver.addEventListener(MouseEvent.MOUSE_OUT, hideInfo);

    TweenLite.to(showInfo, 0.5, {alpha:0});

    //reduce alpha with GreenSock

}

function hideInfo(e:MouseEvent){
    boxOver.addEventListener(MouseEvent.MOUSE_OVER, showInfo);    
    boxOver.removeEventListener(MouseEvent.MOUSE_OUT, hideInfo);

    TweenLite.to(showInfo, 0.5, {alpha: 1});

    //increase alpha with GreenSock

}

 

Produces this output:

 

ReferenceError: Error #1069: Property alpha not found on builtin.as$0.MethodClosure and there is no default value.
    at com.greensock.core::PropTween()
    at com.greensock::TweenLite/_initProps()
    at com.greensock::TweenLite/_init()
    at com.greensock::TweenLite/render()
    at com.greensock.core::SimpleTimeline/render()
    at com.greensock.core::Animation$/_updateRoot()

 

I've got the COM folder in with the .FLA as normal and I'm a bit stumped. Any help you could give me would be great.

 

Many thanks! :) 

 

Share this post


Link to post
Share on other sites

Hi and welcome to the GreenSock forums,

 

It appears the target of your tween is the showInfo() function. You need to use a Display Object. Maybe boxOver?

 

image.png

Share this post


Link to post
Share on other sites

Thanks Carl - can't believe I missed that!

 

Your help is much appreciated! :) 

Share this post


Link to post
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.