Now I have a Dynamic Text box (instance name "text") in this flash doc. (HTML enable)
and I want it to load up test5.php into this text box
so I have used:
Code: Select all
loadVariables("test5.php", "text");Moderator: General Moderators
Code: Select all
loadVariables("test5.php", "text");PHP offers the ability to create Shockwave Flash files via Paul Haeberli's libswf module.
Note:
SWF support was added in PHP 4 RC2.
The libswf does not have support for Windows. The development of that library has been stopped, and the source is not available to port it to another systems.
For up to date SWF support take a look at the MING functions.
Requirements
You need the libswf library to compile PHP with support for this extension. You can download libswf at » ftp://ftp.sgi.com/sgi/graphics/grafica/flash.
Installation
Once you have libswf all you need to do is to configure --with-swf[=DIR] where DIR is a location containing the directories include and lib. The include directory has to contain the swf.h file and the lib directory has to contain the libswf.a file. If you unpack the libswf distribution the two files will be in one directory. Consequently you will have to copy the files to the proper location manually.
Code: Select all
myLoader = new LoadVars(); //Create new object myLoader of class LoadVars
myLoader.load("text.txt"); //Tis could be .php too i think
myLoader.onLoad = function() { //here you would do something
trace("name: "+name+" Option:"+option+" Colour: "+color+"!");
}
I have never tried it out, if u manage please tell me how....
you place the variables in the format var=something&anothervar=somethingelseCode: Select all
<?php
define('IN_PHPBB', true);
/**
TODO: set $phpbb_root_path
*/
$phpbb_root_path = 'phpBB2/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
$forumId = 3;
$user_ip = '127.0.0.1';
/** calling init_userprefs will instantiate $template */
$userdata = session_pagestart($user_ip, $forumId);
init_userprefs($userdata);
/**
might be you have to change this depending on your config-data
if you see the smilie image filenames instead of the images...
*/
$board_config['smilies_path'] = $phpbb_root_path . $board_config['smilies_path'];
$query = 'SELECT topic_title, topic_id, FROM_UNIXTIME(topic_time,"%W the %D %M @ %r") AS Topic_Date, post_text, bbcode_uid, username FROM phpbb_topics RIGHT JOIN phpbb_posts_text ON topic_first_post_id=post_id JOIN phpbb_users WHERE forum_id='.$forumId.' AND topic_poster=user_id ORDER BY topic_time DESC';
$result = $db->sql_query($query);
?>
<html>
<head>
<style tye="text/css">
body { background-color: #333333; }
</style>
</head>
<body>
<?php
while($row = $db->sql_fetchrow($result))
{
// this field is in <prefix_>posts, I'm skipping it for now and enable all smilies
$row['enable_smilies'] = true;
// enable_bbcode (always true) and enable_html (always false) are ignored as well
$row['post_text'] = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $row['post_text']);
if ( isset($row['bbcode_uid']) && $row['bbcode_uid'] != '' )
$row['post_text'] = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($row['post_text'], $row['bbcode_uid']) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $row['post_text']);
if ($row['enable_smilies'])
$row['post_text'] = smilies_pass($row['post_text']);
?>
<b>
<FONT FACE="Arial" SIZE="-1" COLOR="#FF9900">
<?php echo $row['topic_title']; ?>
</FONT>
</b>
<br />
<FONT FACE="Arial" SIZE="-2" COLOR="#999999">
posted by: <b><?php echo $row['username']; ?></b>
on: <?php echo $row['Topic_Date']; ?>
</FONT>
<br /><hr /><br />
<FONT FACE="Arial" SIZE="-1" COLOR="#FFFFFF"><?php echo $row['post_text']; ?></FONT>
<br /><br />
<FONT FACE="Arial" SIZE="-2">
<a href="http://www.hostultra.com/~Gappa/phpBB2/viewtopic.php?t=<?php echo $row['topic_id']; ?>">
<b><FONT COLOR="#FF9900">Read comments</FONT></b>
</a>
</FONT>
<br /><br /><br />
<?php
}
?>
</body>
</html>Code: Select all
echo "topic_title=".$rowї'topic_title']."&username=".$rowї'username']."&Topic_Date=".$rowї'Topic_Date']."&post_text=".$rowї'post_text']."&topic_id=".$rowї'topic_id'];