Jump to content


Photo

Best way to manage Flash blog entries?


  • Please log in to reply
14 replies to this topic

#1 UnderAttak

UnderAttak

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Gender:Male
  • Location:San Diego

Posted 22 January 2007 - 10:22 AM

What would most of you do? The only thing I can think of, without having to deal with any advanced PHP or anything, is your usual one blog per frame and when clicking on a "next post" or "blog link", it goes to that frame and stops.

Are there any decent tutorials to load text files onClick into a text field (XML)? Would that be the best method to keep filesize down?

#2 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 22 January 2007 - 11:32 AM

If you really want to make your life easy....go the AMFPHP route. You'll find your site works alot better if you dont have to hardcode everything. If you dont want to have PHP and flash communicate, you can try having php write xml that flash reads. That would get things done as well. But if you make a layout change to your website and you have 40 posts in your blog...you may have to make 40 changes. Thats not cool.

Take your time building it, be patient, and do it right. Its difficult, I know...I'm struggling with the website im making right now, I want to toss it online before its done...but Im waiting until I have some content in it and the design locked down.

If you make a good solid website, youll be proud of it in the end. Might take twice as long, but more often or not, its worth the feeling...at least it is IMO.

#3 Ben

Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 22 January 2007 - 07:53 PM

Honestly I wouldn't do AMFPHP, I picked the hard(er) road and did XML with PHP with Flash. Personally I find it really easy. Since PHP doesn't need to talk to Flash at all, and Flash doesn't need to talk to PHP either, they use the XML as their "translater". Doesn't need to use anymore than two files (.php and .swf).

#4 UnderAttak

UnderAttak

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Gender:Male
  • Location:San Diego

Posted 22 January 2007 - 11:17 PM

That was the route I was leaning towards, a dynamic text field and my blog entries being loaded from an external text file.

The problem with that, however, is that when you go to a random blog in my archive, you have the option of clicking on "previous blog" or "next blog", and I'd have no idea how to set up multiple text file browsing using only one scene :rolleyes: , or possibly one text file with multiple variables...but remember I would only have 2 buttons at the most for navigating through the entries.

#5 Ben

Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 22 January 2007 - 11:33 PM

Well thats where XML is handy. You really should learn XML in Flash, it's incredibly useful.

Edited by d4rkst0n3, 22 January 2007 - 11:33 PM.


#6 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 23 January 2007 - 03:01 AM

As soon as it comes to heavy XML data, I would start to re-think the whole process.
I have nothing against loading XML's I do that all the time, as long as it's suitable for me.. But for such a project like a blog or even a big sized photogallery.. no thanks.. I moved over to AMFPHP

In your situation I would also move over to AMFPHP, there is good site from a contributor of AMFPHP called
http://www.sephiroth.it

It takes a little while to understand it, but as soon as you got it.. It's a wonderful thing :)

#7 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 23 January 2007 - 09:11 AM

Yah, AMFPHP is a bit of an undertaking...took me three tries to get it to work. Mind you, it took me 4 to get my computer to work as a server with PHP and MySQL on it *shrug*...maybe Im just slow. But once you get it, it is incredibly powerful, and opens up a number of options for you.

To get my stuff working I took the defualt files that AMFPHP came with for the examples and just added my own stuff, and changed what was there until it suited my needs. This way I always had the layout and whatnot correct. It helps loads the first couple times you go to set it up.

Just post here if you have any trouble.


Edit:
On the flip side, we have a project at work that is for Daimler-Chrysler (in use as a pilot at the auto shows in Canada this year, and the US next year) that runs off gigabytes of dynamically generated xml. And it is an UGLY beast...but it works. We started this well before AMFPHP was useable tho. It never loads all of the xml at once, only smaller bits get sent to it at a time. We saved out a copy of the xml generated by Java and tried to open it, and there was no program that could, due to the huge filesize. We had to develop a program that would open sections of it to prevent our computers from crashing.

Re-Edit:

Just talked to the developer on the XML project today, the majority of the content has been re-done to use openAMF (port of AMFPHP for Java) rather than using so much XML. The database that we had the huge ammounts of xml files from will only be getting bigger, so to streamline, we're using AMF.

Edited by Pax, 23 January 2007 - 02:11 PM.


#8 UnderAttak

UnderAttak

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Gender:Male
  • Location:San Diego

Posted 23 January 2007 - 12:45 PM

Hm, I will have to give the PHP a try. I was thinking about the XML more and more and I concluded that since I will only have one Dynamic field displaying my updated blog and the same dynamic text field displaying old entries, it wouldn't be possible to treat each entry as a seperate variable only because they won't load in that dynamic text field (the whole naming thing).

Wow Pax, that does sound like a nightmare. Gigabytes of XML?! Sheesh. Sounds pretty terrible just figuring out why the computers kept crashing and setting everything up.

#9 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 23 January 2007 - 02:16 PM

Because Flash needs to parse the XML, and if it takes too long, the flash player will crash.

#10 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 23 January 2007 - 02:16 PM

Wow Pax, that does sound like a nightmare. Gigabytes of XML?! Sheesh. Sounds pretty terrible just figuring out why the computers kept crashing and setting everything up.


A few megs of xml in one file will probably make your computer crash :D At least notepad or whatever you open it in. An entire database was converted into XML, which is why it was so large. Sounds like the idea was to use it for debug purposes, but the developer didnt realize how large the file would be when all the data was in one file. Usually it uses a number of smaller xml files that are either static, or generated as required. But like I said in my edited post, thats been changed to use AMF now. Its just faster when you have lots of data. Although, XML is AS3 will be much quicker, opening up some more doors. I've also heard of JSON (JavaScript Object Notation) is about as quick as AMF, but Ive never used it.

#11 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 23 January 2007 - 03:48 PM

AS3 has an extremely fast engine running behind.. But I would anyway go for a remote solution like AMFPHP
Other solutions would be Flex or Flash Remoting

#12 Ben

Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 23 January 2007 - 08:13 PM

I agree with everyone here, but XML is still good to learn. You can just type your data straight into it and load it into Flash. But I'm going to have a look at AMFPHP see how good it is ;)

#13 UnderAttak

UnderAttak

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Gender:Male
  • Location:San Diego

Posted 23 January 2007 - 09:06 PM

I agree with everyone here, but XML is still good to learn. You can just type your data straight into it and load it into Flash. But I'm going to have a look at AMFPHP see how good it is :)


It's not that I don't know how to work with XML or anything, I do. But the thought of having to setup multiple dynamic text fields for each individual archive entry is too much of a hassle for it's worth. That and I can't figure out a way to load different txt files into the same dynamic field with the click of a button and i'm pretty sure it isn't possible.

#14 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 24 January 2007 - 04:05 AM

completely agree with UnderAttak

#15 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 24 January 2007 - 08:43 AM

IF you were using xml, you could have had just one dynamic textfield, and parsed your xml into a bunch of objects (one per post) and put those into an array. When you click the next button, just go to the next id in the array, an replace the text in the text field with the text from the new post in the array.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users