A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: a simple problem

  1. #1
    Senior Member flashfriend8's Avatar
    Join Date
    Oct 2004
    Posts
    146

    a simple problem

    I am somewhat new to Flash Actionscript, and I already have a problem. Every book I have ever got (which is quite a few), says that I can access a movieclip’s timeline by attaching something like

    on (press)
    {
    movieClipName.gotoAndPlay(“nameofframe”);
    }

    to a button on the main timeline. I have tried to do this many times, but it never has worked. I click on the button, and nothing happens. If anyone could help me, I would be very grateful.

    My Computer/Flash information is:
    Flash version—7.0.1, MX 2004 Educational
    Operating System—Windows XP Home Edition

    Thanks!

  2. #2
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    you just want it to goto the frame? then you would put

    on(press);{
    gotoAndPlay("framename");
    }
    Last edited by AnimePanda; 10-26-2004 at 10:18 PM.
    www.flash-matic.com

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Is the targeted movie clip present on the timeline on the same frame the button calls this action?

    Does the movie clip on stage have an instance name or just a Library name, which is quite different?

  4. #4
    Senior Member flashfriend8's Avatar
    Join Date
    Oct 2004
    Posts
    146
    I tried just getting rid of the "movieClipName." bit, the button still isn't doing anything.
    This is the file I've been trying to work on.

    Thank you

    Also, I'm sorry, but I don't exactly have huge Actionscript Vocab.

    Did you mean to put a ; after the on statement? That brought up a syntax error.
    Thanks!
    Attached Files Attached Files
    Last edited by flashfriend8; 10-26-2004 at 10:40 PM.

  5. #5
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    Please save it as MX not MX 2004 i dont feel like switching PCs
    www.flash-matic.com

  6. #6
    Senior Member flashfriend8's Avatar
    Join Date
    Oct 2004
    Posts
    146

    Howa wha?

    How do I save as MX?

  7. #7
    Senior Member flashfriend8's Avatar
    Join Date
    Oct 2004
    Posts
    146

    nevermind

    Nevermind. Here it is.
    Attached Files Attached Files

  8. #8
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    o i c what you want. you need to lable the MC

    on (press) {
    mc.gotoAndStop("green");
    }


    name the MC that turns green "mc" (without quotes)

    Hope thats what you wanted
    www.flash-matic.com

  9. #9
    Senior Member flashfriend8's Avatar
    Join Date
    Oct 2004
    Posts
    146

    patch

    I think I must have a bug, because, i can type exactly that in and it won't work.
    Thanks though.

  10. #10
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Your clip has to have an instance name... I've used the same as it's Library name...
    Last edited by oldnewbie; 12-02-2004 at 11:48 PM.

  11. #11
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    Thats very strange here is the .swf with that exact script and it does what you want. do you also want it to turn back if you click the button again? Hope you fix it soon. mabey it doesnt work in 2004 but i use regular MX so i dono

    http://www.flash-matic.com/actionscriptbutton.html
    www.flash-matic.com

  12. #12
    Senior Member flashfriend8's Avatar
    Join Date
    Oct 2004
    Posts
    146

    level?

    How did you know to put level 0?
    Last edited by flashfriend8; 10-27-2004 at 07:59 PM.

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