A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: Strange things happening... scripted buttons within mc... not working...???

  1. #1
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    Ok...

    I have a movie clip... and it has a button inside it.

    to the button i have attached this code:

    Code:
    on(release) {
       gotoAndPlay ("main menu","artist");
    }
    when i test my movie, the buttons rollover fine, but it doesn't recognize the code i attached to it... i don't get any errors in the generator... but it won't take me to the other part in the movie labelled "artist"...

    i'm confused!

  2. #2
    I Mastered Dead Technology TallGuyLittleCar's Avatar
    Join Date
    Nov 2001
    Location
    looking for my lighter
    Posts
    669
    on (release) {
    _root.artist.gotoAndPlay("main menu");
    }

    you may need an underscore between main and menu.

  3. #3
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    tried it...

    still doesn't work.


  4. #4
    I Mastered Dead Technology TallGuyLittleCar's Avatar
    Join Date
    Nov 2001
    Location
    looking for my lighter
    Posts
    669
    doh

    is artist on the main time line?

    is the movieclip instance named artist.

    sorry if you already know this

  5. #5
    Senior Member vucjak's Avatar
    Join Date
    Mar 2002
    Location
    BanjaLuka, RS, Bosnia
    Posts
    306
    Originally posted by lafunk
    Ok...

    I have a movie clip... and it has a button inside it.

    to the button i have attached this code:

    Code:
    on(release) {
       gotoAndPlay ("main menu","artist");
    }
    when i test my movie, the buttons rollover fine, but it doesn't recognize the code i attached to it... i don't get any errors in the generator... but it won't take me to the other part in the movie labelled "artist"...

    i'm confused!
    ------------------------------------------


    As I see the "main menu" is name of your scene
    from a MC you neet to target it with "_root",
    or "_parent".

  6. #6
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    ok... here's the lowdown...

    my movie has about 4 scenes...

    the second scene is the main menu.
    the frame label is artist.

    i've never had this problem before.

    each time i've made a movie clip with a button inside, i've given it:

    Code:
    on(release) {
        gotoAndPlay ("scene", "frame");
    }
    i can't figure out what i've done wrong this time...

  7. #7
    Senior Member vucjak's Avatar
    Join Date
    Mar 2002
    Location
    BanjaLuka, RS, Bosnia
    Posts
    306
    Originally posted by lafunk
    ok... here's the lowdown...

    my movie has about 4 scenes...

    the second scene is the main menu.
    the frame label is artist.

    i've never had this problem before.

    each time i've made a movie clip with a button inside, i've given it:

    Code:
    on(release) {
        gotoAndPlay ("scene", "frame");
    }
    i can't figure out what i've done wrong this time...
    -------------------------------------
    simple
    on(release) {
    _root.gotoAndPlay ("frame");
    }

    if your MC is in the timeline of your curent scene where you need to do that AS.

  8. #8
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    here's what I typed in for the button's actionscript:

    Code:
    on(release) {
    	_root.gotoAndStop("artist"); 
    }
    exactly what vucjak told me to...

    tested the movie...

    still doesn't work. (i also tried gotoAndPlay... it shouldn't matter though... right?)

    it's gotoAndStop that i really want to put in there...

  9. #9
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    Ok... I transferred the mc, buttons etc. to another .fla... (because the file I'm working in is HUGE)

    The scroller doesn't work (yet)... but transferred into another .fla, the MC with the buttons inside still doesn't work.

    here's where you can download it (which is the reason I transferred it, so you guys can take a look if you'd like)...

    http://www.geocities.com/windsorparksrec/bunked.fla

    i set it up pretty much like what i have it in my original movie...

    but i didn't make more than one scene...

    not to worry... it still doesn't work.

  10. #10
    I Mastered Dead Technology TallGuyLittleCar's Avatar
    Join Date
    Nov 2001
    Location
    looking for my lighter
    Posts
    669
    o.k. i just tried this

    on (release) {
    _root.gotoAndStop("main menu", "artist");
    }


    it worked. (in a movie i made. looking at bunked)
    However I did have to put a separate stop(); on the frame labeled artist.
    [Edited by TallGuyLittleCar on 05-16-2002 at 12:46 PM]

  11. #11
    I Mastered Dead Technology TallGuyLittleCar's Avatar
    Join Date
    Nov 2001
    Location
    looking for my lighter
    Posts
    669
    Hey lafunk.

    you put a button inside a button

    the ted button is inside symbol84 button. which is what cuases the problem.

    i broke apart symbol 84 and just used Ted Bieler.


  12. #12
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    Originally posted by TallGuyLittleCar
    Hey lafunk.

    you put a button inside a button

    the ted button is inside symbol84 button. which is what cuases the problem.

    i broke apart symbol 84 and just used Ted Bieler.

    the symbol 84 button was a mistake... it should have been the Ted Bieler button... in the original movie (that i'm working on) it's the Ted Bieler button... i didn't even save it with the symbol 84 button...

    i just used that to see if i could make the script work on the stage...

    i've used the code you told me to... and it's still not working in the original movie... (didn't try it in the bunked.fla)

    it takes me back to the beginning of the scene... which is not where the frame labelled "Ted" is... "Ted" is what frame 20 is labelled...

    i do have a stop action in the frame labelled Ted... it's always been there... (I even tried taking it out to see if that worked... it didn't.)

    this is really starting to frustrate me... thinking about throwing my computer and it's contents out the window!

  13. #13
    I Mastered Dead Technology TallGuyLittleCar's Avatar
    Join Date
    Nov 2001
    Location
    looking for my lighter
    Posts
    669
    is it going to the scene "main menu"?

  14. #14
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    the name of the scene is actually Information... but it's going back to the beginning of the scene Information.

    Code:
    on (release) { 
    	_root.gotoAndStop("Information", "Ted"); 
    }
    the beginning of the scene has a menu... when you select the artist button, you go to the list of sculptors (which is what is in the bunked.fla)... click on Ted Bieler's name and I go back to Information:frame 1.


  15. #15
    FlashKit Boobie Queen
    Join Date
    Mar 2002
    Location
    Coolville: Population: Me.
    Posts
    101
    HEY!!

    I got it to work!!

    with this:

    Code:
    on (release) { 
    	_root.gotoAndStop("Ted"); 
    }
    now... i don't know why it wasn't working with that before... because i swear i tried it!!

    i tried everything!!

    when i'm done this little part of my project (ie. the scrolling content part) i'm going to write an tutorial...

    i looked everywhere trying to find a tutorial on how to do this... but i couldn't find one... i'm just using trial and error...

    woohoo!!

    thanks for your help TGLC!

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