Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-13-2002, 02:36 PM   #1
hektate
Registered User
 
Join Date: Feb 2002
Posts: 22
Question HELP - GURUS NEEDED!!! Strings Arrays and PHP

Hi Folks,
a new problem occured. I created a data base and a php-script which reads data out of the data base and saves it into a variable.
In Flash, first there is a search field, where a user can enter data, then by pressing a button s/he is let to frame 5 where the php-script is startet and moves up to frame 6 afterwards.
Frame 6 askes if the variable from php (which is also identical to a textfield in flash) is still an empty string. If the string is not empty, it shall perform a splitting of the string into arrays and show the data in several textfields (made by duplicate movie clip).
This all works very fine.
The problem, however, is that the data is already returning to Flash that the string is not empty and therefore tries to perform the string splitting. Which at that point is too early for returning results.
For that reason I put the code for splitting the array into frame 90. Than the splitting is performed correctly. But, as I do not know how many data will be in the string, I also do not know how long it will take to load the data and therefore, when the best point will be to ask for the splitting.

Is there a way to tell Flash, when the string is completly loaded?

Yours as always,
Hektate
hektate is offline   Reply With Quote
Old 03-13-2002, 02:42 PM   #2
sfa
The Placid Casual
 
sfa's Avatar
 
Join Date: Oct 2001
Location: Malta
Posts: 1,024
Default

you can either tell the script to send a second variable like loaded=true and check that variable or try using the onClipEvent(data).

SFA

Last edited by sfa; 03-13-2002 at 02:45 PM.
sfa is offline   Reply With Quote
Old 03-13-2002, 02:47 PM   #3
hektate
Registered User
 
Join Date: Feb 2002
Posts: 22
Default

This will not work in my opinion, because I already tell him to wait till the string is loaded, but he still needs time to get it. Can you be a little more explicit what solution you have in mind?
Yours,
Hektate
hektate is offline   Reply With Quote
Old 03-13-2002, 02:50 PM   #4
hektate
Registered User
 
Join Date: Feb 2002
Posts: 22
Default Solution?

I see, you mean I can create that variable in PHP and tell him from there that variable 1 is loaded? That might work. I will try it tonight. Nice idea. Will tell you if it worked out.
Thanks,
Hektate
hektate is offline   Reply With Quote
Old 03-13-2002, 02:53 PM   #5
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

what sfa said...
loaded = true.
do a search on 'swonk' for a full explanation of the suggestion.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 03-13-2002, 03:01 PM   #6
sfa
The Placid Casual
 
sfa's Avatar
 
Join Date: Oct 2001
Location: Malta
Posts: 1,024
Default

The other way I suggested is better though, Load the variable into a MC(change is into an array from here) and have a script on the mc that says:

onClipEvent(data){
split the string into an array;
}

This works perfectly and is much cleaner, also you wont have the movie runningh through the timeline.

SFA
sfa is offline   Reply With Quote
Old 03-13-2002, 10:18 PM   #7
hektate
Registered User
 
Join Date: Feb 2002
Posts: 22
Talking Swonking, he

I guess a preloader can still be called a preloader when it shows an intro while loading the rest of the movie, but ...

loading variables from textfiles, data bases and so on, its a very cute name "SWONKING" !!!
nice term for loads of sh**.

But although I read all thosw swonking files, I still did not grab the solution and I guess I have to try a little more. If a fail I will post again.

Yours as always
Hektate
hektate is offline   Reply With Quote
Old 03-14-2002, 12:20 PM   #8
hektate
Registered User
 
Join Date: Feb 2002
Posts: 22
Talking Solution!

Thanks SFA!
Finally, its up and running. Used the variable version.
Yours,
Hektate
hektate is offline   Reply With Quote
Old 03-14-2002, 01:03 PM   #9
sfa
The Placid Casual
 
sfa's Avatar
 
Join Date: Oct 2001
Location: Malta
Posts: 1,024
Default

As long as it works i guess its ok but you should look into the onClipEvent(data) method, it is the more correct way to do it.

SFA
sfa is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and Arrays Eimos Server-Side Scripting 2 01-01-2004 12:34 PM
displaying Arrays form PHP Andrue ActionScript 1.0 (and below) 6 05-07-2003 08:51 PM
passing arrays from php to flash boyzdynasty Server-Side Scripting 9 04-18-2003 03:12 PM
Passing arrays PHP -> Flash JohnnyS Server-Side Scripting 2 10-08-2002 05:32 PM
Problems with PHP and Arrays lakoutan Server-Side Scripting 4 09-30-2001 10:16 PM


All times are GMT. The time now is 12:19 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.