Jump to content

Recommended Posts

Posted

Olá pessoal,

Estou a fazer um slideshow, em que ja esta todo pronto excepto o botão de prev.

Botão Next--

on(release){
frame= frame+ "A";
BTPausa._visible=true
BTPlay._visible=false
play();

trace(frame);


if (frame=="frameAAAAAAA"){
	frame="frame"
	gotoAndPlay(frame);
	}
else{

	gotoAndPlay(frame);}
}

Botao Prev --

on(release){
var tamanhopalavra= frame.length;
var numletras = tamanhopalavra-1


BTPausa._visible=true
BTPlay._visible=false
play();

if (frame=="frame"){
	frame="frameAAAAAAA"
	gotoAndPlay(frame);
	}
else{
	gotoAndPlay(frame);}
}

A minha duvida é como no botão prev consigo ao calcular o tamanho actual da string e retirar um ( que e para ficar menos um A ) que é para ele reconhecer o rotulo anterior.

Por exemplo estou na : frameAAA

Que tem de Length 8

Quero retirar ao 8 1 ( esta parte ja esta feita )

Quero que fique a palavra como sento frameAA ( aqui é a minha duvida :s ) Penso ser possivel

Abraços 😁

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.