Pages in Flash
-
Hello.
I am developing my own theme and I am stuck right now. I want to pass the page information to my flash movie.
I have: (menu.php)
<?php $link = mysql_connect("localhost", "root", "root"); mysql_select_db("whiteboardiaries"); $query = 'SELECT * FROM wp_posts WHERE post_type="page"'; $results = mysql_query($query); echo "<?xml version=\"1.0\"?>\n"; echo "<menu>\n"; echo "\t<page>\n"; echo "\t\t<item>"; bloginfo("name") ; echo "</item>\n"; echo "\t\t<url>"; bloginfo("url"); echo "</url>\n"; echo "\t</page>\n"; while ($page = mysql_fetch_assoc($results)) { echo "\t<page>\n"; echo "\t\t<item>" . $page["post_title"] . "</item>\n"; echo "\t\t<url>" . $page["guid"] . "</url>\n"; echo "\t</page>\n"; } echo "</menu>\n"; mysql_close($link); ?>
When I test my site, using
<?php include (TEMPLATEPATH . '/menu.php') ?>
it outputs `<?xml version=”1.0″?>
<menu>
<page>
<item>Whiteboard Diaries</item><url>https://localhost:8888/empirical.com/whiteboarddiaries</url>
</page>
<page>
<item>About Me</item>
<url>https://localhost:8888/empirical.com/whiteboarddiaries/?page_id=4</url>
</page>
<page><item>Portfolio</item>
<url>https://localhost:8888/empirical.com/whiteboarddiaries/?page_id=5</url>
</page>
<page>
<item>Contact Me</item>
<url>https://localhost:8888/empirical.com/whiteboarddiaries/?page_id=6</url>
</page></menu>` onto the page… which is correct!
BUT
When I embed my flash movie, I can’t seem to pass the xml output properly?!!
I have tried:
<script type="text/javascript"> // <![CDATA[ var so = new SWFObject("https://localhost:8888/empirical.com/whiteboarddiaries/wp-content/themes/whiteboard/swf/pages.swf", "flashMenu", "100%", "45", "6", "#000000"); so.addVariable('xml_location', <?= include (TEMPLATEPATH . '/menu.php') ?>); so.write("flashMenu"); // ]]> </script>
and
<script type="text/javascript"> // <![CDATA[ var so = new SWFObject("https://localhost:8888/empirical.com/whiteboarddiaries/wp-content/themes/whiteboard/swf/pages.swf", "flashMenu", "100%", "45", "6", "#000000"); so.addVariable('xml_location', 'https://localhost:8888/empirical.com/whiteboarddiaries/wp-content/themes/whiteboard/menu.php'); so.write("flashMenu"); // ]]> </script>
NOW
pass the entire location seems right but the php is not being executed and it looks like flash is reading the content of the PHP script and not the output of the PHP script.
Any thoughts?
Did I lose you?
- The topic ‘Pages in Flash’ is closed to new replies.