Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

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.*;


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


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?



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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.