Visualizzazione dei risultati da 1 a 6 su 6

Discussione: java e flash

  1. #1

    java e flash

    Ciao a tutti io ho questo script che produrrebbe un'immagine linkabile che gira per tutto lo schermo... e fino a qui tutto ok funziona tutto perfettamente.. il mio problema nasce nelle pagine dove ho presente delle parti fatte in flash, l'immagine che gira mi finisce dietro il flash e quindi non la vedo... perchè?? potete aiutarmi?
    Allego lo script se vi può essere utile.
    Ringrazio in anticipo per un eventuale aiuto

    <script>
    // Immagini fluttuanti sia in formato .gif che in formato .jpg.
    // Aggiungine quante vuoi, ma ATTENZIONE: troppe immagini possono rallentare lo script !
    var your_image=new Array()
    your_image[0]="auguri.gif"

    // Puoi inserire un link per ogni messaggio. Nel caso NON volessi associare
    // un link inserisci il simbolo '#'
    var your_image_link=new Array()
    your_image_link[0]="http://www.sitoweb.it"

    // e qui, infine, la velocità della fluttuazione delle immagini. A valore più alto
    // corrisponde ina velocità più elevata
    var floatingspeed=2


    var tempo=20
    var numberofimages=your_image.length-1
    var stepx=new Array()
    var stepy=new Array()
    for (i=0;i<=numberofimages;i++) {
    stepx[i]=randommaker(floatingspeed)
    stepy[i]=randommaker(floatingspeed)
    }
    var imgwidth=new Array()
    var imgheight=new Array()
    for (i=0;i<=numberofimages;i++) {
    imgwidth[i]=10
    imgheight[i]=10
    }
    var x,y
    var marginbottom
    var marginleft=0
    var margintop=0
    var marginright
    var timer
    var spancontent=new Array()
    var imgpreload=new Array()
    for (i=0;i<=your_image.length;i++) {
    imgpreload[i]=new Image()
    imgpreload[i].src=your_image[i]
    }

    for (i=0;i<=numberofimages;i++) {
    spancontent[i]="[img]"+your_image[i]+"[/img]"
    }

    function setValues() {
    if (document.all) {
    marginbottom=document.body.clientHeight-5
    marginright=document.body.clientWidth-5
    for (i=0;i<=numberofimages;i++) {
    var thisspan = eval("document.all.span"+i)
    thisspan.innerHTML=spancontent[i]
    var thisspan = eval("document.all.span"+(i)+".style")
    thisspan.posLeft=randommaker(marginright)
    thisspan.posTop=randommaker(marginbottom)
    }
    for (i=0;i<=numberofimages;i++) {
    var thisspan = eval("document.all.span"+i)
    imgwidth[i]=thisspan.offsetWidth
    imgheight[i]=thisspan.offsetHeight

    }
    checkmovement()
    }
    if (document.layers) {
    marginbottom=window.innerHeight-5
    marginright=window.innerWidth-5
    for (i=0;i<=numberofimages;i++) {
    var thisspan=eval("document.span"+i+".document")
    thisspan.write(spancontent[i])
    thisspan.close()
    var thisspan=eval("document.span"+i)
    thisspan.left=randommaker(marginright)
    thisspan.top=randommaker(marginbottom)
    }
    for (i=0;i<=numberofimages;i++) {
    var thisspan=eval("document.span"+i+".document")
    imgwidth[i]=thisspan.width
    imgheight[i]=thisspan.height
    }
    checkmovement()
    }
    }

    function randommaker(range) {
    rand=Math.floor(range*Math.random())
    if (rand==0) {rand=Math.ceil(range/2)}
    return rand
    }

    function checkmovement() {
    if (document.all) {
    checkposition()
    movepictures()
    timer=setTimeout("checkmovement()",tempo)
    }
    if (document.layers) {
    checkposition()
    movepictures()
    timer=setTimeout("checkmovement()",tempo)
    }
    }

    function movepictures() {
    if (document.all) {
    for (i=0;i<=numberofimages;i++) {
    var thisspan=eval("document.all.span"+(i)+".style")
    thisspan.posLeft+=stepx[i]
    thisspan.posTop+=stepy[i]
    }
    }
    if (document.layers) {
    for (i=0;i<=numberofimages;i++) {
    var thisspan = eval("document.span"+i)
    thisspan.left+=stepx[i]
    thisspan.top+=stepy[i]
    }
    }
    }

    function checkposition() {
    if (document.all) {
    for (i=0;i<=numberofimages;i++) {
    var thisspan=eval("document.all.span"+i+".style")
    if (thisspan.posLeft>marginright-imgwidth[i]) {
    thisspan.posLeft-=Math.abs(stepx[i]+1)
    stepx[i]=randommaker(floatingspeed)*-1
    }
    if (thisspan.posLeft<marginleft) {
    thisspan.posLeft+=Math.abs(stepx[i])
    stepx[i]=randommaker(floatingspeed)
    }
    if (thisspan.posTop>marginbottom-imgheight[i]) {
    thisspan.posTop-=Math.abs(stepy[i])
    stepy[i]=randommaker(floatingspeed)*-1

    }
    if (thisspan.posTop<margintop) {
    thisspan.posTop+=Math.abs(stepy[i])
    stepy[i]=randommaker(floatingspeed)
    }
    }
    }
    if (document.layers) {
    for (i=0;i<=numberofimages;i++) {
    var thisspan=eval("document.span"+i)
    if (thisspan.left>marginright-imgwidth[i]) {
    thisspan.left-=Math.abs(stepx[i]+1)
    stepx[i]=randommaker(floatingspeed)*-1
    }
    if (thisspan.left<marginleft) {
    thisspan.left+=Math.abs(stepx[i])
    stepx[i]=randommaker(floatingspeed)
    }
    if (thisspan.top>marginbottom-imgheight[i]) {
    thisspan.top-=Math.abs(stepy[i])
    stepy[i]=randommaker(floatingspeed)*-1

    }
    if (thisspan.top<margintop) {
    thisspan.top+=Math.abs(stepy[i])
    stepy[i]=randommaker(floatingspeed)
    }
    }
    }
    }

    </script>
    <script>
    for (i=0;i<=numberofimages;i++) {
    document.write("<span id='span"+i+"' style='position:absolute'></span>")
    document.close()
    }
    </script>
    ------------
    HELP ME!!!

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Hai provato a dare uno z-index al div che contiene il flash piu` basso di quello del div che si muove?

    Lo z-index e` un attributo dei CSS.
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  3. #3
    porta pazienza non è che sono molto esperto... non capisco cosa intendi, io ho importato il flash da dreamweaver con il classico pulsante e non mi crea nessun div o altro..
    ------------
    HELP ME!!!

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Metti il tuo flash dentro un<div>.

    tipo:
    <div style="z-index:1">
    qui il codice per importare il flash
    </div>

    Poi quando crei i tuoi <span> in fondo al JS:
    document.write("<span id='span"+i+"' style='position:absolute; z-index:"+i*10+"'></span>")
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  5. #5
    ora provo e ti faccio sapere intanto grazie in anticipo
    ------------
    HELP ME!!!

  6. #6
    niente non va.... finisce ancora sotto al flash...
    nessun nuovo consiglio???
    ------------
    HELP ME!!!

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 © 2025 vBulletin Solutions, Inc. All rights reserved.