Hello.
I am having mainly 2 problems in Flash for some time and I need some clarifications on them. Please help.
- Handling pages.
How do I handle working with pages in Flash ?
Do I create a frame for each page and place the content of the page in that frame and when needing to go to a page I simply go to it’s frame ?
Or do I use ActionScript to put and remove content from the stage and create every page in this way ?
What I mean by this is: if a page has a menu and a picture, I use ActionScript to put the menu and the picture there. If the next page has some text and a button, I use ActionScript to remove the menu and the picture from the last page and put the text and the button from the new page.
The first method seems simpler but that means that if the page has some content that needs to be loaded (a picture, for example), this content will need to be loaded every single time the page is opened.
The second method requires more work but is it more efficient ? When I remove the content from the page, do I move it to a negative x and y so that it cannot be seen or do I remove it completely and just load it again the next time the page is opened ?
Please explain to me, as detailed as possible, what do you think is the best method in working with pages.
- Handling a flow communication with PHP.
I constantly need to communicate back and forth with PHP. I use a LoadVars variable to send data to PHP (using “POST”) and I use an XML variable to retrieve data from PHP (I use the “sendAndLoad” method). The data sent by PHP is in an XML structure.
The problem here is that I need to have different channels working. I need to receive several different types of data.
Do I create a set of LoadVars and XML variables for each type of data that I need to receive or do I simply use only the one set and use an ID variable to specify with which type of data I am working at the moment ?
Please let me know if I am clear enough.
Please advise me on these matters as I am having problems in figuring out how to best handle them for a lot of time.
Thank you.