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
-
Oktober 27th, 2009 / 06:05
62 Comments
-
Super thanks man ! It will be easyer for “non-coders” we are.
Thanks again. -
Hi guys, really awesome piece of work,
i’ve been waiting for this version since i’m not familiar with flex, and i have really basic knowledge of actionscript, on behalf of all newbies of the world, thanks for making it accessible for us.Since i don’t have much luck ( never happened to me things works out of the box…) i did everything you said to make it work, gateway works (after lot of messing and changing host), SimpleExample.as modified, but still i can’t gt it to work when hitting Ctrl+Enter on flash it gives me this:
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 – onFault()and my exhibit doesn’t show up, you can see in my site http://zinkh.000fees.net
i think it’s about the adress i type in SimpleExample.as none of the above or http://zinkh.000fees.net/htdocs/ don’t seem to work, do you have any clue about this?
Thanks -
Hey ppl!
So, i’m revising the steps.I already have an indexhibit installation running, so grabbed the AMF package, inserted the database info, and thrown them into the main Public folder.
I edited the FLA and changed the SERVER_URL reference to call my main URL, published the SWF, and thrown them together with the rest of the BIN folder into the main Public folder too…
It didn’t worked – endless loading. I think i did installed it right at least 3 times… oh well, dunno, maybe i’ve missed something or it has to do with the fact that my server does not let me upload images since yesterday…
Anyway, this work is beautiful and i hope it does crack for beautiful websites out there! :D
-
Thanks for the response Phil.
I tried the Charles. I just get an error about the favicon… I’m assuming that does not harm the process.
It just keeps loading… Could it be the server?!… -
Thanks Phil, you were absolutely right, there was a little space before the name of sql server that messed up everything. thanks so much, now i have to figure out why i can’t upload images…pfff, another big thank you.
-
It does not look like the pic you show… Looks a bit dryer than that. I also don’t know if i understand Charles… He is a very difficult person to deal with :)
Anyway, the flash just stays there loading endlessly… :/ -
Oh! I dunno if this works for you to take a peak with Charles… But if you want you can go here http://www.ffall.org/index-swf.html.
-
Yup! That was it. Thanks!
I corrected the SERVER_URL information with a plain direct URL.
And then created a crossdomain.xml :
http://curtismorley.com/2007/09/01/flash-flex-tutorial-how-to-create-a-crossdomainxml-file/Things look ok. ExhibitVo catched things up.
Now i have a problem with ImageVo – no images are show in the flash. I messed something with indexhibit for sure… i bet another install of indexhibit, from the raw, would clear things up… i think i’m going to create another indexhibit later today to compare… any ideas?
-
oh… :)
Sorry, i guess we are moving to a unknown domain to me… I don’t know where to look or modify.
But in the FLA the only references i got were:
registerClassAlias(“com.apdevblog.examples.indexhibit.model.vo.ImageVo”, ImageVo);
Where i assume you are declaring the ImageVo class. And here:
exht.setImages(vo.images);
Where i was hoping to found it a little more elaborate with references to URLs and so. But that is just me assuming. I have no experience with this kind of coding.
Feel free to decide whether it is worth or not to follow this with a noob :) ahaha ;)
-
hey phil
great work!
I got it running with the tweaks you mentioned.
I’m looking forward to customize it but it’s pretty sophisticated stuff here since I’m more on the design side and haven’t jumped on the AS3 train yet. So I’m still trying to figure out how it works ;)@iwakami: You need to adjust the Exhibit class, not the ExhibitVo class.
-
Hi Phil,
Apart from the fact it only loads, I get an error when publishing to .SWF
The error is below. It refers to the SimpleExample.as, line 118
1046: Type was not found or was not a compile-time constant: ServiceEvent.
-
Hi Phil,
Thank you for looking. I don’t know the error means, but I think I’ll start fresh and see what happens.
The compile-time error has been solved.
Will get back soon. Love the work you guys do.
gr,
Sander
-
Hi Phil,
First of all, thanks so much for developing this software, I’ve found your site yesterday and since then turned about 5 people on to using it for their showcases.
I have everything up and running nicely (had to remove the .htaccess to make amf behave, did this break something?) at http://www.ekeler.com/bin.
Like many people before me, the swf shows the loading bar for a long time but eventually does display all information properly. The thing is, if I run the SWF locally using the regular flash player but pointing it to my live indexhibit install, it works fine, snaps right into action. Running the local file in the browser (safari and firefox, OSX10.6) messes it up again: loads for a while, then displays correctly.
I just can’t figure out what’s going wrong.I’ve been trying to use Charles to debug things but I’m not too familiar doing that so I’m not really getting anywhere. Would you have any ideas on what I’m missing?
-
Little update:
The install is now at http://www.ekeler.com
I’ve been sitting down with Charles and he tells me that gateway.php is passing through all content but takes about 17s to load (time out, I suppose). At the moment, the swf online doesn’t show content at all, the exact same file locally shows up right away. I’m stumped.
-
Hey Phil,
Thanks for the reply! I’ve been looking into this some more and the same thing is happening for other installs at the same provider. I found a post somewhere on the amfphp forums talking about how zlib.output_compression being enabled can cause a 15sec delay when sending large arrays back to flash:
http://sourceforge.net/projects/amfphp/forums/forum/247252/topic/1514055?message=3771856
I’m not sure if this is the problem I’m dealing with and I’m having a hard time figuring it out. My site is hosted at some random web space I have no real control over. I would try turn the compression off in the main php.ini put sadly I have no access to that. I think there must be some way of overriding it in .htaccess but I get errors thrown(not allowed) when using php_flag (same reason I had to remove the file from amf before). I also tried switching it off at runtime in gateway.php:
ini_set(‘zlib.output_compression’, ‘Off’);
echo(ini_get(‘zlib.output_compression’)); //it’s Offbut that doesn’t help and I’m not sure I’m doing this the right way anyway.
And it still wouldn’t explain why running the swf locally works perfectly fine, using the exact same server / database.
I guess I’ll sleep on it, maybe new ideas will come in the morning.
Bas
-
As a final thought, Charles shows that the quick responses I get from running the swf locally are not compressed and the slow ones I get from running on the server are compressed in gzip. This would somehow relate to the issue I mentioned above so that may be it? I’ll have to look at the phpinfo of some friends tomorrow to find out or maybe someone on here can check things out.
Or.. I can check myself of course with my new friend Charlie. Seems the example on apdevblog has no compression but the one on http://zinkh.000fees.net/ does and also works fine. So, meh.
Bas
-
Hey Phil,
It’s working great now! http://www.ekeler.com, up and running smoothly!
Zend really did the trick, I’m not sure what about the whole compression stuff turned out to mess things up but Zend seems to fix everything.
Thanks a lot for the quick response, you really helped me out, along with some guys around me having the same problem.Bas
-
Hi Phil
First of all this use of indexhibit as a CMS is great!
I am a novice with code so I am not too sure that I have the right set up.
first, where do you place the files on the FTP? should they be all in the same folder? also what files should you upload to the FTP, this is a bit confusing. I have a similar problem as a user above, the flash page loads but constantly “loading”Thank you!
-
Hi Phil I did but I thought that was only for Flex now using via FLA file. I will try this tonight and see if it works.
Thank You
-
Hi Phil
Any possibility of another post with a more description of how to get this set up to work?
-
Hi Phil
I cannot get the info from my indexhibit to read into flash
this is my test indexhibit:
http://farmlandmedia.net/urbana/Flash site I would like info to be read to:
http://test10.farmlandmedia.net/Thank you
-
Hi there,
i have the same problem as YB and have created a crossdomain.xml file in (http://yourdomain.com/crossdomain.xml) Now in charles its picking up the host as apdevblog.com and path crossdomain.xml any reason why this is happening, as i have my own crossdomain.xml at my server.where can i modify this so it calls my crossdomain.xml?
cheers
-
hello
thank you for your workbut installation description still seems to be difficult for me
the default folder for indexhibit is /ndxz-studio in the root folder, so there is my ind.e. installed; i uploaded /amf folder to root and set db passwords there; then i changed simpleExample.as, after that i runned ndxz.fla and got next:
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]
Error opening URL ‘http://sergeysommer.com/amf/gateway.php’
DEBUG: amf::RemoteGateway – onNetStatus() NetConnection.Call.Failed error*** ERROR *** com.apdevblog.amf::RemoteGateway ***
Problems communicating with remote gateway!my site is http://www.sergeysommer.com
i used crossdomain xml to make http://www=http://
thank you for your time
-
hi again
hm strange things
i fixed the access to http://sergeysommer.com/amf/gateway.php
its okay now
but i’m still geting: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]
Error opening URL ‘http://www.sergeysommer.com/amf/gateway.php’
DEBUG: amf::RemoteGateway – onNetStatus() NetConnection.Call.Failed error*** ERROR *** com.apdevblog.amf::RemoteGateway ***
Problems communicating with remote gateway!on cmd+enter.
i entered “http://sergeysommer.com” for server-url
copied /amf/ to root of sergeysommer.com
created crossdomain.xml in the root
indexhibit files are in sergeysommer.com/-/ndxz-studio/ folderwhat am i doing wrong? maybe i forgot something?
please help!!!
-
ooops something wrong anyway
Internal Server Error
http://sergeysommer.com/amf/gateway.php…will ask host:)
-
Can you guys make a simple step by step install / how to use for dummies…
I’m clearing a dummy, i don’t get this.So many different version and things mentioned in the different versions on the blog here. I have been reading back and furth between them, and just end up getting more and confusing. Every time i download new sources and stuff.
-
is there any one that will help me to put my flash website into Indexhibit, for a small amount of $ $?
Bedst regards Thomas
-
Hi Phil and Aron,
Thanks for the front end for indexhibit. It has been a life saver for my semester :). However, there is one thing I can’t seem to figure out.
http://www.bllly.nl works like a charm.
http://blly.nl however doesn’t. It loads the same index.html page, but there seems to be a problem with:
public static const SERVER_URL:String = “http://www.bllly.nl/”;
in the actionscript code. I know it is possible, http://lisahoerterer.de/ and http://www.lisahoerterer.de/ both work.
Can you please give me some pointers in the right direction!
Awesome work!
Billy -
Thanks for replying. A quick change of crossdomain.xml did the trick.
-
Hi
Thanks for making this flash frontend for indexhibit, opens up a lot of possibilities!
I have a question about the latest example. The objects in flash are placed randomly via a math round random script. Is it possible to place them neatly in a row (like in the other example) with specific margins between them? I’m not much of a scripter myself, so if you could point me in the right direction, it would be great! -
Hey Phil,
I have everything installed, but for one; I can’t get the flash side of indexhibit even load when the page loads, and two, when opened and previewed in flash, I can’t get anything to load and it says, like above, that there is an error and cannot connect to the remotegateway.
Any help? Been looking through all the threads and can’t seem to figure it out.
Thanks!
Brian
-
Hey guys! I been reading your stuff over and over and loosing sleep. I get the endless loading like most users, and the flash compile errors:
COMPILER Window:
Warning: 1090: Migration issue: The onMouseUp event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘mouseUp’, callback_handler).
