
Originally Posted by
ryanmm
Here's the php. it works like a gem with everything except this flash
How do you know? Do you mean if you browse to "CompSummary.php?url3=123456" in a browser, you don't get the message that url3 doesn't exist?
You apparently haven't read my sig, nor the site from a previous link on posting sample code as you haven't written a complete sample. After filling out the scraps posted thus far into a complete example, there's no issue I see with undefined values.
get.as (compiled with mtasc):
Code:
class GetTest extends MovieClip {
static var base:String = 'CompSummary.php';
static var url3:String = '123456';
public function onLoad () {
this.getURL(base + '?url3=' + url3, '_self');
}
}
getter.xml (compiled with swfmill):
Code:
<?xml version="1.0" encoding="iso-8859-1" ?>
<movie version="8" width="80" height="16" framerate="12">
<background color="#FFFFFF"/>
<frame>
<library>
<clip id="getst" import="build/get.swf" class="GetTest" />
</library>
<place id="getst" name="getter" depth="1" />
</frame>
</movie>
CompSummary.php:
PHP Code:
<?php
header('Content-type: text/plain');
function PrintError($msg, $file) {
echo $msg;
}
# even without calling session_start(), this works
$_SESSION['url3'] = $_GET['url3'];
if(!isset($_SESSION['url3'])) {
PrintError('Sorry, url3 doesn\'t exist.','index.php');
exit;
}
echo "url3: $_SESSION[url3]\n";
index.html
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><title></title></head>
<body>
<object data="getter.swf" type="application/x-shockwave-flash" id="getter" height="50" width="200">
<param value="sameDomain" name="allowScriptAccess" />
<param value="high" name="quality" />
<param value="#FFFFFF" name="bgcolor" />
</object>
</body>
</html>
Opening index.html results in the loading of page "CompSummary.php?url3=123456".