A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: [F5] Play a movie-Clip

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    11

    [F5] Play a movie-Clip

    Hi,

    please forgive me that stupid question, but i don't know how to handle it (in Tutorials i found something, but i didn't work).

    I have a Flash-Movie with several Instances and one scene.

    Furthermore i have a movieclip which is called "Heroes".

    This Movieclip contains an Graphic Object and on the single Instance 60 Frames. In the first frame is Alpha=0, on Frame 30 the Bitmap is Alpha=100% so this is to fade the image in.
    On Frame 30 is Action "Stop", because from 31-60 the image will fade away again.

    In the Main-Movie on the last Frame, i inserted the Movieclip so the Image is fading in and stays visible. The Stage is complete.

    Now i want the Heroes to fade away, when a Menu-Button is pressed.

    So i wrote in the Action-Field from the Button

    on (release) {
    Heroes.gotoAndPlay(31);
    }

    In the hope, the Movieclip plays from 31 to 60, but nothing happens.

    What am i'm doing wrong ?

    Thanks in advance for your time.

    Yours
    Marco

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    first check if you have the right target with this code instead of the one you wrote on your button:
    Code:
    on (release) {
    Heroes._rotation=45;
    }
    does it rotate?

  3. #3
    Junior Member
    Join Date
    Feb 2007
    Posts
    11
    No, it doesn't do anything.

    I thought the target is defined by the "Heroes."

  4. #4
    Modulator Katnap Kaos's Avatar
    Join Date
    Nov 2003
    Location
    A shoebox outside of SM Megamall
    Posts
    149
    Is the movieclip's instance name Heroes or is that just its library name?

    If it is just the library name, you need to change the instance name to Heroes and change the button code to this:

    code:

    on (release) {
    _root.Heroes._rotation=45;
    }

    As a Gamer, you play by the rules.
    As a Programmer, you play as God.

  5. #5
    Junior Member
    Join Date
    Feb 2007
    Posts
    11
    The Library-Name is "Heroes", the Instancename is "Heroesi"

    How is the Syntax for this ?

  6. #6
    Modulator Katnap Kaos's Avatar
    Join Date
    Nov 2003
    Location
    A shoebox outside of SM Megamall
    Posts
    149
    code:

    on (release) {
    _root.Heroesi.gotoAndPlay(31);
    }


    Whenever you want to refer to one object from another, you usually use _root (to take the referal level back to zero basically). Also, whenever you are referring to another object, it is usually the instance name that you are referring to. I think one of the only exceptions is text boxes, in which it would be the variable name that you'd be referring to.
    As a Gamer, you play by the rules.
    As a Programmer, you play as God.

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