Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 26-07-2004, 11:23   #1 (permalink)
Neuer User
 
Registriert seit: Jul 2002
Ort: MUC
Beiträge: 96
AS-NAVI--->code->ergänzen...bitte

Hallo Flasher!

kann mir bitte jemand dieses Script ergänzen..

monmenu = new Array("1", "2", "3", "5");
//
var speed = 50;
//
fondmenu = 0xFFFFFF;
//
couleurtypo = 0x000000;
//
fondmenuroll = 0xCED0FF;
//
var finalSpeed = String(speed/100);
positionmenu = 100;
//
taillepolice = 12;
//
xtext = 200;
//
ytext = 16;
//
espacement = 16;
//
nbrerub = (monmenu.length);
monformat = new TextFormat();
with (monformat) {
font = "standard 07_53";
color = couleurtypo;
size = 8;
align = "center";
// blockIndent = 10;
}
// ************************************************** *********************************
//
// ************************************************** *********************************
_root.createEmptyMovieClip("menuconteneur", 0);
for (i=0; i<nbrerub; i++) {
// /////////////////
//
// /////////////////
var c = _root.menuconteneur.createEmptyMovieClip("Clip"+i, i);
c._x = 0;
// 130+73*i;
c._y = 16*i;
c.createTextField("theme", 1, 0, 0, xtext, ytext);
// ////////////////////////////////
//
// ////////////////////////////////
c.onRollOver = function() {
this.theme.backgroundColor = fondmenuroll;
};
// //////////////////////////////////////////
//
// //////////////////////////////////////////
c.onRollOut = function() {
this.theme.backgroundColor = fondmenu;
};
with (_root.c) {
theme.background = true;
theme.backgroundColor = fondmenu;
theme.border = true;
theme.selectable = false;
theme.setTextFormat(monformat);
}
}
_root.createEmptyMovieClip("menu", 1);
_root.menu.createTextField("menutxt", 1, 0, 0, xtext, ytext), _root.menu.menutxt.text="MENU";
with (_root.menu.menutxt) {
background = true;
backgroundColor = fondmenu;
border = true;
selectable = false;
setTextFormat(monformat);
}
//
_root.menu.onEnterFrame = function() {
if (_root.menuconteneur._x == -250) {
this.suivre(_xmouse, _ymouse);
}
};
_root.menu.onRelease = function() {
if (_root.menuconteneur._x == _root.menu._x) {
_root.menuconteneur._x = -250;
} else {
_root.menuconteneur._y = _root.menu._y+espacement;
_root.menuconteneur._x = _root.menu._x;
}
};
.............hier fehlen die links für die einzelnen dynamisch erzeugten buttons...

Dieses Script ist von flashkit.com, ich versuche krampfhaft AS zu erlernen, leider bisher nur mit kleinen Fortschritten...

.............kann mir bitte jemand dieses script ergänzen...DANKE!



//
// _root.c.theme.setTextFormat(monformat);
with (_root.menuconteneur) {
CLIP0.theme.text = monmenu[0];
Clip0.theme.setTextFormat(monformat);
CLIP1.theme.text = monmenu[1];
Clip1.theme.setTextFormat(monformat);
CLIP2.theme.text = monmenu[2];
Clip2.theme.setTextFormat(monformat);
CLIP3.theme.text = monmenu[3];
Clip3.theme.setTextFormat(monformat);
CLIP4.theme.text = monmenu[4];
Clip4.theme.setTextFormat(monformat);
CLIP5.theme.text = monmenu[5];
Clip5.theme.setTextFormat(monformat);
CLIP6.theme.text = monmenu[6];
Clip6.theme.setTextFormat(monformat);
CLIP7.theme.text = monmenu[7];
Clip7.theme.setTextFormat(monformat);
CLIP8.theme.text = monmenu[8];
Clip8.theme.setTextFormat(monformat);
CLIP9.theme.text = monmenu[9];
Clip9.theme.setTextFormat(monformat);
CLIP10.theme.text = monmenu[10];
Clip10.theme.setTextFormat(monformat);
}
CLIP0.onRollOver = function() {
CLIP0.theme.backgroundColor = fondmenuroll;
};
_root.menuconteneur._x = -250;
_root.menu._x = positionmenu;
__________________
__________________
Flash, Flash Builder, Flash Lite, Flash AIR ;)
OMOMO ist offline   Mit Zitat antworten
Alt 26-07-2004, 11:38   #2 (permalink)
_Thomas_
Gast
 
Beiträge: n/a
hi

ich hab dir mal eine onRelease-zuweisung für jeden button mit in die schleife geschrieben.

