gxm7
March 6th, 2008, 02:13 AM
Hi Folks,
I have a fundamental question about how Flash movies with ActionScript 3 handle file and folder paths and about the AS3 execution process. I have a Flash movie with AS3 code that reads XML files that contain paths to various folders and places them in static variables. The variables are loaded when the class is instantiated. The instantiation happens in the first frame of the movie. The Flash movies are “hosted” by DotNetNuke 4 which is an ASP.NET 2.0 web application framework. DNN uses ascx controls to “page” so the movies are loaded using SWFObject into ascx controls not HTML pages or ASP.NET aspx pages. The process works except for one anomaly which has to do with the paths that are read from the XML files and used to set the source parameters of various components. The first time the page displays everything works as expected. However, if a refresh is done or another page is visited the Flash movie seems to “lose” the paths when you come back to the page that contains it. I added some text components to display the paths. They look OK at first but are missing on a refresh of the page, i.e. a change from one ascx control and back to the one containing the Flash movie. It is almost like the static variables get cleared and the AS3 code does not execute again. Can anyone enlighten me regarding how Flash and AS3 resolve URL paths and exactly when AS3 gets executed? I obviously do not understand what is happening in this application.
Thanks,
G. M.
I have a fundamental question about how Flash movies with ActionScript 3 handle file and folder paths and about the AS3 execution process. I have a Flash movie with AS3 code that reads XML files that contain paths to various folders and places them in static variables. The variables are loaded when the class is instantiated. The instantiation happens in the first frame of the movie. The Flash movies are “hosted” by DotNetNuke 4 which is an ASP.NET 2.0 web application framework. DNN uses ascx controls to “page” so the movies are loaded using SWFObject into ascx controls not HTML pages or ASP.NET aspx pages. The process works except for one anomaly which has to do with the paths that are read from the XML files and used to set the source parameters of various components. The first time the page displays everything works as expected. However, if a refresh is done or another page is visited the Flash movie seems to “lose” the paths when you come back to the page that contains it. I added some text components to display the paths. They look OK at first but are missing on a refresh of the page, i.e. a change from one ascx control and back to the one containing the Flash movie. It is almost like the static variables get cleared and the AS3 code does not execute again. Can anyone enlighten me regarding how Flash and AS3 resolve URL paths and exactly when AS3 gets executed? I obviously do not understand what is happening in this application.
Thanks,
G. M.