Flash menu

Hi all :slight_smile:


I try use flash menu in design for a new site.

http://efsnew.wup-katowice.pl/



Both flash objects are loaded correct, but menu don’t work correct

(no active links to urls, no drop down lists).

But if I use the same swf’s, xml, css’s in static file on server

http://efsnew.wup-katowice.pl/

everything work fine.



About swf’s and xml:

I have in parse file and in static file:

in head

[codebox]<script type=“text/javascript” src=“http://bigfiles.wup-katowice.pl/m2/swfobject.js”></script>[/codebox]



In <body>

[codebox]

<div id=“flash_menu”>

<table width=“100%” border=“0” align=“center” cellpadding=“0” cellspacing=“0” id=“Tabela_01”>

<tr><td><div>

<object width=“960” height=“157”><param name=“movie” value=“http://bigfiles.wup-katowice.pl/m2/banner_animation.swf”><param name=“wmode” value=“transparent”>

</param><embed src=“http://bigfiles.wup-katowice.pl/m2/banner_animation.swf” type=“application/x-shockwave-flash” wmode=“transparent” width=“960” height=“175”></embed></object>

</div></tr><tr><td>

<div style=“position:relative;zoom:1;”>

<div id=“roll” style=“position:relative; height:35px;”>

<div id=“flashcontent” style=“position:relative; overflow:hidden; height:35px;”>

</div>

<script type=“text/javascript”>

function setHeight(par){

document.getElementById(“flashcontent”).style.height = par+‘px’;

}

var so = new SWFObject(“http://bigfiles.wup-katowice.pl/m2/menu.swf”, “menu”, “960”, “200”, “9”, “”);

so.addVariable(“aXml”, “http://bigfiles.wup-katowice.pl/m2/menu.xml”);

so.addParam(“wmode”, “transparent”);

so.write(“flashcontent”);

setHeight(35);

</script></div></div></tr>

</table></div>

[/codebox]

After that I have rest of site in div’s.



I made some tests:

http://efsnew.wup-katowice.pl/



This is clear new design, with only access to flash , also don’t work.

swf’s and xml I copied to other location on server.



Any idea where I made mistake??



Regards

Arek

I’m totally confused :expressionless:


I made next test :



In design for site I put flash’s - without css, MM tags, etc. only flash.

http://efsnew.wup-katowice.pl/



Menu of course don’t work.



Next I get source of this generated page and

put here

http://efsnew.wup-katowice.pl/



And menu work correct.



Regards

Arek

You are loading the page from http://efsnew.wup-katowice.pl/ but you’re pulling the Flash and XML from http://efsnew.wup-katowice.pl/. Flash needs a crossdomain.xml file to tell it is it allowed to load content from a different domain. You should do a Google search on crossdomain.xml to find out more about this new security restriction.


Thank you Avi for reply :)

I read about crossdomain.xml and made some tests with this.
But finally I made this way:
In site I create folder, swf's, js and xml I put in there and in design
I used full url's for his objects.

Regards
Arek

[quote]In site I create folder, swf's, js and xml I put in there and in design
I used full url's for his objects.[/quote]



Yes, Flash is tricky – it always takes me a while to get the configuration just right. I have gotten to the point that I can use Matrix to generate the XML on-the-fly to populate the Flash (instead of using static XML files that need to be manually updated). We've just built an image gallery for a client that uses the SlideShowPro Flash client with Matrix automatically generating the source XML from assets within the system.

I never before used any flash object on my sites.



Regards :slight_smile:

Arek