ActionScript:
  1. monmenu = new Array("1", "2", "3", "5");
  2. //
  3. var speed = 50;
  4. //
  5. fondmenu = 0xFFFFFF;
  6. //
  7. couleurtypo = 0x000000;
  8. //
  9. fondmenuroll = 0xCED0FF;
  10. //
  11. var finalSpeed = String(speed/100);
  12. positionmenu = 100;
  13. //
  14. taillepolice = 12;
  15. //
  16. xtext = 200;
  17. //
  18. ytext = 16;
  19. //
  20. espacement = 16;
  21. //
  22. nbrerub = (monmenu.length);
  23. monformat = new TextFormat();
  24. with (monformat) {
  25.     font = "standard 07_53";
  26.     color = couleurtypo;
  27.     size = 8;
  28.     align = "center";
  29.     // blockIndent = 10;
  30. }
  31. // ************************************************** *********************************
  32. //
  33. // ************************************************** *********************************
  34. _root.createEmptyMovieClip("menuconteneur", 0);
  35. for (i=0; i<nbrerub; i++) {
  36.     // /////////////////
  37.     //
  38.     // /////////////////
  39.     var c = _root.menuconteneur.createEmptyMovieClip("Clip"+i, i);
  40.     c._x = 0;
  41.     // 130+73*i;
  42.     c._y = 16*i;
  43.     c.createTextField("theme", 1, 0, 0, xtext, ytext);
  44.     // ////////////////////////////////
  45.     //
  46.     // ////////////////////////////////
  47.     c.onRollOver = function() {
  48.         this.theme.backgroundColor = fondmenuroll;
  49.     };
  50.     // //////////////////////////////////////////
  51.     //
  52.     // //////////////////////////////////////////
  53.     c.onRollOut = function() {
  54.         this.theme.backgroundColor = fondmenu;
  55.     };
  56.     // //////////////////////////////////////////
  57.     //  !!! H I E R !!!
  58.     // //////////////////////////////////////////
  59.     c.onRelease = function() {
  60.         trace("clip-instanzname: "+this._name);
  61.         trace("beschriftung: "+this.theme.text);
  62.     };
  63.     with (_root.c) {
  64.         theme.background = true;
  65.         theme.backgroundColor = fondmenu;
  66.         theme.border = true;
  67.         theme.selectable = false;
  68.         theme.setTextFormat(monformat);
  69.     }
  70. }
  71. _root.createEmptyMovieClip("menu", 1);
  72. _root.menu.createTextField("menutxt", 1, 0, 0, xtext, ytext), _root.menu.menutxt.text="MENU";
  73. with (_root.menu.menutxt) {
  74.     background = true;
  75.     backgroundColor = fondmenu;
  76.     border = true;
  77.     selectable = false;
  78.     setTextFormat(monformat);
  79. }
  80. //
  81. _root.menu.onEnterFrame = function() {
  82.     if (_root.menuconteneur._x == -250) {
  83.         this.suivre(_xmouse, _ymouse);
  84.     }
  85. };
  86. _root.menu.onRelease = function() {
  87.     if (_root.menuconteneur._x == _root.menu._x) {
  88.         _root.menuconteneur._x = -250;
  89.     } else {
  90.         _root.menuconteneur._y = _root.menu._y+espacement;
  91.         _root.menuconteneur._x = _root.menu._x;
  92.     }
  93. };
  94. //
  95. // _root.c.theme.setTextFormat(monformat);
  96. with (_root.menuconteneur) {
  97.     CLIP0.theme.text = monmenu[0];
  98.     Clip0.theme.setTextFormat(monformat);
  99.     CLIP1.theme.text = monmenu[1];
  100.     Clip1.theme.setTextFormat(monformat);
  101.     CLIP2.theme.text = monmenu[2];
  102.     Clip2.theme.setTextFormat(monformat);
  103.     CLIP3.theme.text = monmenu[3];
  104.     Clip3.theme.setTextFormat(monformat);
  105.     CLIP4.theme.text = monmenu[4];
  106.     Clip4.theme.setTextFormat(monformat);
  107.     CLIP5.theme.text = monmenu[5];
  108.     Clip5.theme.setTextFormat(monformat);
  109.     CLIP6.theme.text = monmenu[6];
  110.     Clip6.theme.setTextFormat(monformat);
  111.     CLIP7.theme.text = monmenu[7];
  112.     Clip7.theme.setTextFormat(monformat);
  113.     CLIP8.theme.text = monmenu[8];
  114.     Clip8.theme.setTextFormat(monformat);
  115.     CLIP9.theme.text = monmenu[9];
  116.     Clip9.theme.setTextFormat(monformat);
  117.     CLIP10.theme.text = monmenu[10];
  118.     Clip10.theme.setTextFormat(monformat);
  119. }
  120. CLIP0.onRollOver = function() {
  121.     CLIP0.theme.backgroundColor = fondmenuroll;
  122. };
  123. _root.menuconteneur._x = -250;
  124. _root.menu._x = positionmenu;

gruß,
Tante Amanda
  Mit Zitat antworten
Alt 26-07-2004, 12:24   #3 (permalink)
Neuer User
 
Registriert seit: Jul 2002
Ort: MUC
Beiträge: 96
Super!

DANKESCHÖN!

Funktioniert solide!
__________________
Flash, Flash Builder, Flash Lite, Flash AIR ;)
OMOMO ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 01:22 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele