ok, basically i have properly gotten php to load into my dynamic txt boxes…callign htem from a php app…etc etc… but heres my question… can php be loaded into a swf that on the main timeline has a movie clip inbedded in it.inside this movie is the dynamic txt boxes etc.
now i also made one with the movies layers on my main timeline.
This worked…
now do i need to use the _root command r anything like that to specify a instance or movie clip to properly display the php…cause right now it only appears in the version on the main timeline.
on the submit button this is the code…
on (release) {
loadVariablesNum(“scriptA.php”, 0, “POST”);
loading = “YES”;
gotoAndPlay(21);
}
then on layer 23 this is what i have
if (loading eq “YES”) {
gotoAndPlay(_currentframe-1);
} else {
gotoAndStop(20);
}
this is frame 20 not monster eye smiley;)
all i want is to make the php appear in the swf with the movie clip…everything is all lines up and now i have to re align everyhting liek 20 swfs perfectly if i choose to do it the other way…
as i can see in your script, you have loaded the php variables in the _level 0, so, you just have to make reference like _level0.variableName, to use it in your mc, or just a _root.variableName. Or you could load the variables within the MC. Any of these shall work. If you find any problem just aks, i work with flash and php.
where would i actually put t hat in… is my script ok or should the _root be in there somewhere… coudl u give me a example of something similar or explain more.
its hard for me to understand that in spanish. kind but. how could i apply the mc_text.load_text.text = this.v1;
type stuff in my actionscript. so stats1 is my movie clip andscore1 one is a input text feild in the clip.
so i got
stats1.score1… now i dont know how to apply that ot my script
on the submit button this is the code…
on (release) {
loadVariablesNum(“scriptA.php”, 0, “POST”);
loading = “YES”;
gotoAndPlay(21);
}
then on layer 23 this is what i have
if (loading eq “YES”) {
gotoAndPlay(_currentframe-1);
} else {
gotoAndStop(2;
}
where would i apply that in here…can u try…?? thanks for the help
yes , to apply the texto in you mc’s text field, you have to do this as you said:
stats1.score1.text = this.v1;
stats1.score1.text is the path to the text field, and this(the object) has the variable v1 wich contains the data from mysql.
another thing, anyone correct me if i am wrong, but one of the worst things to pass just some variables to a mc is use loadVariablesNum, i sugest you to understand how is the exacly function of the loadvars object.
you said you speak spanish did you?
if you’d like to see some portuguese tutorials, you can see a good one at http://www.imasters.com.br there’s a lot of stuff there.
I have the same problem. I’ve tried the loadVars function to load text into my dynamic textfield inside an MC. the text load fine, but the problem is I have HTML tags in the textfile and with LoadVars all those tags print out. It seems like loadVariablesNum is the only one to correctly pass those HTML variables to the textfield…
loadVariablesNum(“guestbook.txt”, 0 ) works fine as long as the textfield is at root, but as soon as I put the dynamic textbox into an MC the text won’t load anymore. I’ve tried putting _root/[mc]/guestbook= in the guestbook.txt file but to no reward.
hi, the php script is fine. it’s when I load it into flash that things become weird. though, when I use LoadVariablesNum it loads fine.
I’ve managed to use loadVariablesNum(“guestbook.txt”, 0) in root and use _root.[MC].guestbook= in the guestbook.txt file. It works great…until I load the whole guestbook.swf into another movie at level 2 and then another movie that loads the second one into level 20… do I need to use 20+2 for level or…?
you said your html tags print out in you dynamic text with the script i pass you. that’s correct, that isn’t the correct sintax to use with html tags, in this case the same line would be written this way:
mc_text.load_text.htmlText = this.v1;
as you can see, you don’t use the property “text” anymore, you use “htmlText”. Try this and see if it works out!
ok i get what ur saying but look at my code i posted in the past few posts. where exaclty do i place the new code. do i place it in a action on the main timeline that contians the mc or do i open the movie clip and apply it in there. this is where im confused… the actual placement of the varable…???..if anyone is williong to look at the code please email me at parabol@parabol-designs.com
help will be so appreciated…as this is keeping our project behind…
maybe he really doesn’t know. don’t assume anything. Some of us are very serverside illiterate. Like me for instance. (so if I got the below incorrect, just correct me please )
PHP is a form of CGI. CGI is a scripting language which can do many things but is most commonly used (I think) for routing data between databases and the viewer of a web page. It is very good at understanding one type of language and then parsing that data into other forms. ie you can use PHP to take data from a database and send it to Flash, AND vis-versa.
i have this in the main time line… yet my data isnt displaying
reason being in the movie clip there is a input text field and a dynamic text field. so when u type in a # int he input it will display in the dynamic. after its been formatted by php. and after u click on a submit button. this code worked on the main timeline to get a number to appear on the dynamic field from php which is named total1
onClipEvent (load) {
loadVariables(“ScriptAtest.php”, this, “POST”);
}
but the php was simple total1 = 6 basically…it didnt take the input cause we cant get the input to reappear when it come from php…php is getting the input cause its stored in the database. we can make it appear staticly but thats not gonna work…
if u wanna see it or need to get in touch with me i can give u link or email me parabol@parabol-designs.com
no, you are doing wrong, not in onClipEvent(load) that script i did to be in a frame. If you will attach to a mc, it’s has to be changed a little. Try to put that script into a frame, if this didn’t work then tell me then i’ll do a example for you everything working and then i send it to you. What about that?