luka66_6
09-14-2009, 05:47 PM
[Avatar]
2009-09-13 19:17:28 CEST
Hi
i have a huge problem trying to get swfaddress to work. I downloaded latest swfobject and swfaddress but i can not get it to work. I wached tutorial on goToAndLearn but i still can not get it to work. If can somebody point me to right direction it would be great..
in action script i get right trace from SWFAddressEvent.CHANGE but it does not show in my browser. Tryed in FF, opera, IE 7 but no success. I used air version of html creator that commes with swf object to embed flash. Here is my code if can somebody tell me what ia am doing wrong i would be really happy:
AS code import com.asual.swfaddress.*
pageText.text = "Start Page";
home.addEventListener(MouseEvent.CLICK, buttonPressed); about.addEventListener(MouseEvent.CLICK, buttonPressed);
function buttonPressed(event:MouseEvent):void {
//trace(event.target.name);
pageText.text = event.target.name;
SWFAddress.setValue(event.target.name);
}
SWFAddress.addEventListener(SWFAddressEvent.CHANGE , addressChange);
function addressChange(event:SWFAddressEvent):void { trace(event.value.substring(1));
SWFAddress.setTitle(event.value.substring(1));
}
And my html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="swfaddress.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
var attributes = {id:"test"};
swfobject.embedSWF("page.swf", "myAlternativeContent", "550", "400", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id="myAlternativeContent">
<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" />
</a>
</div>
</body>
</html>
Luka
2009-09-13 19:17:28 CEST
Hi
i have a huge problem trying to get swfaddress to work. I downloaded latest swfobject and swfaddress but i can not get it to work. I wached tutorial on goToAndLearn but i still can not get it to work. If can somebody point me to right direction it would be great..
in action script i get right trace from SWFAddressEvent.CHANGE but it does not show in my browser. Tryed in FF, opera, IE 7 but no success. I used air version of html creator that commes with swf object to embed flash. Here is my code if can somebody tell me what ia am doing wrong i would be really happy:
AS code import com.asual.swfaddress.*
pageText.text = "Start Page";
home.addEventListener(MouseEvent.CLICK, buttonPressed); about.addEventListener(MouseEvent.CLICK, buttonPressed);
function buttonPressed(event:MouseEvent):void {
//trace(event.target.name);
pageText.text = event.target.name;
SWFAddress.setValue(event.target.name);
}
SWFAddress.addEventListener(SWFAddressEvent.CHANGE , addressChange);
function addressChange(event:SWFAddressEvent):void { trace(event.value.substring(1));
SWFAddress.setTitle(event.value.substring(1));
}
And my html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="swfaddress.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
var attributes = {id:"test"};
swfobject.embedSWF("page.swf", "myAlternativeContent", "550", "400", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id="myAlternativeContent">
<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" />
</a>
</div>
</body>
</html>
Luka