Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    Menu in flash con js .....

    Links o esempi di come fare il menu di Tyson
    abbaio a parte

    tyson


    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  2. #2
    whisher, spam? :master:

    non c'è un carattere di JS e questa non è la sezione annunci siti in flash
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  3. #3
    whisher, spam?
    No, grazie

    Mi stavo solo chiedendo tra me e me
    come fare ad implementare il piccolo
    menu con l'img che segue il mouse
    e mi è scappato il post


    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  4. #4
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    mi era capitato orizzontale tempo fa ma non ricordo dove...
    al massimo va rifatto, niente di trascendentale

  5. #5
    Prima poor version ;(

    Codice PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    title>Untitled Document</title>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    style type="text/css">
    * {
        
    margin:0px;
        
    padding:0px
    }
    body 
        
    text-align:center
    }

    div#container {
        
    margin0px auto;
        
    width:700px;
        
    border1px solid #CCCCCC;
        
    text-align:left;
    }
    div#header { 
        
    height:80px;  
    }
    div#menu_flash{ 
        
    positionrelativetop:10px
    }
    div#menu_flash ul { 
        
    list-style-typenoneposition:absolute
        
    left:50pxtop:0px;
        
    right:0px;
    }
    div#menu_flash ul a,a:hover { 
        
    background-color:#FFFFCC;line-height:50px; 
        
    text-align:centerdisplay:block;    
        
    width:150px
    }
    img#fla { 
        
    border:0px solid #FFFFFF;
        
    position:absoluteleft:0pxtop:0px
    }
    </
    style>
    <
    script language="javascript" type="text/javascript">
    function 
    addEvent(elmevTypefnuseCapture){
        if (
    elm.addEventListener){
                
    elm.addEventListener(evTypefnuseCapture);
                return 
    true;
        } else if (
    elm.attachEvent) {
            var 
    elm.attachEvent('on' evTypefn);
            return 
    r;
        } else {
            
    elm['on' evType] = fn;
        }
    };
    function $(){
        var 
    elements = new Array();
        for (var 
    0;i<arguments.length;i++){
            var 
    element arguments[i];
            if (
    typeof element == 'string'){
              
    element document.getElementById(element);
            }
            if (
    arguments.length == 1){
              return 
    element;
            }
            
    elements.push(element);
          }
        return 
    elements;
    };
    function 
    getMousePosition(e) {
        if(
    typeof e == 'undefined') {var window.event};
        
    this.ye.clientY;
        
    this.xe.clientX;
    }
    function 
    doMenu(e){
    var 
    topSpace90;
    var 
    contact50/2;
    var 
    start0;
    var 
    end250;//n tag*height-height
    var mousePosition= new getMousePosition(e);
    var 
    img= $('fla');
    var 
    placeparseInt(mousePosition.y)-topSpace-contact;
    if(
    place start){
        
    place=start;
    }
    if(
    place end){
        
    place=end;
    }
    img.style.topplace+'px';
    }
    function 
    init(){
        var 
    img= $('fla');
        var 
    ulList= $('menu_flash').getElementsByTagName('ul')[0];
        var 
    aTagsulList.getElementsByTagName('a');
        for(var 
    i=0;i<aTags.length;i++){
            
    addEvent(aTags[i],'mouseover',doMenu,false);
        }
    }
    addEvent(window,'load',init,false);
    </script>

    </head>

    <body>
    <div id="container">
    <div id="header"><h1>Test</h1></div>
        <div id="menu_flash">
            [img]fla.gif[/img]
            <ul>
                [*][url="#"]Uno[/url]
                [*][url="#"]Due[/url]
                [*][url="#"]Tre[/url]
                [*][url="#"]Quattro[/url]
                [*][url="#"]Cinque[/url]
                [*][url="#"]Sei[/url]
            [/list]
        </div>
    </div>
    </body>
    </html> 
    Suggerimenti per migliorare il tutto



    Immagini allegate Immagini allegate
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  6. #6
    Uhm con mousemove
    nettamente meglio
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  7. #7
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    non mi baserei sulla posizione del puntatore perche' fornisce dati sempre diversi
    il piu' delle volte ai margini della voce di menu'

    sommerei offsetTop risalendo l' offsetParent fino al contenitore (per intenderci) per determinare il top a cui posizionare/muovere l' immagine

  8. #8
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    Originariamente inviato da whisher
    Uhm con mousemove
    nettamente meglio
    a questo mi riferivo con il mio messaggio precedente,
    e' un po' rigido prendere il punto solo una volta al mouseover

  9. #9
    Eh si grazie del suggerimento
    dato che ci sono versione corretta di
    Codice PHP:
    function getMousePosition(e) {
        if(
    typeof e == 'undefined') { window.event};
        
    this.ye.clientY;
        
    this.xe.clientX;

    con var nascondevo il parametro e.

    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.