Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2006
    Location
    North West England
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Calling all ActionScript Programmers

    Hi guys

    really new to Flash and Actionscript but here is the problem i have anyway..

    i am working on a project that uses multiple scenes, in one scene i have three buttons which when clicked should go to one of three other corresponding screens. I have given the buttons Instance names and have then added code in a seperate actions layer.. here is the code

    Code:
    stop();
    
    Made_btn.onRelease= function() {
    	gotoAndPlay ("Made",1)
    };
    Made_btn is the instance name of my Button symbol and "Made" is the scene i wish it to travel to

    If i add code directly to the button itself using

    Code:
    on (release) { 
    gotoAndPlay ("Made",1); 
    }
    this works fine... but when i use the top code on a seperate actions layer i get nothing?? I have tried google to figure out why but everything i have tried doesn't seem to work? I know using scenes is rubbish but i have to for part of a project. Any insight into my problem would be greatly appreciated

    Thankyou

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Can you attach your .fla file? Put in a zip file and attach it or upload it elsewhere and give us a link to it.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Sep 2006
    Posts
    122
    Thanks
    4
    Thanked 2 Times in 2 Posts
    I'm confused! What you've typed seems perfect? its a logn shot but try correctly formatting it:

    Code:
    Made_btn.onRelease = function(){
    	gotoAndPlay("Made", 1);
    }
    also make sure Made_btn is the instance name, not the normal name of the symbol and also be aware of capital letters

  • #4
    New Coder
    Join Date
    Aug 2006
    Location
    North West England
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your input, i gave that a try but it still doesn't work!? weird! i always name my symbols with the word 'symbol' at the end anyway eg. Made_btnSymbol So i can't get confused to which is which.. I'll keep trying anyway

    Cheers

  • #5
    Regular Coder
    Join Date
    Sep 2006
    Posts
    122
    Thanks
    4
    Thanked 2 Times in 2 Posts
    If you upload the FLA I'll sort it no problems


  •  

    Posting Permissions

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