Animated the clipping mask but not the image


i'm in edge animate , i'm able move image mouse move, there way alter in .js effect image , not clipping mask.

 

thanks!

 

var stagewidth = $('#stage').width();

var stageheight = $('#stage').height();

 

 

// model

var modelminposx = -240;

var modelmaxposx = 0;

var modelminposy = 0;

var modelmaxposy = 00;

 

sym.onmousemove = function( pagex, pagey ){

 

  // move model (clipping mask)

  var modelrequestposx = sym.gettranslation(0, stagewidth, modelminposx, modelmaxposx, pagex);

  var modelrequestposy = sym.gettranslation(0, stageheight, modelminposy, modelmaxposy, pagey);

  sym.$("modelcopy").css({left:modelrequestposx, top:modelrequestposy});

  // move model

  var modelrequestposx = sym.gettranslation(0, stagewidth, modelminposx, modelmaxposx, pagex);

  var modelrequestposy = sym.gettranslation(0, stageheight, modelminposy, modelmaxposy, pagey);

  sym.$("model").css({left:modelrequestposx, top:modelrequestposy});

}

 

 

// utility function

/*

  @param

  * mininput minimum number of  input scale

  * maxinput maximum number of  input scale

  * minoutput minimum number of  output scale

  * maxoutput maximum number of  output scale

  * inputnumber number in input scale translated

*/

sym.gettranslation = function(mininput, maxinput, minoutput, maxoutput, inputnumber) {

  var translatedval = ((inputnumber - mininput) * (maxoutput -minoutput)/(maxinput - mininput) ) + minoutput;

  return translatedval;

}



More discussions in Edge Animate CC


adobe

Comments

Popular posts from this blog

Soustraire une selection

After Effects: could not find dvaeve_dialogs.txt

Illustrator cs6 "Invalid Serial Number"