Comunidad de diseño web y desarrollo en internet online

como puedo pasar este codigo a flash 8....

Citar            
MensajeEscrito el 23 Abr 2007 02:32 pm
Hola, me gustaria porder incorporar a una web el efecto de las letras voladoras de http://www.levitated.net/ pero solo me deja con flash player version 6.0 ¿como puedo adaptarlo para flash player 8.0?

Gracias.


/////// os dejo el codigo.

////// en el primer fotograma esta esto:

// register root as environment
Object.environment = this;

// create camera object
this.cam = {x:0, y:0, z:-500, dx:0, dy:0, dz:500};

// set environmental constants
this.fl = 1000;

// create 'space' to which all words will be attached
this.createEmptyMovieClip("space",1);
// center 'space' on the stage
space._x=300;
space._y=169;

// a string of words related to the wind
this.somewords = "wind breeze storm stormy tornado text space three dimensional infinite recursive instance object distort environmental atmospheric blow gush whoosh thrash whirl push roar rush caress flow swoop";
// convert the string of words into an array of words
this.wordList = new Array();
this.wordList = this.somewords.split(" ");

// create one instance for each word in the list
for (n=0;n<this.wordList.length;n++) {
// pick a word from the list
var word = Object.environment.wordList[n];
var x = random(600)-300;
var y = random(337)-169;
var z = random(Object.environment.fl*2)-Object.environment.fl;

// create an instance of the SpaceWord object
nombre = "word"+String(depth++);
initialization = {txtword: word, x: x, y: y, z: z};
space.attachMovie("spaceWord", nombre, depth, initialization);
}

this.onEnterFrame = function() {
this.cam.dz+=.8;
// move the camera to its destination
this.cam.x+=(this.cam.dx-this.cam.x)/10;
this.cam.y+=(this.cam.dy-this.cam.y)/10;
this.cam.z+=(this.cam.dz-this.cam.z)/30;
}

stop();




////// en el clip spaceworld esta esto:


#initclip
// constructor
function SpaceWord() {
// set up button functionality
this.btnSquare.onPress = function() {
// push the camera towards the word by setting destination just a bit in front
Object.environment.cam.dx = this._parent.x;
Object.environment.cam.dy = this._parent.y;
Object.environment.cam.dz = this._parent.z+Object.environment.fl*.9;
// disable and hide button
this.enabled = false;
this._visible = false;
};
// set continual function to render word
this.onEnterFrame = this.render;
}
// allow SpaceWord to inherit MovieClip properties
SpaceWord.prototype = new MovieClip();
// instance methods
SpaceWord.prototype.render = function() {
var zActual = Object.environment.fl+this.z-Object.environment.cam.z;
// has the object moved behind the camera?
if (zActual>0) {
// object is still visible
// calculate scale
var scale = Object.environment.fl/zActual;
// set position using camera as an offset
this._x = (this.x-Object.environment.cam.x)*scale;
this._y = (this.y-Object.environment.cam.y)*scale;
// set size
this._xscale = scale*100;
this._yscale = scale*100;
// set fog
this._alpha = 100 - 99 * zActual/Object.environment.fl*.5;
} else {
// object has moved behind camera
// reposition further down the line
this.z += Object.environment.fl*2;

// enable button
this.btnSquare.enabled = true;
this.btnSquare._visible = true;
}
};
SpaceWord.prototype.setWord = function(s) {
this.txtWord = s;
};
SpaceWord.prototype.setPosition = function(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
};
// Connect the class with the linkage ID for this movie clip
Object.registerClass("spaceWord", SpaceWord);
#endinitclip

Por jbrisa

1 de clabLevel



 

safari
Citar            
MensajeEscrito el 15 Jun 2007 04:14 pm
Hola tambien estoy viendo la posibilidad de editar este efecto, pero lo unico que puedo hacer, es editar la palabra, quisiera poder hacerlas automaticas, que vuelen al centro pero sin hacerles clic, y tambien cambiarles de color. Si tienes algun dato, avisame.

Por christianolaya

3 de clabLevel



 

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.