A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Im new help with some code please

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Im new help with some code please

    Hi all,

    struggling with as2 code, basically i have a interactive map and when the user clicks a location i want it to play a swf file and go to a defined page.

    currently i am using this code

    on (release){ // on release of mouse click
    loadMovie("movie2.swf","../empty");
    var roomArray:Array= ["Room 017"]; // stores in array for rm004 page

    gotoAndStop(3); // goes to room 017 page

    }

    nothing seems to happen when i click the location.

    Can anyone help me out with this ps im using as2



    Thanks.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    loadMovie("movie2.swf","../empty");

    Wrong. Try:

    loadMovie("movie2.swf","_parent.empty");

    assuming the instance 'empty' is on this code's _parent timeline.

    It's unclear why you are creating a new array with 1 item only.

    gparis

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    2
    thanks for that i tried that, it didnt seem to work. by trial and error i got it working it now says

    on (release){ // on release of mouse click
    loadMovie("movie2.swf",2);
    var roomArray:Array= ["Room 017"]; // stores in array for rm004 page

    gotoAndStop(3); // goes to room 017 page
    }


    it loads the movie but it keeps repeating and dosent load the page i wont it to go to any ideas?

    thanks

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    If you load into a level use loadMovieNum.

    And if there's repetition, it means you have a loop somewhere.

    gparis

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