h=Received:Message-ID:From:To:References:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE;
b=5i/Kb+8/GNG4yX0eEvvThbXihIJNAIy6I+UNXvMF+jqCBm4t9ohhJOcfYBz7dqZRH8V46OORRzh8nU0vQ9oeZrq23/wnD/pE8rJcCBgexsbRkLxp7NP4BTNTwlp0PhMgMQa3ROpRiddGsKCC9I14SmXPV/h/MwCuZW0WSaFD8dY= ; Received: from unknown (HELO ivan) ([EMAIL PROTECTED] with login) by smtp018.mail.yahoo.com with SMTP; 27 Oct 2005 11:56:20 -0000 Message-ID: <[EMAIL PROTECTED]> From: "Ivan" <[EMAIL PROTECTED]> To: <asnativos@5dms.com> References: <[EMAIL PROTECTED]> Subject: Re: [ASNativos] Problemas con Set Interval dentro de un enterFrame Date: Thu, 27 Oct 2005 13:56:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-BeenThere: asnativos@5dms.com X-Mailman-Version: 2.1b2 Precedence: bulk Reply-To: asnativos@5dms.com List-Id: Lista dedicada a Actionscript <5dms.com.asnativos.5dms.com> List-Post: <mailto:asnativos@5dms.com> List-Subscribe: <http://list.5dms.com/mailman/listinfo/5dms.com.asnativos>, <mailto:[EMAIL PROTECTED]> List-Unsubscribe: <http://list.5dms.com/mailman/listinfo/5dms.com.asnativos>, <mailto:[EMAIL PROTECTED]> List-Archive: <http://list.5dms.com/mailman/private/5dms.com.asnativos> List-Help: <mailto:[EMAIL PROTECTED]> Sender: [EMAIL PROTECTED] Errors-To: [EMAIL PROTECTED] Hola Jose efectivamente el new te sobra, pero ese no es el problema, sino que tienes cuatro intervalos (uno por cada pasada), luego llamante va tomando valores de 1,2,3,4 pero luego cuando llega a 4, solo borras el 4, pero quedan abiertos el 1,2,3 Lo he probado, y si pones clearInterval(1); clearInterval(2); clearInterval(3); clearInterval(4); funciona perfectamente. Obviamente, pon un bucle, o guarda en una matriz los valores de llamante :-) Suerte. ----- Original Message ----- From: "Jose Moriano" <[EMAIL PROTECTED]> To: <asnativos@5dms.com> Sent: Friday, October 28, 2005 10:30 AM Subject: [ASNativos] Problemas con Set Interval dentro de un enterFrame > Hola lista: > > He creado una funcion que me sirve para hacer llamadas a otras funciones: > var prof:Number=0; > function cuenta(funcion:Function, veces:Number, milisegundos:Number):Void > { > _root.createEmptyMovieClip("contante", prof++); > _root.contante.veces = veces; > _root.contante.funcion = funcion; > _root.contante.milisegundos = milisegundos; > _root.contante.onEnterFrame = function() { > trace(veces); > if (veces != 0) { > llamante = new setInterval(funcion, milisegundos); > veces -= 1; > } else { > _root.contante.onEnterFrame = null; > clearInterval(llamante); > trace("he muerto"); > } > }; > } > //ejemplo de una funcion a la que llamariamos > function quitaTod() { > trace("hola mundo"); > } > > > ////uso funcion a la que hay que llamar, numero de veces que hay que > llamarla, milisegundos hasta ejecutarla > cuenta(quitaTod, 4, 500); > > El trace me pinta efectivamente el numero de llamadas y el EnterFrame se > muere pero el Interval se queda abierto. > He hecho algunas variaciones generando un SetInterval con un nombre > distinto cada vez pero tampoco funciona > ¿alguna idea?¿está el EnterFrame trabajando demasiado deprisa?¿tengo > varios SetIntervals? > > > Un saludo. > > Jose Moriano. > http://www.josemoriano.com > http://www.usarytirar.org > > ---------------------------------- > Lista ASNativos:asnativos@5dms.com > http://www.5dms.com/listas > ---------------------------------- ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es ---------------------------------- Lista ASNativos:asnativos@5dms.com http://www.5dms.com/listas ----------------------------------