Jump to content

[SOLVED] showing variable in a swf object


gwolff2005

Recommended Posts

Hi guys,

I have a swf movie done in Flash8., called testgreeting.swf.

The actionscript code of this file is

Actionscript

greeting.text = "Dear " + username + ",  nice to have you here!";

 

IN my php file I wrote

 

PHP Code

<script type="text/javascript">
        var so = new SWFObject("testgreeting.swf", "menu", "200", "500", "9", "#FFFFFF");
        so.addVariable("username", "<?php echo $_SESSION[MM_firstname] ?>");
        so.write("flashcontent");
    </script>

 

 

I then inserted the flashviewer. The movie runs but the output is always "Dear undefined, nice to have you here". The Explorer bar left bottom shows  an error saying "swf object is not defined." What is worng?? Thanks so much in advance!

Link to comment
https://forums.phpfreaks.com/topic/156081-solved-showing-variable-in-a-swf-object/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.