Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 18:49
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash and AS 3 (Moderators: papachan, kofi addaquay)
| | |-+  Is this possible?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Print
Author Topic: Is this possible?  (Read 1631 times)
klops12
Server what's that
*
Posts: 20


View Profile
« 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.
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« 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
Logged

klops12
Server what's that
*
Posts: 20


View Profile
« Reply #2 on: 07/06/11, 13:55 »

Jorge, is it possible that one text area takes data from two sql databases?
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« 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
Logged

klops12
Server what's that
*
Posts: 20


View Profile
« 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 Smiley.

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. Smiley
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #5 on: 07/10/11, 12:43 »

Why two databases?

Jorge
Logged

klops12
Server what's that
*
Posts: 20


View Profile
« 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?
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #7 on: 07/11/11, 04:35 »

Can you elaborate? Why two counters?

Jorge
Logged

klops12
Server what's that
*
Posts: 20


View Profile
« Reply #8 on: 07/11/11, 08:00 »

Cause I have two inputs and I need counter for each one.
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« 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
Logged

klops12
Server what's that
*
Posts: 20


View Profile
« Reply #10 on: 07/11/11, 10:08 »

OK, will try.
Logged
klops12
Server what's that
*
Posts: 20


View Profile
« Reply #11 on: 07/11/11, 11:04 »

I made two tables, but now A input doesn't work and output either Sad Need to improve PHP code.
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« 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
Logged

klops12
Server what's that
*
Posts: 20


View Profile
« 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 Smiley
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #14 on: 07/14/11, 15:31 »

The secret lies in the php code only.
Flash itself does not care Wink

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.
Logged

happy flashing
Cool
Ronald
Pages: [1] 2 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!