Page 2 of 3

Posted: Mon 12. Apr 2004, 21:22
by dr.swank
just a quick note all. I have been working with a Flash Serializer class to move data back and forth between PHPWCMS and Flash. Its very fast and solid. I have been using only the trace window so far, so there is not much to see yet. I hope to have some files available by the end of the week.

cheers, J

Posted: Mon 12. Apr 2004, 22:04
by pSouper
I'm watching this thread with smelly/bated breath :)

Posted: Mon 12. Apr 2004, 22:34
by DeXXus
pSouper wrote:I'm watching this thread with smelly/bated breath :)
Tell us something we... DON'T ~ALREADY~ KNOW :twisted:

Posted: Fri 16. Apr 2004, 01:14
by colech
Rock on Dr.Swank! You rule! And so do you Fulvio Romanin!

DeXXus... you're killing me :lol:
Tell us something we... DON'T ~ALREADY~ KNOW

Posted: Sat 17. Apr 2004, 20:37
by dr.swank
http://fcms.burbacher.org/fcms_demo/

so far....

my students are working on the content type parsing. More as thing move along

Posted: Sat 17. Apr 2004, 21:33
by pSouper
i like this so far DrS and Fulv
lol@dX

Posted: Thu 1. Jul 2004, 22:15
by Ibis Fernandez
Yuck.

Posted: Thu 1. Jul 2004, 22:26
by dr.swank
Ibis.. ?? scared?.. :lol: doc

Posted: Thu 1. Jul 2004, 22:39
by frold
dr.swank wrote:Ibis.. ?? scared?.. :lol: doc
what is the further plans for this project?

Posted: Thu 1. Jul 2004, 22:46
by dr.swank
frold, I am swamped with work at the moment. I want to move this to a flashRemoting implementation but have been short on time due to work. I hope to have some time at the end of the month to get back to this. please excuse the slowness... :( I only have 2 hands, and my students were less help then I had hoped. :oops:

cheers, doc

Posted: Thu 1. Jul 2004, 23:02
by frold
There is no reason to apologize... I was just curious... :wink:

And there is no problem in just having 2 hands... That is anatomical as that should be :D But a third hans would be nice some times...

Posted: Fri 2. Jul 2004, 00:42
by Ibis Fernandez
Scared moi? Never.

I'd personally would like to see more flash implementation into phpWCMS, but not to sure if a full flash front end would be the way to go. The php side already works great, So if I get involved I'd be more intrested in finding ways to use flash to improve the experiance rather than just serve as an alternate.

Just my not so humble oppinion :D

Posted: Thu 22. Jul 2004, 17:08
by M4-io
dr.swank wrote:frold, I am swamped with work at the moment. I want to move this to a flashRemoting implementation but have been short on time due to work. I hope to have some time at the end of the month to get back to this. please excuse the slowness... :( I only have 2 hands, and my students were less help then I had hoped. :oops:

cheers, doc
Hi doc,

I've been investigating flashremoting (AMFPHP) for use with flash/php but AMFPHP isn't stable enough for me to start with. If PHPwCMS could output unformatted XML for the menu-structure and the articles then it's quite easy to parse the data with Flash and render it to anything you like. I've done many flash+script+database solutions yet but none with PHPwCMS. I'm afraid that any effort I make in hacking the RC4 code will be wiped away when RC5 or v.NEXT is coming. Since many people suggested massive enhancements I'll wait before I'm going to modify the code.

If you need any help drop me a message.

(BTW I'm a fulltime webdeveloper at a Dutch software development co.)

Regards,
M4

Posted: Thu 22. Jul 2004, 17:12
by cyrano
hi M4,

nice to read this.

I have just made static flash site, without xml and php.

What would be interessting is how to do this?
any hints or weblinks?

sure not a full describtion.

you are right with the development that is not usefull if we have to update all for each new release.

But making a small menue in flash would be nice :-)

Posted: Thu 22. Jul 2004, 18:09
by M4-io
cyrano wrote:I have just made static flash site, without xml and php.

What would be interessting is how to do this?
any hints or weblinks?
...
But making a small menue in flash would be nice :-)
Hi cyrano,

a simple but effective tutorial how to load external text-data (like HTML) into flash is on this site: http://www.flashkit.com/tutorials/Dynam ... index.php/

I'm sure you can find tons of information which will be more detailed than I can offer you in this forum.

Just search on the net for keywords like "flash dynamic content loadvars php".

One of the main advantages of using phpWCMS with Flash is that the editing of the site can be done with phpWCMS as well as structuring the items and providing a security system. You don't want to do those things in Flash. Too complicated and totally unnecessary.

If you're skill is entry-level with Flash (MX) and PHP I'd wait for a sample Flash frontend based on stable (RC5 ? v. Next ?) code of phpWCMS.

To give you a simple hint: When developping a static Flash site you'll end up with a lot of frames with text. The layout is virtually the same on each frame. When developping a dynamic Flash site you just create a single "layout aka template" frame which could be a "dynamic textfield". The textfield is a variable and you can load data into that variable using the Flash "LoadVars" object. This isn't complicated, actually it's a few lines code.

Using Flash MX (2004) you can perform such a load using these lines:

A. myfile.txt is a file on your server (http://www.myserver.com)
B. myfile.txt contains: myName=John&myAge=88&myInteger=31137

C. In Flash (MX) you create 3 dynamic textfields named txtDynamicName, txtDynamicAge and txtDynamicInteger

D. In Flash (MX) you enter this code on the first frame:

Code: Select all

/* 1. create a new instance of the LoadVars object)
var myObject = new LoadVars();

/* 2. assing a function to be executed when the file has been loaded */
myObject.onLoad = function() {

 /* put the content of the variables into Flash textfields */
 txtDynamicName.text = myObject.myName;
 txtDynamicAge.text = myObject.myAge;
 txtDynamicInteger.text = myObject.myInteger;
}

/* NOW load the file from the server (or your local disk whatever) */
myObject.load("http://www.myserver.com/myfile.txt");
If you get it you can understand that you could write a PHP script that could access a database and return data in the same format as the textfile was formatted.

The PHP script could look like this:

Code: Select all

<?php
 echo "myName=John&";
 echo "myAge=11&";
 echo "myWhatever=yes_it_is";
?>
A step further:

Code: Select all

<?php

 $myphpvar_name = "George";
 $another_variable = 7363;
 $actor = "Marlon Brando";
 $thewinner = "Greece";

 echo "myName=".$myphpvar."&";
 echo "myThing=".$another_variable."&";
 echo "myWhatever=".$actor."&";
 echo "myWinner=".$thewinner."&";
?>
If you'd execute the PHP-script the output would look (in your browser) like this:

Code: Select all

myName=John&myAge=11&myWhatever=yes_it_is
Flash can read the above line perfectly, will split it using the & (ampersand) sign and will create variables in your "myObject" object in Flash so you can access them easily.

Step 3 is to access a database in PHP and have PHP return the values from the database-query with echo-statements.

If you ever hear someone mention "Flash Remoting" than it's a new and better and more standardised way to transport data from the webserver (using PHP or ColdFusion or Perl or etc etc) to Flash. FlashRemoting (AMF) is a binary format which is more secure, faster but harder to implement and to debug.

Furthermore an excellent tutorial with Flash & PHP is here: http://actionscript-toolbox.com/samplemx_loadvars.php.

Have phun,
M4