לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה ‎print ‎"Hello World!"; if‎ ‎not rules.‎know ‎then rules.‎read(); חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > תכנות ובניית אתרים
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
תגובה
 
כלי אשכול חפש באשכול זה



  #1  
ישן 16-12-2005, 18:07
  o©p o©p אינו מחובר  
 
חבר מתאריך: 01.11.04
הודעות: 84
עזרה איך אני יכול לבטל את הקוד שבהודעה?

יש לי מהאתר kirupa את הקוד הבא שמטרתו ליצור תפריט ש"שואב" מידע מ-xml:
קוד:
GenerateMenu = function(container, name, x, y, depth, node_xml) { // variable declarations var curr_node; var curr_item; var curr_menu = container.createEmptyMovieClip(name, depth); // for all items or XML nodes (items and menus) // within this node_xml passed for this menu for (var i=0; i<node_xml.childNodes.length; i++) { // movieclip for each menu item curr_item = curr_menu.attachMovie("menuitem","item"+i+"_mc", i); curr_item._x = x; curr_item._y = y + i*curr_item._height; curr_item.trackAsMenu = true; // item properties assigned from XML curr_node = node_xml.childNodes[i]; curr_item.action = curr_node.attributes.action; curr_item.variables = curr_node.attributes.variables; curr_item.name.text = curr_node.attributes.name; // item submenu behavior for rollover event if (node_xml.childNodes[i].nodeName == "menu"){ // open a submenu curr_item.node_xml = curr_node; curr_item.onRollOver = curr_item.onDragOver = function(){ var x = this._x + this._width - 5; var y = this._y + 5; GenerateMenu(curr_menu, "submenu_mc", x, y, 1000, this.node_xml); // show a hover color var col = new Color(this.background); col.setRGB(0xf4faff); }; }else{ // nodeName == "item" curr_item.arrow._visible = false; // close existing submenu curr_item.onRollOver = curr_item.onDragOver = function(){ curr_menu.submenu_mc.removeMovieClip(); // show a hover color var col = new Color(this.background); col.setRGB(0xf4faff); }; } curr_item.onRollOut = curr_item.onDragOut = function(){ // restore color var col = new Color(this.background); col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,b b:0}); }; // any item, menu opening or not can have actions curr_item.onRelease = function(){ Actions[this.action](this.variables); CloseSubmenus(); }; } // end for loop }; // create the main menu, this will be constantly visible CreateMainMenu = function(x, y, depth, menu_xml){ // generate a menu list GenerateMenu(this, "mainmenu_mc", x, y, depth, menu_xml.firstChild); // close only submenus if visible durring a mouseup // this main menu (mainmenu_mc) will remain mainmenu_mc.onMouseUp = function(){ if (mainmenu_mc.submenu_mc && !mainmenu_mc.hitTest(_root._xmouse, _root._ymouse, true)){ CloseSubmenus(); } }; }; // closes all submenus by removing the submenu_mc // in the main menu (if it exists) CloseSubmenus = function(){ mainmenu_mc.submenu_mc.removeMovieClip(); }; // This actions object handles methods for actions // defined by the XML called when a menu item is pressed Actions = Object(); Actions.gotoURL = function(urlVar){ getURL(urlVar, "_blank"); }; Actions.message = function(msg){ message_txt.text = msg; }; Actions.message = function(usr){ usr.text = name; }; Actions.newMenu = function(menuxml){ menu_xml.load(menuxml); }; // load XML, when done, run CreateMainMenu to interpret it menu_xml = new XML(); menu_xml.ignoreWhite = true; menu_xml.onLoad = function(ok){ // create main menu after successful loading of XML if (ok){ CreateMainMenu(10, 10, 0, this); message_txt.text = "Welcome! Use your mouse pointer to choose a replay."; }else{ message_txt.text = "error: XML not successfully loaded"; } }; menu_xml.load("XML/file.xml");


אני משתמש במעבר בין פריימים וכשאני עובד לפריים אחר, מאחר שהרצתי את הקוד הוא ממשיך להופיע. איך אני גורם לו להתבטל?
תגובה ללא ציטוט תגובה עם ציטוט חזרה לפורום
תגובה

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 11:59

הדף נוצר ב 0.04 שניות עם 12 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2025 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר