fliegendes Fenster bzw. Iframe

Fragen zu allen Themen rund ums Programmieren außerhalb von phpBB können hier gestellt werden - auch zu anderen Programmiersprachen oder Software wie Webservern und Editoren.
Antworten
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

fliegendes Fenster bzw. Iframe

Beitrag von Kiss News »

Hallo!

Ich habe auf meiner Seite einen javascript Code eingebaut. Der bewirkt ein "fliegendes Foto" auf der Webseite. Das Foto ist mit einem Link versehen. Bei "on mouse over" könnte ein anderes Foto erscheinen, wenn ich wollte. Zu sehen hier:

http://www.kissnews.de/

Jetzt meine Frage: ich suche eigentlich genau sowas, nur sollte es eine Webseite bzw. sowas wie ein "Pop up Fenster" bzw. ein Iframe-Fenster sein, was fliegt, und kein Foto. Beispielsweise hätte ich gerne so einen eBay Revelance ad über die Seite fliegen.

Kennt vielleicht jemand so ein Script? Muß kein Javascript sein.

Bitte keine Links zu irgendwelchen Script-Webseiten posten, um sowas zu "suchen", die kenne ich, dort kann man sich zu Tode suchen und findet nichts. Ich suche genau ein Script, was sowas kann.
Vielleicht kann man das Script ja auch ganz einfach umschreiben (im Quellcode ganz oben im "head" teil und im "body§ Teil), sodass anstatt des Fotos dann ein Iframe über die Webseite fliegt...

Danke!
thoha
Mitglied
Beiträge: 372
Registriert: 11.01.2006 19:28
Wohnort: Oetwil an der Limmat CH
Kontaktdaten:

Beitrag von thoha »

Sorry an die Mods und Admins, das is ein bisschen viel Code...

@Kiss News

Kopier diesen Code und füge ihn in den Editor ein, dann als HTML-Dokument abspeichern, vielleicht ist das ja so was, was du suchst:

Code: Alles auswählen

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	left:1012px;
	top:296px;
	width:239px;
	height:202px;
	z-index:1;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_timelinePlay(tmLnName, myID) { //v1.2
  //Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  tmLn = document.MM_Time[tmLnName];
  if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
  if (myID == tmLn.ID) { //if Im newest
    setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
    fNew = ++tmLn.curFrame;
    for (i=0; i<tmLn.length; i++) {
      sprite = tmLn[i];
      if (sprite.charAt(0) == 's') {
        if (sprite.obj) {
          numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
          if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
            keyFrm=1;
            for (j=0; j<sprite.values.length; j++) {
              props = sprite.values[j]; 
              if (numKeyFr != props.length) {
                if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
              } else {
                while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                  if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                  else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
        } } } } }
      } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
      if (fNew > tmLn.lastFrame) tmLn.ID = 0;
  } }
}

