Welcome, Guest
  • Author Topic: Is this possible?  (Read 2757 times)

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Is this possible?
    « on: 07/02/11, 06:22 »
    I want to make two text inputs and one text output, and text would be colored according to which text input was used? And I want to make three different movieclips for this.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Is this possible?
    « Reply #1 on: 07/02/11, 14:42 »
    You should use TextFormat to change the color in the output, or you can reuse the same TextFormat and change the color property ... is not neccesary to use three MovieClips. Check TextFormat entry in AS dictionaty to grab some example

    Jorge

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Re: Is this possible?
    « Reply #2 on: 07/06/11, 13:55 »
    Jorge, is it possible that one text area takes data from two sql databases?

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Is this possible?
    « Reply #3 on: 07/06/11, 14:34 »
    This is not the concern of Flash, but your back-end language. Flash just call a script that pass data in any format (name/valu pairs, XML, Remoting) and display. Your back-end make the DB access. If you want to check about how Flash loads data, check http://www.flash-db.com/Tutorials/loadingAS3/

    Jorge

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Re: Is this possible?
    « Reply #4 on: 07/10/11, 10:10 »
    Ok Jorge, I made few changes and right now my guestbook looks like that www.avsb1.byethost2.com. There are two text input modules, two databases, one output and one PHP file to control everything :).

    The problem:
    I don't know how to make PHP file to return entries from both databases according to their input time.
    Btw both inputs work perfect, cause entries are saved in databases.

    P.S. This is my first experience with PHP, before this worked only with Flash. :)

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Is this possible?
    « Reply #5 on: 07/10/11, 12:43 »
    Why two databases?

    Jorge

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Re: Is this possible?
    « Reply #6 on: 07/10/11, 23:30 »
    I have two counters, so they both have to work correctly, is it possible with one database?

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Is this possible?
    « Reply #7 on: 07/11/11, 04:35 »
    Can you elaborate? Why two counters?

    Jorge

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Re: Is this possible?
    « Reply #8 on: 07/11/11, 08:00 »
    Cause I have two inputs and I need counter for each one.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Is this possible?
    « Reply #9 on: 07/11/11, 08:43 »
    Use two different tables in the same database, using two databases sounds like a waste of resources (and more code on the server side)

    Jorge

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Re: Is this possible?
    « Reply #10 on: 07/11/11, 10:08 »
    OK, will try.

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Re: Is this possible?
    « Reply #11 on: 07/11/11, 11:04 »
    I made two tables, but now A input doesn't work and output either :( Need to improve PHP code.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Is this possible?
    « Reply #12 on: 07/11/11, 11:11 »
    Sure, you need to change select. If you're not familiar with PHP, probably can just copy/paste the original code and change the table. The point is that you need to call different scripts from Flash based on the input text. And in the middle you should load also messages from one or another table.
    Another approach is just to add a new column in the table (say type), append this property to the message and filter messages that you show based on this property, in this case you don't need extra tables, just modify the tables you have

    Jorge

    klops12

    • Server what's that
    • *
    • Posts: 20
      • View Profile
    Re: Is this possible?
    « Reply #13 on: 07/11/11, 11:30 »
    Yeah, tried just copy/paste, but as you can see it doesn't work... will try to edit PHP script as far as I can :)

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Is this possible?
    « Reply #14 on: 07/14/11, 15:31 »
    The secret lies in the php code only.
    Flash itself does not care ;)

    It realy depends what you realy want to do.

    If it is only counters, you can do this with differnet fields in an single table.
    If you want to count records, it can be deiiferent tables in the databes.

    But if you are controlling different webshops or alike, you might have differnt databases.

    You can manage everything with a single flash frontend.

    But you have to manage somehow, that the php script knows whicht data is to be delivered.
    happy flashing
    8)
    Ronald