When you are using
siguiente_btn.onPress = function (){
if ( this.contador
this in this context is seguiente_btn and not your app
I think one solution could be to refer to siguiente_btn attaching from the
library, with something like
var contador: Number = 0 ;
var nextBtn = this.attachMovie( "myButtonLibrary", "siguiente_btn", level) ;
nextBtn.onRelease = function()
{
trace( contador++ ) ;
}
2006/6/7, Jorge Antonio Diaz Gutierrez <[EMAIL PROTECTED]>:
Hi everyone. I have a Problem with this code and I've been testing it
for hours. I don't know much about Flash Develop. It tells everything's
right, but Macromedia Flash Pro 8 traces it Undeffined. Could anyone
tell me wath's the problem.
Thanks
Private var contador:Number;
public function Control (){
contador=1;
siguiente_btn.onPress = function (){
if (this.contador<=this.cant)
{
trace("siguiente");
trace(this.contador);
//this.cont++;
}
}
atras_btn.onPress = function(){
if (this.contador!=1)
{
this.cargaImagen(this.contador);
this.cont--;
trace("atras")
}
}
}
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
João Carlos
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com