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

    Cliccare su un file swf e indirizzare ad un altra pagina

    Ho creato un swf con un programmino e lo incorporo tramite Dreamweaver in una pagina html, vorrei poter cliccare su questo file ed essere indirizzato ad un altro indirizzo. Come posso fare allego il codice del dile swf:
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','heigh t','455','src','intro','quality','high','pluginspa ge','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','intro' ); //end AC code
    </script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="600" height="455">
    <param name="movie" value="intro.swf" />
    <param name="quality" value="high" />
    <embed src="intro.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="455"></embed>
    </object></noscript>

  2. #2
    Moderatore di JavaScript L'avatar di br1
    Registrato dal
    Jul 1999
    Messaggi
    19,998
    Ti sposto
    Il guaio per i poveri computers e' che sono gli uomini a comandarli.

    Attenzione ai titoli delle discussioni: (ri)leggete il regolamento
    Consultate la discussione in rilievo: script / discussioni utili
    Usate la funzione di Ricerca del Forum

  3. #3
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182
    se il filmato è già confezionato e non puoi effettuare nodifiche su codice actionscript, non lo puoi fare
    potresti al massimo provare ad usare il tag <a> che racchiuda il tag <object> e impostarne la proprietà "display" a "block" ma non so se possa funzionare, non ho provato

  4. #4
    Il filmato è satto fatto con un programmino ma il codice (vedi sopra) è inserito in una pagina html attraverso Dreamweaver. Posso modificare il codice sopra e come?
    Devo inserire un egento onclick nel codice che mi permetta di dire se un utente clicca sull afinestra indirizzarlo alla pagina x?
    Ciao e grazie

  5. #5
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182
    quello è il codice html di incorporamento, mentre il codice che serve a te deve essere scritto nel file sorgente che poi viene compilato per creare l'swf e si chiama "Actionscript" appunto come il forum in cui sei stato spostato,
    il problema è che a quanto ho capito il programmino di cui parli non da la possibilità di aggiungere codice actionscript nel filmato esportato, perciò non puoi gestire l'onclick come vorresti e in quel caso rimane valido il mio suggerimento di inserire il codice di incorporamento (quello che hai postato) allinterno di un tag <a>, anche se non so se e come possa funzionare la cosa

  6. #6
    Con un programmino ho decompilato il file swf generato ed ho estratto il codice:
    // Action script...

    // [Action in Frame 1]
    var Generated = "Amara Pan Zoom Slide Show Builder";

    function showText(inVal)
    {
    with (slides_sprite.text_)
    {
    htmlText = "<font face=\"" + ffaceArr[inVal] + "\" size=\"" + fsizeArr[inVal] + "\">" + textArr[inVal] + "</font>";
    textColor = fcolorArr[inVal];
    _x = textXArr[inVal];
    _y = textYArr[inVal];
    _width = textWArr[inVal];
    } // End of with
    } // End of the function
    var width = 600;
    var height = 455;
    var w2 = 300;
    var h2 = 227;
    var sprite_count = 1;
    var iterator = 0;
    var r_iterator = 0;
    var delay_value = 0;
    var framerate = 25;
    var delay_count = 25;
    var can_change = true;
    var last_slide = slide0;
    var active_mc = 0;
    var Revers = false;
    var loop = -1;
    var slideshow_type = 0;
    var dw = 0;
    var pi180 = Math.PI / 180;
    linkArr = new Array();
    targArr = new Array();
    textArr = new Array();
    textXArr = new Array();
    textYArr = new Array();
    textWArr = new Array();
    ffaceArr = new Array();
    fsizeArr = new Array();
    fcolorArr = new Array();
    btnPlayKey._visible = false;
    btnPrevKeyA._visible = false;
    btnNextKeyB._visible = false;
    if (sprite_count == 1)
    {
    btnPrev._visible = false;
    btnNext._visible = false;
    } // end if
    slides_sprite.createTextField("text_", 10000, 0, 0, 600, 0);
    with (slides_sprite.text_)
    {
    autoSize = true;
    selectable = false;
    background = false;
    border = false;
    html = true;
    wordWrap = true;
    } // End of with

    var i = 0;

    i++;
    if (i < sprite_count)
    {
    var slide_ref_ = slides_sprite.attachMovie("_slide" + i, "slide" + i, i);
    slide_ref_.ind = i;
    slide_ref_.useHandCursor = false;
    if (lenth(linkArr[i]) != 0)
    {
    slide_ref_.onPress = function ()
    {
    getURL(linkArr[this.ind], targArr[this.ind]);
    };
    } // end if

    } // end if

    this.onEnterFrame = function ()
    {
    if (iterator == sprite_count && -1)
    {
    iterator = 0;
    } // end if
    if (iterator != r_iterator)
    {
    active_mc.useHandCursor = false;
    active_mc._visible = false;
    r_iterator = iterator;
    can_change = true;
    active_mc.show_();
    } // end if
    };

    linkArr.push("");
    targArr.push("_self");
    textArr.push("");
    textXArr.push("5");
    textYArr.push("5");
    textWArr.push("590");
    ffaceArr.push("Arial");
    fcolorArr.push("65280");
    fsizeArr.push("12");

    slides_sprite.slide0.started = false;
    slides_sprite.slide0._visible = false;
    slides_sprite.slide0.X = Array(700, 700, 473, 173, 427, 167, 167);
    slides_sprite.slide0.Y = Array(457, 457, 353, 320, 220, -7, -7);
    slides_sprite.slide0.keyX = Array(700, 700, 473, 173, 427, 167, 167);
    slides_sprite.slide0.keyY = Array(457, 457, 353, 320, 220, -7, -7);
    slides_sprite.slide0.keyScale = Array(100, 100, 170, 80, 80, 165, 165);
    slides_sprite.slide0.keyAlpha = Array(0, 20, 80, 100, 100, 10, 0);
    slides_sprite.slide0.keyRotate = Array(0, 0, 0, 0, 0, 0, 0);
    slides_sprite.slide0.keyTiming = Array(0, 0, 40, 40, 35, 30, 0);
    slides_sprite.slide0.keyPause = Array(0, 0, 0, 0, 0, 0, 0);
    slides_sprite.slide0.keySize = Array(12, 12, 12, 12, 12, 12, 12);
    slides_sprite.slide0.keyColor = Array(65280, 65280, 65280, 65280, 65280, 65280, 65280);
    slides_sprite.slide0.keyText = Array("", "", "", "", "", "", "");
    slides_sprite.slide0.keyLink = Array("", "", "", "", "", "", "");
    slides_sprite.slide0.keyTarg = Array("_self", "_self", "_self", "_self", "_self", "_self", "_self");
    slides_sprite.slide0.mainLink = linkArr.0;
    slides_sprite.slide0.mainfSize = fsizeArr[0];
    slides_sprite.slide0.mainfColor = fcolorArr[0];
    slides_sprite.slide0.mainText = textArr[0];
    slides_sprite.slide0.movetext = true;
    slides_sprite.slide0.keyCount = 7;
    slides_sprite.slide0.K = 0;
    if (7 == 1)
    {
    slides_sprite.slide0.keyColor[0] = "65280,65280,65280,65280,65280,65280,65280";
    slides_sprite.slide0.keyRotate[0] = "0,0,0,0,0,0,0";
    slides_sprite.slide0.keyText[0] = string("", "", "", "", "", "", "");
    slides_sprite.slide0.keyPause[0] = int("0,0,0,0,0,0,0") * 100;
    slides_sprite.slide0.keyAlpha[0] = "0,20,80,100,100,10,0";
    slides_sprite.slide0.keyScale[0] = "100,100,170,80,80,165,165";
    slides_sprite.slide0.keySize[0] = "12,12,12,12,12,12,12";
    slides_sprite.slide0.keyX[0] = "700,700,473,173,427,167,167";
    slides_sprite.slide0.keyY[0] = "457,457,353,320,220,-7,-7";
    angle = slides_sprite.slide0.keyRotate[0] * pi180;
    xx = slides_sprite.slide0.keyX[0] * slides_sprite.slide0.keyScale[0] / 100;
    yy = slides_sprite.slide0.keyY[0] * slides_sprite.slide0.keyScale[0] / 100;
    if (slides_sprite.slide0.keyPause[0] < 1)
    {
    slides_sprite.slide0.keyPause[0] = 1;
    } // end if
    slides_sprite.slide0.keyX[0] = w2 - xx * Math.cos(angle) + yy * Math.sin(angle);
    slides_sprite.slide0.keyY[0] = h2 - xx * Math.sin(angle) - yy * Math.cos(angle);
    } // end if
    if (1 < 7)
    {
    var i = 0;

    i++;
    if (i < 7)
    {
    angle = slides_sprite.slide0.keyRotate[i] * pi180;
    if (slides_sprite.slide0.keyTiming[i] < 1)
    {
    slides_sprite.slide0.keyTiming[i] = 1;
    } // end if
    if (slides_sprite.slide0.keyPause[i] < 1)
    {
    slides_sprite.slide0.keyPause[i] = 1;
    } // end if
    slides_sprite.slide0.keyTiming[i] = slides_sprite.slide0.keyTiming[i] * 100;
    slides_sprite.slide0.keyPause[i] = slides_sprite.slide0.keyPause[i] * 100;
    var xx = slides_sprite.slide0.keyX[i] * slides_sprite.slide0.keyScale[i] / 100;
    var yy = slides_sprite.slide0.keyY[i] * slides_sprite.slide0.keyScale[i] / 100;
    slides_sprite.slide0.keyX[i] = w2 - xx * Math.cos(angle) + yy * Math.sin(angle);
    slides_sprite.slide0.keyY[i] = h2 - yy * Math.cos(angle) - xx * Math.sin(angle);

    } // end if
    } // end if
    slides_sprite.slide0.setLinkText = function (kl)
    {
    if (length(this.keyText[kl]) == 0)
    {
    showText(-1);
    if (length(this.mainText) != 0)
    {
    fsizeArr[iterator] = this.mainfSize;
    fcolorArr[iterator] = this.mainfColor;
    textArr[iterator] = this.mainText;
    showText(iterator);
    } // end if
    }
    else
    {
    fsizeArr[iterator] = this.keySize[kl];
    fcolorArr[iterator] = this.keyColor[kl];
    textArr[iterator] = this.keyText[kl];
    showText(iterator);
    } // end if
    if (this.movetext)
    {
    slides_sprite.text_._x = width / 2;
    slides_sprite.text_._y = height / 2;
    } // end if
    if (length(this.keyLink[kl]) == 0)
    {
    if (length(this.mainLink) == 0)
    {
    this.useHandCursor = false;
    }
    else
    {
    linkArr[iterator] = this.mainLink;
    this.useHandCursor = true;
    } // end if
    }
    else
    {
    linkArr[iterator] = this.keyLink[kl];
    targArr[iterator] = this.keyTarg[kl];
    this.useHandCursor = true;
    } // end if
    };

    ...segue

  7. #7
    slides_sprite.slide0.show_ = function (kl)
    {
    step = 0;
    this.K = kl;
    this.key_ = -1;
    can_next = false;
    can_nextK = false;
    this.entertime = 0;
    this.timing = false;
    this._alpha = this.keyAlpha[kl];
    this._xscale = this.keyScale[kl];
    this._yscale = this.keyScale[kl];
    this._rotation = this.keyRotate[kl];
    this.x_ = this.X[kl];
    this.y_ = this.Y[kl];
    this.inc_alpha = 0;
    this.inc_scale = 0;
    this._x = this.keyX[kl];
    this._y = this.keyY[kl];
    this.setLinkText(kl);
    };
    slides_sprite.slide0.next_ = function ()
    {
    if (can_next || this.keyCount <= 1)
    {
    if (!((r_iterator == sprite_count - 1 || sprite_count == 1) && loop == 0))
    {
    if (can_next)
    {
    can_changeKey = false;
    } // end if
    if (this.keyCount != 0)
    {
    del_count = framerate * (this.keyPause[this.keyCount - 1] / 1000);
    }
    else
    {
    del_count = delay_count;
    } // end if
    if (del_count < delay_value)
    {
    this.key_ = -1;
    showText(-1);
    delay_value = 0;
    this.entertime = 0;
    this.timing = false;
    this.started = false;
    can_change = true;
    this._visible = false;
    can_next = false;
    linkArr[r_iterator] = "";
    this.useHandCursor = false;
    iterator++;
    } // end if
    }
    else
    {
    can_change = false;
    this._alpha = 100;
    } // end if
    } // end if
    };
    slides_sprite.slide0.needpause = function ()
    {
    if (!this.timing)
    {
    if (this.keyPause[this.K] >= 1)
    {
    can_changeKey = false;
    this.entertime = getTimer() + this.keyPause[this.K];
    this.timing = true;
    } // end if
    } // end if
    };
    slides_sprite.slide0.startTimer = function (interval, key_)
    {
    if (!(interval == 0 || key_ == this.key_))
    {
    curTime = getTimer();
    if (curTime < interval)
    {
    can_changeKey = false;
    this.timing = true;
    }
    else
    {
    if (can_nextK)
    {
    can_next = true;
    } // end if
    can_changeKey = true;
    this.timing = false;
    this.key_ = key_;
    } // end if
    }
    else
    {
    can_changeKey = true;
    return (0);
    } // end if
    };
    slides_sprite.slide0.onEnterFrame = function ()
    {
    if (r_iterator == 0)
    {
    this.needpause();
    this.startTimer(this.entertime, this.K);
    if (!can_change)
    {
    return (0);
    } // end if
    active_mc = this;
    this._visible = true;
    if (!this.started)
    {
    this.show_(0);
    this.started = true;
    this.white_shape._visible = false;
    this.swapDepths(sprite_count);
    if (this.keyCount > 1)
    {
    step = 0;
    steps = framerate * (this.keyTiming[1] / 1000);
    } // end if
    } // end if
    delay_value++;
    this.next_();
    if (this.keyCount > 1)
    {
    if (can_changeKey)
    {
    if (this.K < this.keyCount)
    {
    this.inc_rotate = (this.keyRotate[this.K + 1] - this.keyRotate[this.K]) / steps;
    this.inc_alpha = (this.keyAlpha[this.K + 1] - this._alpha) / (steps - step);
    this.inc_scale = (this.keyScale[this.K + 1] - this._xscale) / (steps - step);
    if (this.inc_rotate != 0)
    {
    this.dx_ = (this.X[this.K + 1] - this.x_) / (steps - step);
    this.dy_ = (this.Y[this.K + 1] - this.y_) / (steps - step);
    }
    else
    {
    this.dx_ = (this.keyX[this.K + 1] - this._x) / (steps - step);
    this.dy_ = (this.keyY[this.K + 1] - this._y) / (steps - step);
    } // end if
    step++;
    if (step < steps)
    {
    this._alpha = this._alpha + this.inc_alpha;
    this._xscale = this._xscale + this.inc_scale;
    this._yscale = this._yscale + this.inc_scale;
    if (this.inc_rotate != 0)
    {
    this.x_ = this.x_ + this.dx_;
    this.y_ = this.y_ + this.dy_;
    angle = (this.keyRotate[this.K] + this.inc_rotate * step) * pi180;
    xx = this.x_ * this._xscale / 100;
    yy = this.y_ * this._yscale / 100;
    cosA = Math.cos(angle);
    sinA = Math.sin(angle);
    this._x = w2 - xx * cosA + yy * sinA;
    this._y = h2 - xx * sinA - yy * cosA;
    this._rotation = this._rotation + this.inc_rotate;
    }
    else
    {
    this._x = this._x + this.dx_;
    this._y = this._y + this.dy_;
    if (this.movetext)
    {
    slides_sprite.text_._x = slides_sprite.text_._x + this.dx_;
    slides_sprite.text_._y = slides_sprite.text_._y + this.dy_;
    } // end if
    } // end if
    }
    else
    {
    this.K++;
    this.show_(this.K);
    delay_value = delay_count;
    if (this.K != this.keyCount - 1)
    {
    steps = framerate * (this.keyTiming[this.K + 1] / 1000);
    }
    else
    {
    this.inc_rotate = 0;
    this.inc_scale = 0;
    can_nextK = true;
    } // end if
    } // end if
    } // end if
    } // end if
    } // end if
    } // end if
    };

    var ref_mask_ = createEmptyMovieClip("mask_", 3);
    ref_mask_._y = slides_sprite._y;
    ref_mask_._x = slides_sprite._x;
    with (ref_mask_)
    {
    beginFill(0, 100);
    moveTo(0, 0);
    lineTo(slides_sprite._width, 0);
    lineTo(slides_sprite._width, slides_sprite._height);
    lineTo(0, slides_sprite._height);
    endFill();
    } // End of with
    slides_sprite.setMask(ref_mask_);
    InitParams();

    In questo codice posso immettere un evento onclick che rimandi ad un altra pagina e come posso fare?
    Grazie

  8. #8
    Niente da fare mi spieghi dove inserire il tag <a> in questo codice e cosa sare come parametri?

    <div id="image">
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','heigh t','455','src','intro','quality','high','pluginspa ge','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','intro' ); //end AC code
    </script><noscript>
    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="600" height="455">
    <param name="movie" value="intro.swf" />
    <param name="quality" value="high" />
    <embed src="intro.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="455"></embed>
    </object></noscript>
    </div>

    Grazie

  9. #9
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182
    non mi pare proprio regolare la decompilazione da un programma chiuso che crea il solo swf senza sorgente... comunque non è che il codice postato cambia qualcosa, se non esiste un sorgente, non puoi dare il comando, se esiste puoi creare un'area trasparente dentro il filmato, grande quanto lo spazio dell'swf, trasformarla in pulsante e assegnargli questo comando:

    on(release) {
    getURL("pagina.html", "_self");
    }

  10. #10
    Hai ragione ma il file l'ho creato io e non l'ho preso da altri quindi a livello di correttezza non ci sono problemi. Comunque ho deciso di non intraprendere questa strada ma quella che mi avevi indicato. Ti chiedo solo dove inserire il tag <a> nel codice postato in precedenza e quale deve sintassi devo usare. Grazie

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.