http://www.ttfxmedia.com/beneito/
A ver, no es flash, no tiene enlace a un javascript, el gif es estatico, ¿como mueven las imagenes y el texto?
| ||||
¿Como consigue esta pagina ese movimiento? http://www.ttfxmedia.com/beneito/ A ver, no es flash, no tiene enlace a un javascript, el gif es estatico, ¿como mueven las imagenes y el texto? |
| ||||
Viendo el código fuente, es lo que puedo aportarte:
Código:
Slaouds, <script language="JavaScript"> <!-- function MM_timelinePlay(tmLnName, myID) { var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false; if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time tmLn = document.MM_Time[tmLnName]; if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID if (myID == tmLn.ID) { //if Im newest setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay); fNew = ++tmLn.curFrame; for (i=0; i<tmLn.length; i++) { sprite = tmLn[i]; if (sprite.charAt(0) == 's') { if (sprite.obj) { numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0]; if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range keyFrm=1; for (j=0; j<sprite.values.length; j++) { props = sprite.values[j]; if (numKeyFr != props.length) { if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr]; else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr]; } else { while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++; if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) { if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1]; else sprite.obj[props.prop2][props.prop] = props[keyFrm-1]; } } } } } } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value); if (fNew > tmLn.lastFrame) tmLn.ID = 0; } } } function MM_initTimelines() { //------ document.MM_Time = new Array(1); document.MM_Time[0] = new Array(4); document.MM_Time["Timeline1"] = document.MM_Time[0]; document.MM_Time[0].MM_Name = "Timeline1"; document.MM_Time[0].fps = 25; //------ document.MM_Time[0][0] = new String("sprite"); document.MM_Time[0][0].slot = 1; document.MM_Time[0][0].obj = document.all ? document.all["Layer5"] : null; document.MM_Time[0][0].keyFrames = new Array(1, 15); document.MM_Time[0][0].values = new Array(2); document.MM_Time[0][0].values[0] = new Array(-129,-116,-104,-91,-78,-65,-53,-40,-27,-15,-2,11,24,36,49); document.MM_Time[0][0].values[0].prop = "left"; document.MM_Time[0][0].values[1] = new Array(14,14,14,14,14,14,14,14,14,14,14,14,14,14,14); document.MM_Time[0][0].values[1].prop = "top"; document.MM_Time[0][0].values[0].prop2 = "style"; document.MM_Time[0][0].values[1].prop2 = "style"; //------ document.MM_Time[0][1] = new String("sprite"); document.MM_Time[0][1].slot = 2; document.MM_Time[0][1].obj = document.all ? document.all["Layer1"] : null; document.MM_Time[0][1].keyFrames = new Array(15, 45); document.MM_Time[0][1].values = new Array(2); document.MM_Time[0][1].values[0] = new Array(16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16); document.MM_Time[0][1].values[0].prop = "left"; document.MM_Time[0][1].values[1] = new Array(-68,-57,-46,-34,-23,-12,-1,11,22,33,44,56,67,78,89,101,112,123,134,145,157,168,179,190,202,213,224,235,247,258,269); document.MM_Time[0][1].values[1].prop = "top"; document.MM_Time[0][1].values[0].prop2 = "style"; document.MM_Time[0][1].values[1].prop2 = "style"; //------ document.MM_Time[0][2] = new String("sprite"); document.MM_Time[0][2].slot = 1; document.MM_Time[0][2].obj = document.all ? document.all["Layer4"] : null; document.MM_Time[0][2].keyFrames = new Array(45, 59); document.MM_Time[0][2].values = new Array(2); document.MM_Time[0][2].values[0] = new Array(235,235,235,235,235,235,235,235,235,235,235,235,235,235,235); document.MM_Time[0][2].values[0].prop = "left"; document.MM_Time[0][2].values[1] = new Array(-75,-63,-51,-39,-26,-14,-2,10,22,34,46,59,71,83,95); document.MM_Time[0][2].values[1].prop = "top"; document.MM_Time[0][2].values[0].prop2 = "style"; document.MM_Time[0][2].values[1].prop2 = "style"; //------ document.MM_Time[0][3] = new String("sprite"); document.MM_Time[0][3].slot = 2; document.MM_Time[0][3].obj = document.all ? document.all["Layer3"] : null; document.MM_Time[0][3].keyFrames = new Array(59, 73); document.MM_Time[0][3].values = new Array(2); document.MM_Time[0][3].values[0] = new Array(235,235,235,235,235,235,235,235,235,235,235,235,235,235,235); document.MM_Time[0][3].values[0].prop = "left"; document.MM_Time[0][3].values[1] = new Array(-13,-9,-6,-2,2,6,9,13,17,20,24,28,32,35,39); document.MM_Time[0][3].values[1].prop = "top"; document.MM_Time[0][3].values[0].prop2 = "style"; document.MM_Time[0][3].values[1].prop2 = "style"; //------ document.MM_Time[0][4] = new String("sprite"); document.MM_Time[0][4].slot = 1; document.MM_Time[0][4].obj = document.all ? document.all["Layer2"] : null; document.MM_Time[0][4].keyFrames = new Array(73, 87); document.MM_Time[0][4].values = new Array(2); document.MM_Time[0][4].values[0] = new Array(205,205,205,205,205,205,205,205,205,205,205,205,205,205,205); document.MM_Time[0][4].values[0].prop = "left"; document.MM_Time[0][4].values[1] = new Array(-14,-12,-9,-7,-4,-2,1,3,5,8,10,13,15,18,20); document.MM_Time[0][4].values[1].prop = "top"; document.MM_Time[0][4].values[0].prop2 = "style"; document.MM_Time[0][4].values[1].prop2 = "style"; //------ document.MM_Time[0].lastFrame = 87; for (i=0; i<document.MM_Time.length; i++) { document.MM_Time[i].ID = null; document.MM_Time[i].curFrame = 0; document.MM_Time[i].delay = 1000/document.MM_Time[i].fps; } } //--> </script> |