A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Button in Movieclip

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Location
    South Wales
    Posts
    122

    Button in Movieclip

    I have created a simple MC, which is a door opening then stops at the end, i place a button at the end inside the door with an

    unloadmovie(target) as I want to load another movie once the open door has been clicked.

    It just wont work! I tried the same button on the main timeline scene and its fine, but it wont work inside the MC?

    Anyone help?

    Thanks
    Just James....

  2. #2
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    Have the button as a mc symbol instead of a button symbol.

    Regards,

  3. #3
    One day I will understand this
    Join Date
    Apr 2004
    Location
    Norman Oklahoma
    Posts
    142
    I'm trying that per your advice in the other thread. I'll let you know if that does it or not for me.

  4. #4
    One day I will understand this
    Join Date
    Apr 2004
    Location
    Norman Oklahoma
    Posts
    142
    nope... I still can't get it to see that mc thats in the other mc. That makes no sense to me.

  5. #5
    Senior Member
    Join Date
    Feb 2004
    Location
    South Wales
    Posts
    122

    I cant!

    If I use a MC instead of a button, I cant put an action on it?

    I dont understand?

    Thanks
    Just James....

  6. #6
    One day I will understand this
    Join Date
    Apr 2004
    Location
    Norman Oklahoma
    Posts
    142
    you can still put actions on the button... but what Fraggs was saying was just to replace the button with a mc instead.

    And I'm still having the same problems that you are having!

  7. #7
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    If you are going to load something in you don't need to unload it's content first. Loading in a new movie will replace the old.

    Also as the button works on the main timeline you either have some button events on the door-movieclip or the path for the unloadMovie is wrong. Where is "target" located? On the main timeline? In that case use _root.target or maybe _parent.target.

    /Mirandir

  8. #8
    Senior Member
    Join Date
    Feb 2004
    Location
    South Wales
    Posts
    122

    Ah I did It

    I created the MC with a stop action on frame 1, on frame 2 the door opens in the MC untill frame 15 then another stop action.

    Then, I put an instance of the MC on the stage, with an action on it to say:

    On release unloadmovie(themovie)

    and it worked great,

    thanks

    Probably done it the wrong way, but Im learning
    Just James....

  9. #9
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    Hmmm, not sure then Dude, that methods seems to work fine for me. Perhaps I missed something in my explination.

    Regards,

  10. #10
    One day I will understand this
    Join Date
    Apr 2004
    Location
    Norman Oklahoma
    Posts
    142
    no I'm sure its not you... its just now 8:00 a.m here I just pulled an all nighter so I'm sure I'm just delirious...

    thanks for your help... let me get some sleep and get back at it and I'll let you know my findings.

  11. #11
    Senior Member
    Join Date
    Feb 2004
    Location
    South Wales
    Posts
    122

    False Alarm

    No it didnt work, It wont unload the movie, if I try and load a new movie it just sticks it over the top..

    God this is annoying...

    I have got the rollover working fine for the door to open, but onrelease just unloads the current MC not the whole swf....

    Please Help

    Im going mental...

    PS I dont use .root and stuff, because I dont understand it, I just use names...
    Just James....

  12. #12
    Junior Member
    Join Date
    May 2004
    Location
    Sweden
    Posts
    27
    Hi!
    Maybe you´ll get some help from this thread, I asked almost the same question as you:
    http://www.flashkit.com/board/showth...0&goto=newpost

    good luck!

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