• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 542
  • Last Modified:

External AS file vs. ActionScript on Frames (Timeline)

I would like to know if it is possible to recode my FLA file (Flash CS4 Pro, ActionScript 3.0) to have all of the timeline actions in an external file.  I understand I might have to use classes and packages if I do this, for which I would need instruction on how to do that.  

The reason I used the timeline in the first place is to call functions as objects appear on the timeline at specific points and NOT call them when the objects are not present--all to avoid "null object reference".  I still get the null object reference and I don't know why.

Any help is greatly appreciated.

Also, what does the syntax frame2:16 mean in the output panel during testing the movie?  (what does the :16 represent?)

Sincerely,
markerline
0
markerline
Asked:
markerline
  • 3
  • 3
1 Solution
 
rascalpantsCommented:
you should still be able to use an external AS file, but that is basically the same as putting all code on frame 1 and using an include.

Classes are a totally different beast, that from just what I "ASS U ME" about your programming abilities might be way over your head.

Learning AS 3.0 using classes is definitely the best for the project, but not always best for the timeline of the project.


that syntax error means that the error is on frame 2, line 16

rp / Zone Advisor
0
 
markerlineAuthor Commented:
Yes rp, classes are over my head at this stage of my learning Flash ActionScript.  Who knew that AS 3.0 would be a completely different beast from AS 2.0 .

It's funny that you should give me the syntax for that frame.  I retested my movie and got a message of frame1:20 but I looked in all of my AS codes that reside on frame 1 and nothing even extends that far with the exception of one bit of code which was commented out on line 20.  This would lead me to believe that either 1) commented lines are not included in line numbers or 2) the line number 20 is a cumulative number consisting of adding all of the AS frame 1 layers up into a single block of code and then seeing what lies on line 20.

Thanks for your help rp
-markerline
0
 
rascalpantsCommented:
actually it would give u a layer descripter as well, so it should not be all of the layers combined.

plus, there is no reason to put code in different layers, if u setup the document the right way.

BTW... AS2  and AS3 are actually quite similar, but the method of programming is different.  it is an observer model now, which helps with keeping ur code loosly coupled... or less reliant on other parts of the code/application

rp / za
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
markerlineAuthor Commented:
The only reason I separated into layers was because initially I was getting "null object references" when I put everything on frame 1 and extended it to fill the entire timeline.  So I then proceeded to put only one set of actions on frame 1 extended to the full timeline and then introduced other actions at specific frames where new objects appeared on the stage at that frame on the timeline.  

Maybe I should return to putting everything on frame 1?

-markerline
0
 
rascalpantsCommented:

yes, you should put everything in one frame...  


what is the status of this question?


rp / ZA
0
 
markerlineAuthor Commented:
Dear rp:

Thank you for being patient with me.  The nature of this question was geared towards an academic project with a specified deadline.  Since I could not come to a resolution with Adobe Flash, we utilized Adobe Acrobat as a semi-interactive platform where pages could be viewed with the click of a form-element button (like a fast-forward or rewind or hyperlink).

I will revisit the Flash file in the coming days.  As for now I will close the question and reopen it if further investigation is necessary.  Thank you very much for all your responses.

Sincerely,
markerline
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now