0 Replies Latest reply on Jun 14, 2006 3:12 AM by norbit

    Flash 6 application upgrade AS1 -> AS2 loaded asset gotcha

      Basically we are upgrading a large flash site from a flash 6 AS1 model, to a Flash 7 AS2 model.

      This has gone well with one exception - the site has a resource of nearly 2500 flash assets that are loaded in by the main application. Within these assets are function calls without scope for example -


      Which in Flash 6 AS1 would be caught by the funciton defined as _global.someFunction();

      We have automated though JSFL the conversion of these function calls prefix them to give them scope - however re-publishing these assets then causes other problems with font mappings, etc... So this means a manual run trough is still required.

      We have also tried to patch the loaded movies by attaching functions to the movie and assigning them to the correct ones in our main application - but this too fails - for instance using a patch such as -

      loadedMovie.someFunction = function(){

      typeof(loadedMovie.someFunction) retruns "function"

      however a call such as


      on the seccond frame of the loaded movie fails to trigger the call and is in-effective. Could this be because the loading movie is AS2 and is not sensitive to the loaded assets script model?

      If anyone out there has any ideas of a work around this type of issue then please post - as manually processing 2500 assets is not something we will relish...