PDA

View Full Version : Dynamic Portfolio


Boofta
02-05-2003, 10:43 AM
Hello, first post, I'm pretty new to this forum, I'm hoping it will be some help.

I've been looking into dynamic flash for a month or so now and I haven't really found what I'm looking for.

I need to make a dynamic portfolio section for a flash website.

The first page will display a sub navigation, ie a list of the folio projects, this needs to be dynamic, so if a project is added to the database then the sub nav is updated.

The user clicks on a project and is taken to a page displaying text and a picture, both fed from the DB. There will also be a next and previous button so the user can click to cycle through the projects. This will also need to be updated if a record is added to the DB.

I'm intending to use ASP but I am also open to ideas in PHP, I have done a few tests and I can get info from the DB to display in flash. My main problem is how to generate dynamic pages in flash which update as records are added to the database.

Hope someone can help.
Thanks

jimburton
02-05-2003, 04:09 PM
welcome boofta :)

if you want to load dynamic content and then keep refreshing it you can do it with LoadVars or XML and the send/sendAndLoad methods that both those objects have, and maybe use setInterval to send/sendAndLoad periodically, if that's what you need...sounds like you're already doing this if you've got data into your movie? Check out the tutes on xml and loadvars on this site

there are also the xmlsocket methods - open a socket connection so that data can go in either direction as needed - I have no experience of this but know you need a socket server on yr host, so you can't do it with just asp or php...)

freddycodes
02-05-2003, 04:41 PM
there are also the xmlsocket methods - open a socket connection so that data can go in either direction as needed - I have no experience of this but know you need a socket server on yr host, so you can't do it with just asp or php...)


PHP can be used to create a socket server, as can Perl and even ASP I believe. But like jimburton said I am not sure a socket server is necessary to complete your goal. You would basically need one call to get the navigation stuff and a subsequent call to diaply each page. Just make your nav buttons make a call to the server asp or php and retrieve specific information about the particular item that was pressed. Your next and previous buttons would work the same way.

jimburton
02-05-2003, 04:58 PM
PHP can be used to create a socket server

that's interesting freddy - I'm going to read up on this in the manual, but do you have links to anything useful?

freddycodes
02-05-2003, 05:03 PM
For php
http://www.php.net/manual/en/ref.sockets.php

But again since Flash only supports XMLSockets and PHP's xml support is not as good as Perl or ASP, I would suggest looking at Perl. I wrote one in perl for a chat app, and it worked great. I can give to you if you want to have a look.

jimburton
02-06-2003, 11:27 AM
thanks a lot for that but I don't perl currently, and my brain really hasn't got room for another language at the mo!:) :rolleyes: will check out the php route though - is the xml support so limited? I have only ever used the event driven functions at basic level...

freddycodes
02-06-2003, 12:52 PM
In my opinion, of course, I feel PHP could do a better job at handling XML parsing. You should be able to do what you do in Perl say and that is


my $config = XMLin($buf);

print $config->{action} eq 'login');


Where $buf holds the XML, and action is an attribute of the root node.


PHP seems to make you do a whole lot more work to get that information, or I am not doing it right, either way I found PERL to be much easier in this aspect only.