Flashbutton, Colorbox & XML-Datei. Hilfeee! [Flash 10]
| Beiträge: 2 Registriert: Mar 2009
| 15.09.2011, 14:41
Hallo! Vielleicht kann mir jemand mit meinem Script helfen?
Ich habe eine Website mit einer SWF-Datei die viele Schaltflächen (21 Stück) beinhaltet. Die Flashbuttons öffnen bei klick die jeweilige Rubrik in Form einer "colorbox" in der eine beliebige HTML-Seite angezeigt wird. Das funktioniert noch wunderbar und zwar ist das mein Script auf den Flash-Schaltflächen:
PHP:1 2 3 4 5
|
import flash.external.ExternalInterface;
kontakt2_btn.onRelease = function() {
ExternalInterface.call("launchColorBox","http://www.hierdieAdresse.de/",false);
}
|
So sieht mein HTML aus:
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Opening a ColorBox from Flash</title>
<link media="screen" rel="stylesheet" href="colorbox.css" />
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="colorbox/jquery.colorbox.js"></script>
</head>
<body>
<center>
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
<param name="movie" value="Startseite.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="swfversion" value="6.0.65.0">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="Startseite.swf" width="100%" height="100%">
<!--<![endif]-->
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="swfversion" value="6.0.65.0">
<param name="expressinstall" value="Scripts/expressInstall.swf">
<param name="allowscriptaccess" value="always">
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
<script>
function launchColorBox(url){
$.colorbox({href:url,width:"80%", height:"80%",iframe:true});
}
</script></center>
</body>
</html>
|
Jetzt zum Problem: Ich möchte nun das die Flashbuttons die Adressen der Rubriken aus einer XML-Datei entnehmen und in der Colorbox anzeigen. Ohne Colorbox- also nur im neuen Browserfenster funktioniert das bei mir so (Beispiel anhand Button Nr. 16)
PHP:1 2 3 4 5 6 7 8 9 10 11
|
weblinkXML = new XML();
weblinkXML.ignoreWhite = true;
weblinkXML.load("url.xml");
weblinkXML.onLoad = function (success)
{
var url = weblinkXML.firstChild.childNodes[16].attributes.href;
kontakt2_btn.onRelease = function() {
getURL(url, "_blank");
};
}
|
Die XML-Datei hat folgenden Inhalt:
ActionScript:1 2 3 4 5 6 7 | <?xml version="1.0" encoding="utf-8"?>
<navigation>
<item id="ueberuns" href="http://www.hierdieAdresse.de"/>
<item id="aktuelles" href="http://www.hierdieAdresse.de""/>
<item id="kontakt1" href="http://www.hierdieAdresse.de"/>
usw........
</navigation>
|
Kann mir bitte jemand weiterhelfen?
Gruß
Sebastian | | | Beiträge: 2 Registriert: Mar 2009
Themenautor/in
| 20.09.2011, 15:34
Problem gelöst | |
| Ähnliche Beiträge zum Thema | 13.09.2022 - Rennier |
|
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News
Regeln & Bedingungen
|