function MM_initTimelines() { //v4.0
    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
    var ns = navigator.appName == "Netscape";
    var ns4 = (ns && parseInt(navigator.appVersion) == 4);
    var ns5 = (ns && parseInt(navigator.appVersion) > 4);
    var macIE5 = (navigator.platform ? (navigator.platform == "MacPPC") : false) && (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4);
    document.MM_Time = new Array(1);
    document.MM_Time[0] = new Array(1);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 15;
    document.MM_Time[0][0] = new String("sprite");
    document.MM_Time[0][0].slot = 1;
    if (ns4)
        document.MM_Time[0][0].obj = document["Layer1"];
    else if (ns5)
        document.MM_Time[0][0].obj = document.getElementById("Layer1");
    else
        document.MM_Time[0][0].obj = document.all ? document.all["Layer1"] : null;
    document.MM_Time[0][0].keyFrames = new Array(1, 4, 5, 6, 7, 8, 9, 10, 11, 14, 19, 28, 34, 44, 51, 54, 61, 74, 85, 88, 92, 103, 125, 133, 140, 151, 157, 163, 164, 166, 173, 176, 177, 178, 179, 180, 183, 189, 194, 200, 204, 209, 215);
    document.MM_Time[0][0].values = new Array(2);
    if (ns5 || macIE5)
        document.MM_Time[0][0].values[0] = new Array("109px", "119px", "128px", "135px", "138px", "138px", "138px", "139px", "139px", "139px", "160px", "177px", "198px", "220px", "231px", "243px", "254px", "266px", "281px", "292px", "303px", "315px", "327px", "340px", "352px", "364px", "376px", "387px", "399px", "411px", "421px", "432px", "443px", "456px", "466px", "477px", "488px", "499px", "511px", "523px", "535px", "546px", "557px", "567px", "580px", "591px", "602px", "611px", "619px", "626px", "632px", "633px", "626px", "616px", "610px", "604px", "597px", "590px", "580px", "569px", "555px", "546px", "536px", "525px", "514px", "503px", "491px", "478px", "466px", "453px", "441px", "429px", "418px", "406px", "393px", "380px", "367px", "354px", "342px", "330px", "320px", "310px", "300px", "292px", "284px", "269px", "262px", "257px", "252px", "246px", "244px", "251px", "257px", "263px", "270px", "277px", "286px", "295px", "305px", "316px", "329px", "344px", "360px", "370px", "381px", "392px", "403px", "414px", "426px", "438px", "451px", "464px", "477px", "490px", "504px", "516px", "529px", "541px", "552px", "564px", "574px", "585px", "595px", "605px", "614px", "631px", "645px", "656px", "666px", "674px", "683px", "692px", "701px", "713px", "724px", "736px", "748px", "759px", "772px", "784px", "793px", "802px", "812px", "821px", "831px", "841px", "850px", "858px", "867px", "874px", "881px", "890px", "897px", "901px", "904px", "907px", "909px", "911px", "912px", "912px", "911px", "911px", "910px", "904px", "905px", "896px", "886px", "874px", "860px", "845px", "831px", "818px", "807px", "795px", "793px", "792px", "792px", "792px", "792px", "792px", "803px", "818px", "837px", "846px", "856px", "866px", "876px", "886px", "897px", "910px", "922px", "934px", "947px", "960px", "972px", "984px", "997px", "1009px", "1021px", "1032px", "1045px", "1055px", "1064px", "1072px", "1078px", "1083px", "1087px", "1090px", "1087px", "1077px", "1065px", "1052px", "1039px", "1025px", "1012px");
    else
        document.MM_Time[0][0].values[0] = new Array(109,119,128,135,138,138,138,139,139,139,160,177,198,220,231,243,254,266,281,292,303,315,327,340,352,364,376,387,399,411,421,432,443,456,466,477,488,499,511,523,535,546,557,567,580,591,602,611,619,626,632,633,626,616,610,604,597,590,580,569,555,546,536,525,514,503,491,478,466,453,441,429,418,406,393,380,367,354,342,330,320,310,300,292,284,269,262,257,252,246,244,251,257,263,270,277,286,295,305,316,329,344,360,370,381,392,403,414,426,438,451,464,477,490,504,516,529,541,552,564,574,585,595,605,614,631,645,656,666,674,683,692,701,713,724,736,748,759,772,784,793,802,812,821,831,841,850,858,867,874,881,890,897,901,904,907,909,911,912,912,911,911,910,904,905,896,886,874,860,845,831,818,807,795,793,792,792,792,792,792,803,818,837,846,856,866,876,886,897,910,922,934,947,960,972,984,997,1009,1021,1032,1045,1055,1064,1072,1078,1083,1087,1090,1087,1077,1065,1052,1039,1025,1012);
    document.MM_Time[0][0].values[0].prop = "left";
    if (ns5 || macIE5)
        document.MM_Time[0][0].values[1] = new Array("8px", "12px", "16px", "20px", "32px", "36px", "38px", "39px", "40px", "41px", "58px", "65px", "73px", "79px", "81px", "83px", "84px", "83px", "82px", "80px", "78px", "75px", "72px", "69px", "65px", "62px", "60px", "58px", "56px", "56px", "55px", "56px", "57px", "58px", "59px", "60px", "61px", "62px", "64px", "65px", "67px", "69px", "72px", "75px", "80px", "86px", "92px", "98px", "105px", "111px", "118px", "130px", "137px", "145px", "151px", "158px", "165px", "172px", "179px", "186px", "192px", "195px", "197px", "199px", "201px", "203px", "204px", "206px", "207px", "209px", "211px", "212px", "215px", "217px", "220px", "224px", "227px", "231px", "235px", "238px", "242px", "245px", "249px", "252px", "255px", "262px", "268px", "278px", "287px", "296px", "307px", "322px", "328px", "334px", "341px", "347px", "354px", "360px", "367px", "372px", "378px", "382px", "386px", "388px", "389px", "390px", "391px", "391px", "392px", "392px", "392px", "392px", "393px", "392px", "392px", "392px", "392px", "391px", "391px", "390px", "390px", "389px", "388px", "388px", "387px", "385px", "382px", "378px", "374px", "369px", "364px", "360px", "356px", "353px", "351px", "349px", "346px", "344px", "340px", "334px", "329px", "324px", "318px", "311px", "305px", "298px", "291px", "284px", "277px", "270px", "263px", "252px", "240px", "229px", "218px", "207px", "196px", "183px", "171px", "159px", "148px", "138px", "130px", "115px", "108px", "102px", "100px", "99px", "97px", "95px", "94px", "94px", "94px", "99px", "107px", "113px", "120px", "126px", "129px", "131px", "143px", "158px", "174px", "181px", "187px", "193px", "199px", "204px", "207px", "209px", "208px", "207px", "205px", "204px", "203px", "203px", "202px", "201px", "202px", "203px", "207px", "212px", "219px", "228px", "236px", "244px", "253px", "263px", "274px", "280px", "284px", "287px", "290px", "293px", "296px");
    else
        document.MM_Time[0][0].values[1] = new Array(8,12,16,20,32,36,38,39,40,41,58,65,73,79,81,83,84,83,82,80,78,75,72,69,65,62,60,58,56,56,55,56,57,58,59,60,61,62,64,65,67,69,72,75,80,86,92,98,105,111,118,130,137,145,151,158,165,172,179,186,192,195,197,199,201,203,204,206,207,209,211,212,215,217,220,224,227,231,235,238,242,245,249,252,255,262,268,278,287,296,307,322,328,334,341,347,354,360,367,372,378,382,386,388,389,390,391,391,392,392,392,392,393,392,392,392,392,391,391,390,390,389,388,388,387,385,382,378,374,369,364,360,356,353,351,349,346,344,340,334,329,324,318,311,305,298,291,284,277,270,263,252,240,229,218,207,196,183,171,159,148,138,130,115,108,102,100,99,97,95,94,94,94,99,107,113,120,126,129,131,143,158,174,181,187,193,199,204,207,209,208,207,205,204,203,203,202,201,202,203,207,212,219,228,236,244,253,263,274,280,284,287,290,293,296);
    document.MM_Time[0][0].values[1].prop = "top";
    if (!ns4) {
        document.MM_Time[0][0].values[0].prop2 = "style";
        document.MM_Time[0][0].values[1].prop2 = "style";
    }
    document.MM_Time[0].lastFrame = 215;
    for (i=0; i<document.MM_Time.length; i++) {
        document.MM_Time[i].ID = null;
        document.MM_Time[i].curFrame = 0;
        document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    }
}
//-->
</script>
</head>

<body onload="MM_timelinePlay('Timeline1')">
<div id="Layer1" style="left: 109px; top: 8px;">Hier kommt das Bild bzw. Iframe rein </div>
</body>
</html>
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

Beitrag von Kiss News »

super, danke, das ist genau das, was ich gesucht habe!!!

nur eine Kleinigkeit noch: bei "mouse over" bleibt das fliegende "Ding" nicht stehen, ist also relativ schwer anklickbar. Das fliegende Foto bleibt stehen, wenn ich mit der Maus drüber gehe...

Kannst Du mir vielleicht noch verraten, wie ich die Geschwindigkeit oder die Richtung umprogrammieren könnte? :roll:
thoha
Mitglied
Beiträge: 372
Registriert: 11.01.2006 19:28
Wohnort: Oetwil an der Limmat CH
Kontaktdaten:

Beitrag von thoha »

Das weiss ich auch nicht - habe auch nur das kopiert, was der Dreamweaver ausgespuckt hat... ich würde einfach mal ein paar Zahlen abändern und schauen was passiert
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

Beitrag von Kiss News »

OK Danke.
Antworten

Zurück zu „Coding & Technik“