Results 1 to 1 of 1

Thread: SWFAddress help

  1. #1
    Join Date
    Dec 2007
    Location
    Mississauga
    Posts
    166
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default SWFAddress help

    I am working with AS 3 and using the Caurina Tweener class from Google and I am finding it doesnt work with SWFAddress. If you have SWFAddress code before the tweens they disable completely.

    Does anyone have a basic tutorial for SWFAddress 2.3? I have seen Lee Brimlows and others but they seem to pop up erros when I follow them to a "T" to figure out how it works.

    Any help on this would be great I have ben trying to get anything going for the past 2 weeks.

    If this helps at all I have striped out the tweens and gone right to basics, but for some reason adding the SWFAdress code I get a 1046 error when exporting on line 6 "function onChange(e:SWFAddressEvent):void" Can anyone see what I am doing wrong here because this makes no sense, everything is where it should be.

    Code:
    import swfaddress.SWFAddress.*;
    
    SWFAddress.addEventListener(SWFAddressEvent.CHANGE);
    
    function onChange(e:SWFAddressEvent):void
    {
    	if(e.value !="/")
    		SWFAddress.setTitle("Test - " + e.value.substring(1));
    	else
    		SWFAddress.setTitle("Test - StageOne");
    }
    
    stage01.visible = false;
    stage02.visible = false;
    
    var currentClip:MovieClip = stage01;
    
    btn01.addEventListener(MouseEvent.CLICK, btn01Click);
    btn02.addEventListener(MouseEvent.CLICK, btn02Click);
    
    function btn01Click(e:Event):void
    {
    	if(currentClip != stage01)
    	{
    		SWFAddress.setValue("StageOne");
    		stage01.visible = true;
    		stage02.visible = false;
    		currentClip = stage01;
    	}
    }
    
    function btn02Click(e:Event):void
    {
    	if(currentClip != stage02)
    	{
    		SWFAddress.setValue("StageTwo");
    		stage02.visible = true;
    		stage01.visible = false;
    		currentClip = stage02;
    	}
    }
    Last edited by nate51; 08-28-2009 at 11:16 PM. Reason: Striped the code down to basics

Bookmarks

Posting Permissions

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