A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: Flash blog

  1. #1
    Senior Member
    Join Date
    Nov 2000
    Posts
    259

    Flash blog

    hi!

    I need to create a blog in my page, but it has to have the following characteristics:

    1- Four people are going to write it, so I need each entry to display the author of that entry.

    2- I need it to load the entries as an external txt file, so it will be easy for everyone to upload the entries. I want all four of us to simply write the txt file, send it to the server and voilá...

    How do I go about doing this?
    Up the Irons!!

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    seems easy enough...

    first..have you ever loaded external text before?

    If you are going to directly edit the text file..this should be very easy to accomplish.

    You need to search on how to use a loadVariable() object.

    If you have questions..post back.

  3. #3
    Senior Member
    Join Date
    Nov 2000
    Posts
    259
    OK.
    Yes I have loaded external files...
    I made a scroller which loaded an external TXT and then scrolled up and down.
    This time I need a draggable scroller, and a way for the four guys to login to the blog and post...me and other 3 dudes.
    Up the Irons!!

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    ok.. well you need to express that as well as relay HOW you want this to be done..

    So they are NOT getting access directly to the text file on the server?

    If not..then you need to build some sort of generic CMS (content management system)

    you will need to have each of the 'users' log into their own 'admin' panel...or have them type in their name when they make an entry...

    this will also require you to use some minor PHP scripts.. to take the 'text' form the input box of each user.. and dump (add) this to an exsisting text file on the server.

    your flash movie will pick up the text file as usual..

  5. #5
    Senior Member
    Join Date
    Nov 2000
    Posts
    259
    OK, so then I will need two things that flash will catch from the server...
    1- Which user posted
    2- The post itself

    The idea is for us to be able to post from anywhere, just accessing the internet...like for instance a LAN house, or inside our tour bus, using a laptop. I'm thinking a restricted area in our site, which only the four of us can access, and type the name and post...I also need flash to display the date and time of each post, and I need to offer the option of reading past posts, maybe organized by year/month. Maybe a filter for posts only by one or all authors?
    Up the Irons!!

  6. #6
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    now your getting a bit bigger.. in its most basic form...this is just reading a text file.

    using PHP, we can dump some data to the textFile.

    Hmm.. the more I think of it..using XML will most likely be easier in the long run.

    basically you have to pass an OBJECT of vars to the textFile every time you guys post.

    user
    date/time
    comments

    but if you want to be able to search/sort whatever by some criteria.... yo going to have to have each unique object (post) have a common factor (date) that you can access, sot by and then arrange the rest of the data for that object in the correct order.. (make sense)?

    but you should story board out how a normal 'transaction' should go..note any options..or thing that comes to mind.. it will easier to follow.. and help you visualize/fill in any gaps..

  7. #7
    Senior Member
    Join Date
    Nov 2000
    Posts
    259
    OK

    This is the blog:

    Field 1 - Date
    Field 2 - Author
    Field 3 - Subject
    Field 4 - Comments

    The author logs in, fills in the blanks and clicks send.
    The data gets sent to the XML file
    The XML file sends the variables to the text file
    Flash loads the text file, therefore filling in the variable fields...is that it?
    Up the Irons!!

  8. #8
    Senior Member
    Join Date
    Nov 2000
    Posts
    259
    I understand the concept... but how to go about executing it?
    Up the Irons!!

  9. #9
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    almost... except you need to use PHP to either dump to a text file (which I dont think will end up working)..or use PHP to export the text to an XML file.. (not both)

    you then use flash to load this XML file (much the same way you would a textFile)

    well what part do you NOT understand? and we can start there.. I have some links in my footer you may want to look over...

    like the xml101 link its gives a nice overview on using XML in FLASH with code.

    How you want the data displayed will also depend on how you save/format it..

  10. #10
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    I build these things or would shut my mouth


    The two problems I have using XML created from upload text is:

    1. characters that will not parse (need entities), not to mention depending on what is written there may be need for CDATA tagging (a guess but a definite possibility since the written word can get complicated )
    2. Size of XML files will grow eventually affecting speed(unless this is taken into consideration and built with a design to negate that issue)

    If you have need of a server (even if locally served on a LAN), since you will need PHP anyway to write, is there a reason you aren't choosing a relational Database (MSQL for instance)? Curious.

    When you onload XML, parse and filter what you want out to reflect individual posts....or load lists of threads created from arrays based on node counts..especially with the XML file sizes growing, it's more efficient to use PHP/MYSQL where you have the benefit of a query that targets what you want server side......no? This coupled with the fact here are far more examples existing on the internet that use inbound/outbound PHP/MySQL than there are inbound/outbound XML as a full interactive,interacting routine seems to be even more appealing to one who has to build something WHILE they learn it I would say.

    Again, asking because I build them and enjoy the topic

  11. #11
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    ok..well, I can be of no help/service when it comes to anythign DB related.. (unfortunately)

    I think I basically explained it the same way? (except not using a DB)..which 'of course' IMHO would be the best way as you have ultimate control over what your pulling into the 'blog'...

    didnt I? I may have been way off..

  12. #12
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    No, you're advice was all good. I should have stayed out of it

    Like I said, I enjoy the subject. I was just tossing thoughts. Sorry man.

  13. #13
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    No way! Im here to learn just like everyone else bro.

    I just didnt understand your first sentence...??

    I need to learn how to do at least basic interaction with a DB sometimes it is way more efficient (like in this case)..

    I need to learn how to:
    a.) create a mySQL DB (unlimited from host)
    b.) create a table
    c.) create my 'headers/columns'
    d.) learn how to dump to & retrieve data.



    so let it rip if you got any links..or suggestions.. and what have you!

    I actually took a class on Intro to Database Management.. but was with Oracle, and using something called SQL+ and SQL Worksheet, and while it introduced me to terminology..andgot me familiar with stuff.. I started to get a little lost when it got to relational tables.....etc..

    and the exercises werent really 'practical' since they were run on already created DB's on the network and run thoruh these 'compliler/worksheet' appz.



    I always appreciate the extra posts..


    p.s. and take it easy on me/us... Im not a programmer like you..

  14. #14
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    I'm just a hobbiest and opensource provider. For the last two years I was off supporting/promoting third parties (Swishmax for the first year and Koolmoves the second year) and some of my MySQL stuff is here at FK in the movie section. I'm getting ready to head off to Flex 2 for 2007 but everything you see listed here at FK under the Koolmoves section will be ported to Flash before I go and submitted. I began as a Flash and Director user years ago so am familiar with most of the platforms and tried to spread the love

    Also have a blog system coming that uses WYSIWYG posting and commenting, two more forums (WYSIWYG) and some other things not listed here at FK.

    Anything that solves his problem right now in a source code, ready to go format in Flash? ...no.

    But you or he or anyone is welcome to any of my backends while I get my stuff recreated in Flash (if you download any of my packages the backends can be used by any flash platform...not just third parties. the data is constructed specifically for flash use as opposed to say php frontends) or I'd be happy to make snippets to do this or that in the meantime. Stop by the site sometime, I'm a pretty easy going guy (I think) and love to hand out code, toss around ideas or help work out dynamic data problems

  15. #15
    Senior Member
    Join Date
    Nov 2000
    Posts
    259
    So let me get this straight...

    I need to learn BOTH XML AND PHP?
    Up the Irons!!

  16. #16
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    At the bare minimum you should learn PHP. At some point your flash frontend will have to write and flash needs help to write (an intermediary like PHP).

    I think what you want is a guestbook or shoutbox that visually resembles a blog and only four people are allowed to use. It would be simple but would allow four users to send text as a string to be added (concatenated) to the whole.

    Blogs as I know them use categories, posts retrieved based on category choice, commenting based on permission as well as category, live editing, live additions based on category, deletion of the same, RSS backend retrieval based on same, and etc etc.

    What you are describing and seem to need is in fact a guestbook of sorts in which case I will get out of your hair.

    Sorry to have jumped in Whispers

  17. #17
    Senior Member
    Join Date
    Nov 2000
    Posts
    259
    "I think what you want is a guestbook or shoutbox that visually resembles a blog and only four people are allowed to use. It would be simple but would allow four users to send text as a string to be added (concatenated) to the whole."

    Yes, that's kinda it.

    Let me explain a little more specifically:

    It's my band's site.
    We are going to use it for posting stuff band-related.
    Initially, we are going to comment on our recording sessions, for out first single release.
    Later, we will talk about the tours, and any other interesting events. So it's like a bulletin board, with only four users. And we need people to be able to choose posts to read by month and/or author, or if they choose to, read all of them at once, organized by date of posting. That's it.
    Up the Irons!!

  18. #18
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    you will still need some sort of PHP script to take the text input into the field by one of you guys.. and WRITE it to the text file.

    not that hard.. just want you to understand the principle behind the project..

  19. #19
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    And we need people to be able to choose posts to read by month and/or author, or if they choose to, read all of them at once, organized by date of posting. That's it.
    Those are the lines that on face value seem simple but in reality enters the code into a new realm, bringing me back to either a relational DB (mySQL) or if using stored XML (which again needs PHP to write it so if PHP is needed I would bump to SQL since you are halfway there) you will need a pretty advanced design structure (to ensure XML file sizes are not exceeded) as well as frontside parsing to bounce through nodes to filter the data depending on what their filter criteria is (author,date,etc).

    Fun huh? Welcome to dynamic data

    I want all four of us to simply write the txt file, send it to the server and voilá...
    If this were one user you could make this fly. The same user could upload changes to a locally stored text file since Flash also allows integrated fileuploading with the fileReference and could be coded to let you "browse" for the upload file to send up all inside flash and you would not have to worry about other peoples changes because the master text file that is added to and uploaded each time is on your drive under your control. No server side required. This assumes simple display...no searching, no filtering by date or author....just basic stuff as easy as it gets. To add searching ,filtering and display of chunks of the text file is something that will make your head spin so I'll just skip it because anyone fond of their hair would head for xml or sql in a heartbeat instead of pulling it out

    With four users it's a recipe for disaster because the likelyhood of one users upload overwriting another can almost be guaranteed, not to mention one user (user2) may download something that at that moment was current and between the time he is editing or adding his additions, another user (user1) may have uploaded so when he uploads his (user2), he has not only overwritten what the previous user sent up(user1), he also is overwriting using an edited version that is no longer current (user1's additions did not exist when user2 originally downloaded) thereby making whatever user1 added not even have existed forcing user 1 to start over and hope user 2 stands off or hope he can write very fast to not have it occur again

    Now imagine that scenario with four seperate users. The disaster occurs on the upload because some users download...write at their liesure and no two users write at the same speed or have the same habits coupled with the scenario (that will happen) shown above. It's why even text based guestbooks write posts inside the flash itself and use PHP to write the outbound additions (user saved post) so all users get current data displayed in the browser and all additions are written server side at runtime to avoid this dynamic. First come first served and no matter when anyone writes it's always correlated. Make sense?

    If you have to call each other on the phone or schedule when each can/cannot add to the file...well then...it defeats the power of Flash simply due to the choice not to use common methods (there are tons of PHP/Text based guestbooks for flash you could re-use the backends from or at least learn from at no cost) and it will be the most interesting Flash blog in history

  20. #20
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    I'm submitting a Flash Blog system for Koolmoves tonight. If it's popular I will port it over to Flash 8. This is what I think of when I think Blog

    MySQL/PHP Based
    CC (Creative Commons) License
    Admin panel Included (WYSIWYG HTML editor)
    Categories (Unlimited)
    Articles (Unlimited)
    Commenting (Admin can allow or disallow on a per article basis, comments are held for admin approval before addition, comment panes are WYSIWYG HTML Editors)
    Comment Viewers
    Inline (Dynamically built from SQL) RSS Feeds for each category.
    Flash 8 Export
    Runs on one PHP backend (case/break)


    Admin Panel Allows:

    Adding/Editing/Deletion of Categories
    Addition or Deletion of Comments in Waiting State
    Adding/Editing/Deletion of Articles with Full WYSIWYG html editing (colors,fonts,sizes,etc). Admin is also allowed to insert dynamic images unlike the end user comment panel which does not allow it (security)


    Includes all source and SQL dump With Example Cats and Posts


    Other odds and ends

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center