A Flash Developer Resource Site

Page 1 of 3 123 LastLast
Results 1 to 20 of 60

Thread: [MX] actionscript prob

  1. #1
    Senior Member Nutbolt's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    138

    [MX] actionscript prob

    Hi,

    I've got a labelled frame [escape] within a movieclip [mc_salons] on my root timeline but i can't get to it when i click on the relevant button which is in another movie clip [scroller_mc] which is also in my root timeline.

    So I kinda come out of one movieclip onto the root and go straight into another movie clip. I think I need to be mentioning scroll_mc somwhere in my script but I don't know where or how.

    Here's the script I'm using on the button:

    Code:
    on (release) {
    	_root.mc_salons.gotoAndStop("escape");
    }
    Thanks in advance to anyone who replies.

  2. #2
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    you wouldn't need to mention scroller_mc in this situation. From what you're describing, I don't see anything wrong, so you may want to go & make sure that you labeled everything correctly - it's a common pitfall.
    Speaking of this, you should also try & be a bit more consistent with your naming:
    you have "mc_salons", & "scroller_mc" - because of "code hinting", I would vote that "scroller_mc" is the correct labeling format.
    1 Infinite Loop, Cupertino is a portal of Hell.

  3. #3
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274
    instead of putting your code in button directly , better put it on frame :
    Code:
    _root.scroller_mc.onPress = function(){
    	_root.mc_salons.gotoAndStop("escape");
    }
    or , if u want to put the code in Button :

    Code:
    on (release) {
    	_root.mc_salons.gotoAndStop("escape");
    }
    If it wont work again , just check the names , maybe you have writen the name Wrong somewhere ...

    Good luck .

    .PumI.

  4. #4
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    you wouldn't need to mention scroller_mc in this situation. From what you're describing, I don't see anything wrong, so you may want to go & make sure that you labeled everything correctly - it's a common pitfall.
    Speaking of this, you should also try & be a bit more consistent with your naming:
    you have "mc_salons", & "scroller_mc" - because of "code hinting", I would vote that "scroller_mc" is the correct labeling format. Taking that into account as well as the fact that referred to the scroll as both "scroller_mc" & "scroll_mc" in your post, makes me believe it may just be a naming issue. Granted you're just asking a question, but believe me, it helps to make sure & describe everything precisely & accurately.
    1 Infinite Loop, Cupertino is a portal of Hell.

  5. #5
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    pumi,
    Quick Edit - he said his button was inside the scroller, so the code would be:

    _root.scroller_mc.YourButton_btn.onPress = function(){

    ...or something.
    1 Infinite Loop, Cupertino is a portal of Hell.

  6. #6
    Senior Member Nutbolt's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    138
    omg That was so quick.

    Thanks I'll have a look at this and let ou know how I get on. I'll keep an eye on accuracy in future too.

    Thanks

  7. #7
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274
    Yea , you are right , i didnt understand it good ( My english is not so good ) ...

  8. #8
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    Tis cool
    We're all here to help
    1 Infinite Loop, Cupertino is a portal of Hell.

  9. #9
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274

  10. #10
    Senior Member Nutbolt's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    138
    Damn...I did what you guys suggested but its still not working.

    I basically put this script on the actions frame in scroller_mc:

    Code:
    _root.scroller_mc._escape.onRelease = function(){
    	_root.salons_mc.gotoAndStop("escape");
    }
    I triple cheked all the instance names (after correcting the labeling format) But it still doesn't work!

    Any ideas?

  11. #11
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274
    Plz , can u post the file ??

  12. #12
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    yeah, pumi, I agree...
    Though I am a bit concerned about the "_escape."
    1 Infinite Loop, Cupertino is a portal of Hell.

  13. #13
    Senior Member Nutbolt's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    138
    I'm afraid it's a 10mb file and it's too big for the site. can you give me an email I could send it to, plz or a place to upload it??

  14. #14
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274
    You can send to my email : pumi_h@hotmail.com

    Or you can upload it here : http://www.speedyshare.com/.

  15. #15
    Senior Member Nutbolt's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    138
    Excellent

    Here's the link

    http://www.speedyshare.com/554680712.html

    Thanks

  16. #16
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    I'll see what you get out of it, pumi, before I download
    1 Infinite Loop, Cupertino is a portal of Hell.

  17. #17
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274

  18. #18
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274
    Nutbolt , first , i liked this web page ...

    This , wont work because mc_salons is not in the same frame , where is scrollerClip .... I hope you understand me. the button elmina on scrollerClip is working because its not making an MC to go to any frame , but its going to frame salons in Root timeline .

    If u cant do it , tell me i will do it for you ...

  19. #19
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    nice werk, pumi
    movie clip not present in frame, eh?
    see? it's the simple things that can really be frustrating, which is why my signature has that great "simple mistake" quote from Office Space...
    1 Infinite Loop, Cupertino is a portal of Hell.

  20. #20
    Banned
    Join Date
    Mar 2007
    Location
    Albania , prishtina
    Posts
    274
    Yea , it was very simple ... I hope Nutbolt has understood , what was the problem .

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