Hello,
New to OOP in Actionscript… Today I learned about Proxy and I am very, very happy.
However, there is one last major issue that is limiting my programming… I want to be able to run a certain function… after another function has finished.
for example, in the following code, I get an error. From what I can tell, the function that fills a clip with data is quicker than the functions that prepare the clip for the data causing the data to not appear at all (empty clip):
private function cleanPage():Void {
/*
This function checks to see if the page container clip exists.
- if the clip exists, fade out the clip (tween), remove it and then runs the pageReady function
- if clip does NOT exist, run pageReady Function
(note*: The onMotionFinished event that the fade tween trigger is delegated to function removePage)
*/
}
private function removePage():Void {
/*
This function removes the container clip onces completely faded out
*/
}
private function readyPage():Void {
/*
This creates a new clip, names it pageContainer, then sets it to 0 alpha
*/
}
private function showPage():Void {
/*
This function fades in the page container
*/
}
private function changePage(selected_page):Void {
/*
This function checks to see if the page selected is the current page
- if page is the same, do nothing.
- if page is not the same, run cleanPage function, and run content function or class.
(!!!!!!! this is where the problem is. the function or class that fills the container with data runs BEFORE the container is ready... !!!!!!!)
*/
}
How would i solve this problem? what answers, key words do i search for??