Difference between pages "Load Image By Hover and Resize with Click" and "MEL TEST1"

From scripting
(Difference between pages)
Jump to: navigation, search
(Created page with " on (rollOver) { $DisplayStr = "Captions Here."; $LinkStr = "IMAGES/31_ImageName.jpg"; var HOD = createTextField("mytext", 9,(this._xmouse + 8),(this._ymouse - 3),250,200...")
 
(Created page with "{{:Category:In-House MEL}} {{:Category:MEL}}")
 
Line 1: Line 1:
on (rollOver) {
+
{{:Category:In-House MEL}}
$DisplayStr = "Captions Here.";
 
$LinkStr = "IMAGES/31_ImageName.jpg";
 
 
var HOD = createTextField("mytext", 9,(this._xmouse + 8),(this._ymouse - 3),250,200);
 
mytext.multiline = false;
 
mytext.wordWrap = false;
 
mytext.border = true;
 
myformat = new TextFormat();
 
myformat.color = 0xffffff;
 
myformat.font = "Verdana";
 
myformat.size = 9;
 
myformat.bold = false;
 
myformat.bullet = false;
 
mytext.text = $DisplayStr ;
 
mytext.setTextFormat(myformat);
 
 
var myImageHolder = createEmptyMovieClip("myImageHolder", 5);
 
myImageHolder.loadMovie($LinkStr);
 
myImageHolder._x = this._xmouse + 8; 
 
myImageHolder._y = this._ymouse + 8;
 
 
}
 
 
on (press) {
 
$XDIM = myImageHolder._width ;
 
$YDIM = myImageHolder._height ;
 
$FinalY = 240//( $FinalX / $XDIM ) * $YDIM ;
 
$FinalX = ( $FinalY / $YDIM ) * $XDIM;
 
$FPerc = Math.round(100 * ($FinalY / $YDIM));
 
myImageHolder._xscale = $FPerc;
 
myImageHolder._yscale = $FPerc ;
 
 
mytext._width = $FinalX;
 
mytext._height = $FinalY;
 
}
 
on (rollOut) {
 
removeMovieClip(myImageHolder);
 
removeMovieClip(mytext);
 
}
 
  
 
+
{{:Category:MEL}}
[[Category:ActionScript]]
 

Latest revision as of 07:19, 22 April 2017

Category:In-House MEL

Maya MEL Scripting Library
Open Sorcerers: Nick Pisca 0001d, Kokkugia, ResearchNodes, GSAPP, ProxyArch, nullthing, ctrl-i
Book: YSYT - Maya MEL Basics for Designers.


In-House 0001d MEL Scripts and Procedures





















Keywords: Maya, MEL, Functions, Procedures, Scripts, proc, melscript