Convertion Actionscript 5

aghora Messages postés 14 Date d'inscription lundi 17 février 2003 Statut Membre Dernière intervention 20 novembre 2005 - 20 nov. 2005 à 12:50
aghora Messages postés 14 Date d'inscription lundi 17 février 2003 Statut Membre Dernière intervention 20 novembre 2005 - 20 nov. 2005 à 14:53
Bonjour à tous :

Voila mon petit souci ;

JE dois réutiliser ce code pour FLash 5 :
Bien sur la syntaxe etant differente j'ai droit à ce gentil message à la sortie :

"**Erreur** Symbole pool, calque Layer 1, image = 1 :Ligne 1 : Vous devez exporter l'animation au format Flash 6 pour utiliser cette action.
#initclip"

#initclip
// build the node object
function poolclass() {
// container to hold all attached objects
// this.nodeList = new Array();
// this.onMouseDown = this.createRandomNode;
this.stick = {x:300, y:169};
this.onEnterFrame = this.dragStick;
}
poolclass.prototype = new MovieClip();
poolclass.prototype.dragstick = function() {
if (this.stick.x<0) {
this.stick.vx += 4*Math.random();
} else if (this.stick.x>600) {
this.stick.vx -= 4*Math.random();
} else {
this.stick.vx += (Math.random()-Math.random())*4;
}
if (this.stick.y<0) {
this.stick.vy += 4*Math.random();
} else if (this.stick.y>337) {
this.stick.vy -= 4*Math.random();
} else {
this.stick.vy += (Math.random()-Math.random())*4;
}
this.stick.x += this.stick.vx;
this.stick.y += this.stick.vy;
this.stick.vx *= .8;
this.stick.vy *= .8;
this.createnode(random(600), random(337), this.stick.x, this.stick.y, 7+random(13));
};
poolclass.prototype.createrandomnode = function() {
var x = random(600);
var y = random(337);
var dx = this._xmouse;
var dy = this._ymouse;
var ds = 10+random(20);
// make the node
this.createNode(x, y, dx, dy, ds);
};
poolclass.prototype.createnode = function(x, y, dx, dy, ds) {
var nombre = "nd"+String(this.depth++);
var neo = this.attachMovie("node", nombre, this.depth);
neo._x = x;
neo._y = y;
neo.dx = dx;
neo.dy = dy;
neo.body._xscale = ds;
neo.body._yscale = ds;
// add object to list
// this.nodeList.push(neo);
};
Object.registerClass("pool", poolclass);
#endinitclip


Quelqu'un peut il me dire quelle est la bone syntaxe à utiliser ??

2 réponses

SuperDevy Messages postés 842 Date d'inscription dimanche 24 novembre 2002 Statut Membre Dernière intervention 2 juillet 2007
20 nov. 2005 à 14:49
Pourquoi compiler pour flash 5 ? On en est à Flash 8 maintenant est FlashPlayer 7 est disponible sur 92% des ordinateurs !

SuperDevy, c la !
0
aghora Messages postés 14 Date d'inscription lundi 17 février 2003 Statut Membre Dernière intervention 20 novembre 2005
20 nov. 2005 à 14:53
SuperDevy,

Je suis bien d'accord avec toi. C'est destiné a tourner en reseau local administré par un *@!! de responsable informatique. Pas de version supérieur à 5 installée.

La vie est dure..
0
Rejoignez-nous