Super simple Flash example of the Indexhibit frontend
Finally we finished the “super simple” Flash example of our frontend for Indexhibit.
You can read more about the whole Flash / Indexhibit story here, here and here or just grab the new files and try for yourself …
The previous sources/example was ActionScript-only and had to be compiled using the Flex compiler – this one comes as a FLA-file with a few classes to back it up. But only two of those classes are really of any interest to you if you want to customize the whole thing visually.
SimpleExample.as (document-class set via properties panel in flash)
Exhibit.as (this one is linked to the exhibit movieclip in the library)
We tried to keep the example as basic as possible so there is no real “animation-mania” or something going on – some timeline tweenings, that’s all.
If you’re interested in building your own flash frontend for Indexhibit, just open the FLA-file and start from there … if you then still have any questions, don’t hesitate and leave us a comment.
Grab the sources here: http://apdevblog.com/examples/indexhibit_simple/src/apdev_ndxz_simple.zip
Or take another look at the example: http://apdevblog.com/examples/indexhibit_simple/
If you want to use your own Indexhibit installation and build a flash-frontend on top of that, you have to download the amf-package and put it in the root-directory of your webserver. change the dbaccess.php in the amf/includes folder to your database-name and -login … et voilà the remoting gateway should be running smoothly. The next thing you have to change is the SERVER_URL in the SimpleExample-class in Flash – it should be your server’s name not ours ;)
That’s it for now … cheers
1 Trackback
-
October 27th, 2009 / 06:05
62 Comments
-
Dang it, my message got cut off!
Ok so OUT WINDOW:
DEBUG: amf::RemoteGateway – call(com.apdevblog.examples.indexhibit.Indexhibit,getAllExhibits,null)
INFO: amf::RemoteConnection – RemoteConnection()
DEBUG: amf::RemoteGateway – _connection.call(com.apdevblog.examples.indexhibit.Indexhibit.getAllExhibits) [object RemoteConnection]
DEBUG: amf::RemoteGateway – >>> callParams com.apdevblog.examples.indexhibit.Indexhibit.getAllExhibits,[object RemoteGateway]
DEBUG: amf::RemoteGateway – onNetStatus() NetConnection.Call.BadVersion error*** ERROR *** com.apdevblog.amf::RemoteGateway ***
Problems communicating with remote gateway! -
Charles says:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/mawksy0/public_html/amf/services/com/apdevblog/examples/indexhibit/Indexhibit.php on line 13I created a crossdomain.xml file, so we’re good there, AND (I think I made the dbaccess.php and simpleExample.as file with the correct settings)
But as you can see the loading bar is infinite. :(
Please help me!
-
Hey Phil, I did not make any changes, but here is what my index.php file looks like:
db->fetchRecord(“SELECT *
FROM “.PX.”objects, “.PX.”objects_prefs
WHERE url = ‘$uri’
AND status = ’1′
AND object = obj_ref_type”);if (!$rs)
{
// try again with site root
$rs = $OBJ->db->fetchRecord(“SELECT *
FROM “.PX.”objects, “.PX.”objects_prefs
WHERE url = ‘/’
AND status = ’1′
AND object = obj_ref_type”);// we don’t search engines indexing this
header(“HTTP/1.1 404 Not Found”);// we need a formal error page
if (!$rs) echo ‘Page not found error here.’;
}// autoload ‘plugins’ folder
include DIRNAME.BASENAME.’/site/plugin/index.php’;// additional variables
// perhaps we should port these differently?
$rs['baseurl'] = BASEURL;
$rs['basename'] = BASENAME;
$rs['basefiles'] = BASEFILES;
$rs['gimgs'] = GIMGS;// get the front end helper class
$OBJ->lib_class(‘front’);// time for some action
if ($rs['obj_theme'] == ‘eatock’)
{
$contents = $OBJ->front->front_eatock();
}
else
{
$filename = DIRNAME . BASENAME . ‘/site/’ . $rs['obj_theme'] . ‘/index.php’;
$fp = @fopen($filename, ‘r’);
$contents = fread($fp, filesize($filename));
fclose($fp);
}// makin’ stuff happen
$PARSE =& load_class(‘parse’, TRUE, ‘lib’);
$PARSE->vars = $rs;
$PARSE->code = $contents;
echo $PARSE->parsing();// do stats if they are wanted
if ($default['statistics'] == TRUE) load_class(‘statistics’, TRUE, ‘lib’);
exit;?>
-
db->fetchRecord(“SELECT *
FROM “.PX.”objects, “.PX.”objects_prefs
WHERE url = ‘$uri’
AND status = ’1′
AND object = obj_ref_type”);if (!$rs)
{
// try again with site root
$rs = $OBJ->db->fetchRecord(“SELECT *
FROM “.PX.”objects, “.PX.”objects_prefs
WHERE url = ‘/’
AND status = ’1′
AND object = obj_ref_type”);// we don’t search engines indexing this
header(“HTTP/1.1 404 Not Found”);// we need a formal error page
if (!$rs) echo ‘Page not found error here.’;
}// autoload ‘plugins’ folder
include DIRNAME.BASENAME.’/site/plugin/index.php’;// additional variables
// perhaps we should port these differently?
$rs['baseurl'] = BASEURL;
$rs['basename'] = BASENAME;
$rs['basefiles'] = BASEFILES;
$rs['gimgs'] = GIMGS;// get the front end helper class
$OBJ->lib_class(‘front’);// time for some action
if ($rs['obj_theme'] == ‘eatock’)
{
$contents = $OBJ->front->front_eatock();
}
else
{
$filename = DIRNAME . BASENAME . ‘/site/’ . $rs['obj_theme'] . ‘/index.php’;
$fp = @fopen($filename, ‘r’);
$contents = fread($fp, filesize($filename));
fclose($fp);
}// makin’ stuff happen
$PARSE =& load_class(‘parse’, TRUE, ‘lib’);
$PARSE->vars = $rs;
$PARSE->code = $contents;
echo $PARSE->parsing();// do stats if they are wanted
if ($default['statistics'] == TRUE) load_class(‘statistics’, TRUE, ‘lib’);
exit;?>
-
This is the index.php that is located in the root folder. As you can see the indexhibit installs itself in a folder called “ndxz-studio”. No where is there a Indexhibit.php or public function Indexhibit() that I can see (using find).
Help me! :)
-
Oh and yes I am running PHP5.
-
No love on this eh? Too bad…
-
Hi guys, playing around with this great app. and learning a lot on the way, thank for that. I’m trying to get the captions of the pictures to show up but I have no idea where to start. I guess the amf services need to be adjusted…
thx in advance. -
Hi
pureMVC is too complicated for me :) .. can these be done without it?
simple flash with few classes and maybe a amfphp to do the remoting?thx in advance.

