A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Problems moving project to CS4 or republishing in CS3

  1. #1
    Junior Member
    Join Date
    Jan 2006
    Posts
    25

    Problems moving project to CS4 or republishing in CS3

    Hi All.

    I just finished helping out a friend with a CS3/AS3 project and I put it into an archive. After that I uninstalled CS3 and installed CS4, Here's what happened, when I went back to my archive and just re-published.

    1) During the CS4 publish process, the output panel spits out a bunch of 1009 TypeErrors.

    2) Not wanting to figure that out immediately, I went to a virtual machine that I had an existing install of CS3. Now, ExternalInterface.marshallExceptions = true causes a 1119 error Access of possibly undefined property marshallExceptions through a reference with static type Class. I even went as far as to uninstall CS4 and re-install CS3 on my regular computer - no joy.

    I have two problems - why CS4 does produce - Error #1009: Cannot access a property or method of a null object reference when CS3 didn't

    and then more strangely why I can no longer correctly publish my final CS3 project using a CS3 installation.

    Help please....and thanks in advance for any ideas.

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    When you were working in CS3, what version of Actionscript did you build in? Do you have an example line that is causing the error?

    I have CS4 on one machine and CS3 on another and I've never had any problem building between the two versions, unless I forget to provide a type of a declared variable, or include an import....but those are my issues and not with Flash.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    Jan 2006
    Posts
    25
    Okay one error for each of the two problems. Honestly, I can understand that moving my project for CS3 to CS4 could cause something. What I really don't get is that a clean install of CS3 no longer builds my archived project - where the thing that changed was uninstalling and re-installing. Argh!

    Oh just so I'm clear, I'm not a coder. I'm one of those where a little knowledge can prove dangerous. Well at least the stuff was build-able before and is working. Too bad I can't re-create it that from the same files I used to publish it in the first place.

    =====================================

    The output error in CS4:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at sound::soundCtr$/playBGSound()
    at menu::PassPage()
    Code:
    	public class soundCtr 
    	{
    		private static var bgSoundLink:String = "" //current playing sound name for  bg
    		private static var bgSoundLoop:Boolean = false;
    		//play the background sound as loop sounds
    		public static function playBGSound(link:String, loop:Boolean = true):void {				
    			if (link == "" && bgSoundLink != "") {			
    				if (bgSoundLoop) {
    					bgChanel = soundCtr[bgSoundLink].play(0, 10000);
    				}else {
    					bgChanel = soundCtr[bgSoundLink].play(0, 1);
    				}
    }
    }
    =============

    The compiler error that wasn't there when I published the project in my original install of CS3, but subsequent CS3 re-installations produce this error when the project is published.

    1119: Access of possibly undefined property marshallExceptions through a reference with static type Class.

    Code:
    public static function saveScore(score:int)
    		{
    			ExternalInterface.marshallExceptions = true;
    			ExternalInterface.addCallback("g", g);
    
    			try
    			{
    				ExternalInterface.call("Something", "<score>"+score+"</score>");
    
    			}
    			catch(e:Error)
    			{
    				trace(e)
    			}
    		}
    
    		public static function g()
    		{
    			throw new Error("exception from actionscript.")
    		}

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    SoundCtr is looking for something called bgChanel that doesn't exist (or isn't declared anywhere).

    As for the externalInterface problem - that's a fairly new method in the code base and I'm guessing that you're targetting an older flash player that doesn't support it - make sure you're using Player 10 in your publish settings...if it's still flipping out, you can probably comment that line out - just make sure you're using firebug for js errors and the debug player for flash exceptions.
    Please use [php] or [code] tags, and mark your threads resolved 8)

  5. #5
    Junior Member
    Join Date
    Jan 2006
    Posts
    25
    Forgot to say thanks for the illumination.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center