A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: out of ideas

  1. #1
    Junior Member
    Join Date
    Dec 2003
    Posts
    11

    out of ideas

    Hi,
    Sorry i'm going to try one last time, i've attached the fla i'm working on, not that it's looking very impressive. Any suggestions as to why i can't get the buttons in the sub-menu to work? Think i'm just referencing it incorrectly ni the actionscript but i don't know what to change.

    Thanks
    From a complete novice at flash
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Jun 2003
    Location
    Florida
    Posts
    289
    first if you are using it as you have posted it, your first button (MUSIC) is referencing the parent movie (movie.swf).

    I changed the name of the parent movie to music2.swf, and also made a SWF named culture.swf, and they both worked, though they replaced the parent MC.

    I have not played with MX much yet, but I think you need a container MC to load the SWFs into.

    this worked for me...

    code:


    mainMenu_mc.music_btn.onPress = function() {
    loadMovie("music.swf", _root.containerMC); //replace the zero with "_root.containerMC" for each button




    make a MC with a white, no border rectangle the size of the area the MCs load into, line the upper-left corner of the rectangle with the crosshair, place an instance on the stage, name it "containerMC",
    and it should work.

    I would upload the FLA I modified, by I have 2004 and can't save it down.

    Hope this helps!!!
    Last edited by preprint; 12-22-2003 at 05:18 PM.
    If it was easy, everyone would do it.

  3. #3
    Junior Member
    Join Date
    Dec 2003
    Posts
    11
    thanks, i think that will help me with something i'll be trying to do later, but the problem i'm trying to get round at the moment is in the sub menu to the left hand side of the screen. The first button down (matthew Street) i can't get to work. Any thoughts on this one?
    Thanks again for responding, i was starting to give up hope.
    Erin

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Vermont
    Posts
    269
    the problem lies within your 'subMenu_mc' timeline. first off let me tell you how to fix the one button, then you should be able to fix the rest.

    1. copy your original file and name it something else - this is so you have an original to revert back to if you find a better solution - plus i won't get blamed

    2. open the subMenu_mc and on your layer 'Matthew_btn' - delete frames 1 and 2

    3. copy your KEYFRAME on Frame 3 (right click / copy frames) and Paste the keyframe on FRAME 1 of the Matthew_btn Layer.

    4. put the timeline on frame 1 (it should be there), then in the main movie area move the Matthew Street button OUTSIDE of the viewable area (anywhere it does not matter)

    5. save your file

    6. ctrl / enter to view the .swf

    i could explain why it's doing it, but it may get complicated -besides enough rambling.

  5. #5
    Senior Member
    Join Date
    Jun 2003
    Location
    Florida
    Posts
    289
    Originally posted by erin454
    thanks, i think that will help me with something i'll be trying to do later, but the problem i'm trying to get round at the moment is in the sub menu to the left hand side of the screen. The first button down (matthew Street) i can't get to work. Any thoughts on this one?
    Thanks again for responding, i was starting to give up hope.
    Erin

    Sorry I missed your intended problem, but glad I could help with the other.
    If it was easy, everyone would do it.

  6. #6
    Junior Member
    Join Date
    Dec 2003
    Posts
    11
    Hi,
    Thanks, i've no diea why that just worked but it did!! Flash makes no sense to me right now, maybe in a few years it might. ANy hint as to why it did work so i dont' make the same mistake?
    Thanks again,
    Erin

  7. #7
    Junior Member
    Join Date
    Dec 2003
    Posts
    11
    ok, now i just feel really silly, can get first two buttons to work (down to glastonbury) but anything below that is having none of it. Sorry to ask, yet again, but i only copy and pasted what was done before and changed the names so i can't understand why these ones won't work Any more thoughts? I changed them in the mc timeline as well as i did the other two.

    Thanks
    Erin (sorry, this probably seems like a really trivial problem)
    Attached Files Attached Files

  8. #8
    Junior Member
    Join Date
    Dec 2003
    Posts
    11
    Dont' worry, finally sussed it i think, yay!
    Thanks a lot
    Erin x

  9. #9
    Senior Member
    Join Date
    Aug 2000
    Location
    Vermont
    Posts
    269

    glad it worked.

    i'll to try to explain this: when you publish your movie all the frames in the main timeline load and the script ran to produce the actions for the button: subMatthew_btn, the problem is that the button did not exist AT THIS TIME (runtime) - as you will notice that on Frame 1 of subMenu_mc the 'Matthew Street' movie clip DOES NOT HAVE an instance name; it is only named until Frame 3 of subMenu_mc - so all in all, if you name all those submenu movie clips in Frame 1 of the subMenu_mc, your script will work.

    so basically (for Glastonbury):
    1. hide and lock all layers in the timeline for the subMenu_mc, except the Glatonbury layer

    2. go to Frame 1 of subMenu_mc timeline, go to the main stage and click the Glastonbury movie clip and give it an instance name of 'gl' (for example purposes)

    3. then go to the next KeyFrame of the Glastonbury (frame 4 in this case), highlight the mc on the main stage and give it the SAME instance name of 'gl'

    in summary: the instance name in frame 1 is so the the main timeline scripts have an object to write code to.

    hope this explains things.

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