6 Replies Latest reply on Jan 14, 2010 12:18 AM by M.S.H

    #include "file_name.as" behavior in AS2

    M.S.H Level 1

      Hi All,

       

      I need few info on #include usage in action script.

      Before moving to the actual problem let me brief about my observation. I have a small weather widget which has 6 frames in timeline and each frame has AS2 code. I can use the variable defined or a function in frame 1 at frame(say) 6 and whole application was working fine. Later I moved the code from each frame to a .as (say app_frame_1.as, app_frame_2.as.... etc) file and included .as file in corresponding frame (I mean app_frame_1.as in frame 1; app_frame_2.as in frame 2). I did not include the .as file corresponding to frame1 in frame2. When I did these changes the application is not functioning as expected.

       

      Can anyone please elaborate on difference between having code in each frame and having #include instead of code?

       

      Thanks for your time and patience.