Añadir nuevo botón de menú flash xml

  • sagonus
  • Born
  • Born
  • No Avatar
  • Registrado: Oct 08, 2009
  • Mensajes: 1
  • Status: Offline

Nota Octubre 8th, 2009, 6:48 am

Hola a todos! Tengo una plantilla y quiero añadir un botón de menú que se encuentra dentro del flash y el texto cargado externamente a través de XML. En un instante, puse el control y copiar y pegar un nuevo botón, pero cuando aparece, repito que he copiado el texto del botón. Aquí está mi código XML
Im usando Flash CS4 y ActionScript 2.0 y Flash Player 10

Código: [ Select ]
<! - Menu ->
<section name="menu">

<link systemOrder="1"> [CDATA [
PORTFOLIO
]]></ link>

<link systemOrder="2"> [CDATA [
BIOGRAPHY
]]></ link>

<link systemOrder="3"> [CDATA [
SERVICES
]]></ link>

<link systemOrder="4"> [CDATA [
CONTACT
]]></ link>

<link systemOrder="5"> <! [CDATA [
THINGS
]]></ link>

</ section>
  1. <! - Menu ->
  2. <section name="menu">
  3. <link systemOrder="1"> [CDATA [
  4. PORTFOLIO
  5. ]]></ link>
  6. <link systemOrder="2"> [CDATA [
  7. BIOGRAPHY
  8. ]]></ link>
  9. <link systemOrder="3"> [CDATA [
  10. SERVICES
  11. ]]></ link>
  12. <link systemOrder="4"> [CDATA [
  13. CONTACT
  14. ]]></ link>
  15. <link systemOrder="5"> <! [CDATA [
  16. THINGS
  17. ]]></ link>
  18. </ section>


El botón de 5 debería decir "cosas" se repite una y mi "cartera" que es el botón que ha copiado. El código de AS de cada botón es el mismo en todos, sólo cambia el número de "num" para 1, 2, 3, 4 y añadir 5...

Código: [ Select ]
onClipEvent (load)
(
num = 1;
this.title1.gotoAndStop (num);
this.title2.gotoAndStop (num);
this.sq1.gotoAndStop (num);
this.sq2. gotoAndStop (num);
)
on (rollOver)
(
if (_root.link <= num)
(
this.gotoAndPlay ( "s1");
) / / End if
)
on (releaseOutside, rollOut)
(
if (_root.link <= num)
(
this.gotoAndPlay ( "s2");
) / / End if
)
on (release)
(
if (_root.link <= num _root.animation == 1)
(
_root.animation = 0;
_root.link_prev = _root.link;
_pare not [ "item" + _root.link]. gotoAndPlay ( "s2");
_root. link = num;
_root.pics_blur_alpha (0);
_root.play ();
) / / End if
)
  1. onClipEvent (load)
  2. (
  3. num = 1;
  4. this.title1.gotoAndStop (num);
  5. this.title2.gotoAndStop (num);
  6. this.sq1.gotoAndStop (num);
  7. this.sq2. gotoAndStop (num);
  8. )
  9. on (rollOver)
  10. (
  11. if (_root.link <= num)
  12. (
  13. this.gotoAndPlay ( "s1");
  14. ) / / End if
  15. )
  16. on (releaseOutside, rollOut)
  17. (
  18. if (_root.link <= num)
  19. (
  20. this.gotoAndPlay ( "s2");
  21. ) / / End if
  22. )
  23. on (release)
  24. (
  25. if (_root.link <= num _root.animation == 1)
  26. (
  27. _root.animation = 0;
  28. _root.link_prev = _root.link;
  29. _pare not [ "item" + _root.link]. gotoAndPlay ( "s2");
  30. _root. link = num;
  31. _root.pics_blur_alpha (0);
  32. _root.play ();
  33. ) / / End if
  34. )


¿Cuál es el problema?? :(
Moderator Remark: added code formating
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Octubre 8th, 2009, 6:48 am

  • IceCold
  • Guru
  • Guru
  • Avatar de Usuario
  • Registrado: Nov 05, 2004
  • Mensajes: 1254
  • Loc: Ro
  • Status: Offline

Nota Octubre 9th, 2009, 8:26 am

No sé exactamente cómo funciona la plantilla, pero si no genera los botones de forma dinámica, es decir, sólo un botón en la biblioteca que se reutiliza, a continuación, probablemente debería comprobar la instancia del botón de nueva creación.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”

Publicar Información

  • Total de mensajes en este tema: 2 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 62 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC