>
Document class and timeline scripts
Welcome, Guest

by Gagan on Friday, 26 June 2009
Document class and timeline scripts


We cannot use document class and write timeline scripts (in our main timeline) in our flash movie. What we have to do is to write scripts inside some movie clip's timeline. If we write code in our main timeline with document class being used, an error will be generated.

So best way to do such coding is to  write scripts inside some movie clip's or any other components timeline.


Topic Normal 1180: Call to a possibly undefined method addFrameScript
by pooja on 07/18/2009 00:57

Flash gives undefined method addFrameScript error when a Document class that extends Sprite class is used and also the code is written on the main timeline.
But the problem is that the class is extending Sprite class and Sprites are not allowed to have actionscript code on the frames/main timeline.
You could hazard a guess that the compiler is maybe taking the code in each frame, wrapping it up in an anonymous function and then attaching it to the relevent frame using addFrameScript. And when you extend a Sprite this method doesn't exist or is 'undefined', hence the error message.


So the solution is to have your document class extend MovieClip instead, which allows actionscript in the main timeline (since it supports addFrameScript), this way you can have code in the timeline and code in your document class (and have them interact should you need).



Blogger Image
My Blog Title

Product Engineering, software engineering company, Product Development, Product Migration, Product Re-engineering, Product Maintenance, Product Testing Commercial Application Development, Business Software development, commercial software for startups, Application Support and Maintenance, software testing Product Maintenance, Outsource product maintenance, product support and maintenance Product Migration, Product Re-engineering, product re-engineering services Product Research, Product Engineering, UI Prototyping Services Software Testing Services, Quality Assurance services, professional software testers, Load Testing, Functional Testing, Cross Platform, Browser Testing, Test Automation, Testing Tools, software quality analysis Functional Testing Services, software quality analysis, Software Testing Services, Application Testing Services, Functional Testing Types Automated Testing, Automated Testing Services, automation testing, test script development, Automation Test Tools, outsource automation testing Load Testing, Performance Testing Services, Load Testing Tools Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Benefits of IT Outsourcing, Offshore Software Development companies, offshore software development firms Outsource planning, IT outsourcing, IT development services, offshore IT companies, offshore software development Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering