PDA

View Full Version : Newbie question : please accept my apologies


Endtime
01-08-2003, 03:59 PM
Hi guys,

Very new to the whole Flash, PHP scene, and I have a few small questions : apologies in advance for the n00bness of them :D

1) Is it possible to create a preloader that preloaders a html page that has html and flash content?

2) I have a page where I am connecting to a database and pulling down user information ie : name, profession etc.. I then put this information into hidden fields on the page and also add the following into each hidden field :

<input name="hiddenField" type="hidden" value= "<?php print "&name=$name"; ?>" >

A flash file then goes and loads this file and a dynamic field then take the value "&name" and displays the content. Only problem is that flash displays : (if name was bob for example)

bob">

I can remove this by adding an exit command at the end of the php script,

<input name="hiddenField" type="hidden" value=<?php print "&name=$name"; exit; ?>'>

but this leaves the rest of the hidden fields unaccessable. Any help appreciated! :)

jimburton
01-09-2003, 10:06 AM
welcome! :)

you can't load form variables straight in to flash, they need to be in name=value pairs or in an xml doc, so create a second page that just outputs that (either the xml or the name=values...) and load that file instead

Endtime
01-09-2003, 01:35 PM
Hi jim, thanks for the reply! :)

Heres the situation. I have a page (call it name.php) that lists profiles for users that have registered on the site. It scrolls through a database and displays the data as a table.

The name of the user also acts as a link to another php file (call it profile.php) that sends the name ie :

<a href='profile.php?name=$name'>

When this is passed to profile.php it pulls down all the data and formats it so that flash can read it as strings. Now the problem that is causing me to go bald(:D ). The flash movie sits on another page (call it flashname.htm) and this uses :

loadVariablesNum ("profile.php", 0, "GET");

There are a number of dynamic text fields that are then populated with the data that the flash movie pulls down. I was hoping that the profile.php page could format the data and then insert the data into hidden text fields so that when the php has been processed, it just redirects to the flash movie. However this doesn't work as the flash movie calls the profile.php page and not the other way around. If I use the hidden text fields with profile.php, the data that flash calls is incorrect as it not only displays the php variable, but it also displays the html code for the hidden text field it resides in as well.

The only way my tiny brain can think of to resolve this problem is to to get name.php to pass the name variable directly to flashname.htm, which in turn passes the the variable to profile.php and then flashname.htm calls profile.php for the data. But I don't know how to achieve this. :(

I can't seem to find a way to resolve this issue. Any help appreciated! :)