Controlling Movie Clip with actionscript Question

Dear All,
I have a movie clip named A which inside this movie clip
there is another Movie clip named B and inside B there is a listbox
component.
Inside Movie clip A there are 20 frames which at frame 10
there is a stop() script.
My question is how to control Movieclip A to run
gotoAndPlay(11) from MovieClip B when there is a click action to
the listbox?
Please Advise,
Ozhee

if A is on the _root timeline from anywhere in your _level0
swf you can use:

Similar Messages

  • Moving movie clips with ActionScript

    I am trying to move four movie clips with actionscript in a
    circler motion with two buttons, one to rotate the mc’s to
    the left and one button to rotate the mc’s to the right. Here
    is a link to what I am trying to do;
    http://www.us.playstation.com/Lair/
    and it is undrer game features.

    Yes, that's what the code I gave you is intended to do....
    you replace that code with whatever action you need to take to turn
    your movie around.
    I have no idea what your movieclip is doing, but I'm guessing
    by your response that if it was an arrow pointing left to right
    (just an example), you want it to be pointing right to left when
    the left arrow is pressed. If you want an immediate turn around,
    then the simplest way to do that is to have another frame
    containing the movieclip that it moves to where it faces the other
    direction--and to have it appear turned around, from the toolbar
    you select Modify -> Transform -> Flip Horizontal.
    So the movieclip would live inside another movieclip that has
    two frames with stop()'s for each frame. In the first frame you
    would have the subclip facing left to right, and in the second you
    would have it facing right to left. If we call that 2-framed
    movieclip "walker", the code I provided before would
    become...

  • Controlling Movie Clip with as3

    I try to controll my mc. I want put one MovieClip to other.
    i use next code:
    box_mc.addChild(pic_mc);
    but its not working.
    box_mc this is the a box movie clip, in this mc i want put my pic_mc.

    In addition to what dmennenoh said,
    DisplayObject's x and y properties are preserved no matter parent. In your case, it seems, original position of pic_mc is not 0/0. So when you place it inside the box - x and y are the same but now they are RELATIVE TO BOX. So, on screen it looks like it is outside the box but it is inside except that box's x and y are added.
    For instnace, if the original coordinates are pic_mc.x = 200, pic_mc.y = 100 and box_mc.x = 50, box_mc.y = 20, when you add pic_mc as a child, it will have the came x and y but relative to box_mc (not its original container) and on the screen it will look like it is on x = 250 (box_mc.x + pic_mc.x) and y = 120 (pic_mc.y + box_mc.y).
    box_mc's dimensions also change IF pic_mc x and y plus its width and height are outside of original box_mc boundaries. After you add child box_mc.width will be pic_mc.x + pic_mc.width and box_mc.height will be pic_mc.y + pic_mc.height.
    I suspect that because there is a border in the box, you expected objects to placed within the border. Border in the box IS NOT the box but ANOTHER object (child) inside the box. In other words, box is a container. After pic_mc is added - it will contain both border and pic_mc - not border containing pic_mc. You see the difference?

  • Casting a 3d movie clip in actionscript

    Hello All,
    I'm new to flash and actionscripting (i come from the land of ansi c but have traveled extensively). I've created a great animated animated 3d movie clip and want to have them generated on the stage in relation to an xml file. I've gotten this to work with a 2d movie clip but am running into problems casting a 3d object.
    my object (a movie clip - boxContainer with an instance name of boxContainer_mc) is built out of all movie clips in the following way (shown in tree form):
    boxContainer
    -bottomBox
    ---boxFront
    ---boxLeft
    ---boxRight
    ---boxTop
    ---shadowFront
    ---shadowLeft
    ---shadowRight
    ---gradientLeft
    ---gradientRight
    ---gradientFront
    -topBox (this movie clip contains an animation that is controlled through a MouseEvent:Click)
    ---left
    ---right
    ---top
    ---back
    This animates smoothly through flash, but doesn't work when I try to cast the movie clip in actionscript 3 using the following code:
    var boxContainer_mc:boxContainer = new boxContainer();
    addChild(boxContainer_mc);
    When I try to test the swf file I recieve the following errors:
    1046: Type was not found or was not a compile-time constant:boxContainer
    1180: Call to a possibly undefined method boxContainer
    any ideas?

    If this is a library item that you named boxContainer in the library, you need to designate that name as the linkage ID for the movie.  Right click on it in the library, select Linkage from the menu that appears, and in the interface that appears select the Export for Actionscript option (another will be slected automatically).  Be sure your Class name appears as you have it coded and click ok.

  • How to control movie clips using mause scroller...?

    ....please look
    http://www.nagaoka-id.ac.jp/gallery/gallery.html
    ...how to control movie clips using mause scroller...?

    Hi Ldavinci, I have noticed your posts on that particular
    site before. Just chiming in here... don't be afraid of Flash Help
    menu. There's a wealth of information there and I've found it much
    faster than waiting for a response from the forum. Then if it still
    doesn't make sense, at least you have a basic idea of specifics to
    ask.
    If you search for mouse wheel, you'll see an example under
    the Actionscript 2.0 Language Reference on this topic. That said,
    here's the example:

  • What type of movie clips are handled by the ipad? I have shot a movie clip with my canon camera and the file is .AVI.  will this load onto ipad?

    what type of movie clips are handled by the ipad? I have shot a movie clip with my canon camera and the file is .AVI.  will this load onto ipad?

    Per http://www.apple.com/ipad/specs/
    AirPlay Mirroring to Apple TV (2nd and 3rd generation) at 720p
    AirPlay video streaming to Apple TV (3rd generation) at up to 1080p and Apple TV (2nd generation) at up to 720p
    Video mirroring and video out support: Up to 1080p with Apple Digital AV Adapter or Apple VGA Adapter (adapters sold separately)
    Video out support at 576i and 480i with Apple Composite AV Cable (cable sold separately)
    Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format

  • Copying movie clip with flv

    Hi, I am trying to copy a movie clip with an flv in it from
    one project to another. Everything works fine except the flv just
    keeps trying to load and never plays. I am not sure what to do. Any
    suggestions?

    It sounds like you are using the FLVPlayback component to
    display the FLV, in which case, the FLV is a separate file and
    likely needs to be in the folder next to the new project. Go back
    to the old project and copy the FLV from its location there to the
    new projects folder.

  • Noob help: Triggering Movie Clips with Buttons

    Hi guys,
    I'm taking an intro Flash and Action Script class and for my final I need to create a portfolio project that contains 5 unique buttons that trigger 5 unique movie clips. I'm having a hard time with this. I've been able to trigger the 1st movie clip with the first button (although I can't stop it) but I can't trigger any ohter movies with any other buttons.
    Here's my code:
    stop();
    chuck1_btn.addEventListener(MouseEvent.CLICK, playMovie);
    function playMovie(event:MouseEvent):void
        spaceship_mc.play();
    chuck2_btn.addEventListener(MouseEvent.CLICK,playSaucers);
    function playSaucers(event:MouseEvent):void
        saucers_mc.play();
    Nothing happens when I click on chuck2_btn when I test the movie. I think I need to create a variable or class but I'm not sure. I'm a super noob with this stuff. Any thoughts? Thanks!
    Rick

    You should learn how to use the Help documentation to find answers like how to use the visible property.  For the code you showed earlier, here's what you can try in frame 1 to replace it.
    stop();
    spaceship_mc.visible = false;
    saucers_mc.visible = false;
    slideshow_mc.visible = false;
    chuck1_btn.addEventListener(MouseEvent.CLICK, playMovie);
    function playMovie(event:MouseEvent):void
         spaceship_mc.visible = true;
         saucers_mc.visible = false;
         slideshow_mc.visible = false;
        spaceship_mc.play();
    chuck2_btn.addEventListener(MouseEvent.CLICK,playSaucers);
    function playSaucers(event:MouseEvent):void
         spaceship_mc.visible = false;
         saucers_mc.visible = true;
         slideshow_mc.visible = false;
        saucers_mc.play();
    etc...
    It could be refined, like having a function that hides everything and using that every time before making the one you need to show visible.  You might find it necessary to include telling the movies to gotoAndStop(1) as well.
    That's about as generous as I'm going to get.  It's important that you learn things, and handing you a solution isn't going to help do that.

  • Check for movie clips with AS?

    Is it possible to check if a frame contain a movie clip with
    AS, and then if movie clip is found run a function? Like a global
    "event handler " for movie clips.

    I want a function that automaticly can detect and fade in any
    movie clip found in any keyframe in the main timeline. So i don't
    have to make
    In the first keyframe in the main timeline
    on (ohh here i found a movie clip)
    //let's run a nice fade function on that movie clip
    mx.transitions.TransitionManager.start
    (eval(TheClip),
    {type:mx.transitions.Fade,
    direction:0,
    duration:1,
    easing:mx.transitions.easing.None.easeNone,
    param1:empty,
    param2:empty
    Something like that

  • Buttons, movie clips and actionScripts

    I've created myself conundrum. In my test movie I have
    created two named frames on the screens timeline (home, box); each
    content frame consists of a movie clip with a button in it
    (home_btn, box_btn). What I'm attempting to do is have the home_btn
    button call the movie in "box" and have the box_btn button call the
    movie in "home".
    If I don't use movie clips the is a simple task,
    home_btn.onRelease = function() {
    gotoAndPlay("box"); }
    but as soon as I place the buttons inside a movie clip the
    navigation ceases to work. I'm assuming I'm getting beaten as
    something very basic, but unfortunately I can't find it.
    Anything thoughts would be greatly appreciated. Thanks
    locoLindy

    Perfect! That fixed the problem. Many thanks for your help,
    I'd have toiled with that for days!
    Again, that's for your help!
    locoLindy

  • Exporting a move clip with alpha channel

    Hi there,
    I’m trying to export a move clips with alpha channel.
    I’m trying to export an animation with Premiere CS5. I made an animation of a rotating object in Maya and exported it with alpha channel as tiff images. Then they are edited with Photoshop to give them a drop shadow.
    My problem is this. Can I export this tiff animation with the alpha channel?
    My plane is to use move clips over backgrounds in a game – depending on the result there are different animations playing on top of several different backgrounds. There for the objects has to have a transparent/alpha channel over the backgrounds.
    Again the reason for this is the complexity of the game and to make the game looking as real as possible. I’m hoping for some help here to make my plan possible
    …thanks

    Thanks alot for the help.
    But now I’m wondering how to get the file size down?
    The 32bit and alpha channel just increase the file size from about 1MB to 9,3MB, which is pretty much??
    …any ides mate?

  • Help with assignment- buttons that control movie clips

    I am pretty new to flash and my professor gave us an assignment with little help or tutorials.
    He wants us to create a SWF that features a house and it's front yard and two buttons.
    One button that says Sunrise, and one that says Sunset.
    When I push the sunrise button, the sun needs to rise above the house and stay there.  When I push the Sunset button, it needs to set- and then a ufo needs to land on the lawn.
    So i think I have a pretty good grasp on the assignment, but the actionscript is throwing me off.  How can I make buttons that will control the sun movie clip to rise- stay above the house, and then set?  The ufo is a whole new matter.   The sunset button should make the sun lower and then a ufo land on the lawn.
    Please help explain/link me to the proper tutorials.   One thing that i'm worried about is that the sun will rise- and then stay above the house even if i click the sunset button.
    Your help is greatly appreciated.

    Well i can think of a few ways to do this.
    Depending on what you have been taught so far you should be able to do this if you know how to make a button, a movie clip, and the basic script for the timeline. ie. play,stop, gotoandplay etc.
    I understand you have been set a task and you want the answer straight away. But i doubt he would have given you anything you couldn't handle. Also I learnt more from trial and error and searching the net than from most of my teachers at coll and uni, It's frustrating i know, but the buzz you get when you finally crack it is amazing. Stick in there!
    That being said i remember the panic I suffered and like to help so here's a thought:
    You could just have the 2 buttons play a basic movie clip. The sky could rotate one way to make the sun rise and add a "stop" in the actions to make it stay there, and to the left to sunset with both images together but not being shown all the time by using a mask. You could even add in the ufo to the clip but this would only work if you added an extra part to the movie so that when the ufo has landed it flys out again and then begins to rotate the sun and moon again. ( buttons would be dissabled during the play modes to avoid chaos) This is just a quick thought. I'm sure there are several ways of doing this depending on how fancy it needs to be.
    If your teacher really has given you no notes on buttons,movieclips and actionscript i would sujest Adobe TV. Nice videos that explain step by step. OR try downloading a tutorial file with buttons and movie clips and look at the coding they use in the file. Thats how i have learnt most of it since finishing Uni.
    Good Luck
    Cobie

  • Play multiple movie clips - with sound

    Hello Forum members,
    I am a total new comer in terms of flash and action script,
    self-educated and Adobe forum and internet educated. I can now
    click a button and stop and start a movie clip, use attachMovie,
    and even mute sound in a movie clip (not video). I am currently
    using Flash 8, and waiting for CS3 (downloaded a trial, and like it
    better than Flash 8).
    Enough history - now to my question - I have an application
    that had 3 scenes. I read in some Adobe article
    "Flash Best Practices" that it was not a good idea to use
    scenes in an application. I converted my Scene 2 and Scene 3 into
    movie clips.
    I figured I could either put each movie clip on a separate
    layer in my timeline (mc_scene2, mc_scene3)
    and play them, one after the other (did not quite work, more
    later). Or...
    copy the timelines from the scenes, and add those frames to
    my Scene 1, making a application with both scenes staggered one
    after the other in the main timeline. Or...
    Keep Scene 1 and at the end of scene 1,
    attacheMovie("mc_scene2", etc) and when scene 2 was done play and
    or attach the final movie clip (mc_scene3).
    I could not figure out how to tell when mc_scene2 was done
    using the attacheMovie method, so I could then attach mc_scene3,
    etc.
    How would I be able to tell when one attached or loaded movie
    clip is finished, and then start the next one?
    Or what is the suggested way to use actionscript to load a
    movie, play it, and when the clip is done, load and play the next,
    etc.
    Thanks for a good forum,
    eholz1

    Hello Again - I guess there is much that I do not understand.
    I followed the tip above - or so I thought.
    I have "buttons" on my movie clips that play the clip when
    clicked.
    I have placed stop actions in frame 1 of each movie clip.
    I tried placing mc_scene2 and mc_scene3 on their own layer
    in the timeline,
    and put the code above in my actions layer (Scene 1).
    it seems that nothing really works - the _visible property
    seems not to work,
    etc - I must be doing something wrong. What layer should the
    two mc's be
    placed?
    Thanks for the info
    Eholz1

  • Menu made in movie clip - with sub-section we can click on to go to another frame

    I would like some help about that:
    I want to do a menu made all in movie clip (NO button). In
    this menu, when we click on one of the part (sub-section) of the
    button (which is a mc), we must go to another frame in the main
    scene.
    It is working for the roll-over and mousedown for my button
    (with the _up, _over and _down labels). But it's not working then
    to put, i don't know, another movie clip inside with alpha 0 to
    make another onRelease and then gotoAndStop(20); ...
    Here is the code I have in the main scene (first frame):
    stop();
    mon_clip_mc.onRelease = function() {
    //this._root.gotoAndStop(20);
    And here is the code I have in the first frame of the movie
    clip of the button:
    stop();
    I'd really appreciate some help! Thanx

    lalapinerouge,
    as far as I can see with your method for buttons, is that it
    only reads 1 button inside mon_clip_mc..
    I cant figure out why, i've tested it over, made new fla's
    with your method, and i still cant get it to work, nor do I
    understand why..
    I need to study abit more.
    Maybe someone in the Forum will have a look at this topic,
    and know what's going on with your method.
    In the mean time, heres a submenu I made for a site a while
    ago. This doesnt use timeline actionscript, ( because i was a
    newbie then ) =)
    if you have a look through the whole FLA, ( it's quite abit)
    you can get an Idea of how i do my movie clip buttons, till this
    day, i still use the same method, only i use mainly timeline
    actionscript..
    the main point to notice is that EVERY button ( even submenu
    ) is it's own movieclip...no button in there holds multiple sub
    buttons inside... This gives you complete control of each button,
    and endless possibilities for animation, tweens, and anything extra
    you would want to add to a button.
    Sorry I couldnt help you figure out your problem fully. Im
    still going to mess around with it abit more to see if i can figure
    it out..
    Hope you can addopt some useful info from this FLA.
    HERE

  • Simple Button to Control Movie Clip

    Hello,
    I was relatively comfortable with AS 2.0, but am having a
    hard time warming up to 3.0. I feel that this should be something
    simple to find help online with, yet I'm finding it difficult to
    get a simple answer.
    I have a button that is inside a movie clip within another
    movie clip:
    mainMenu_mc > whoBtn_mc > whoButton
    This button appears to work fine controlling a movie clip on
    the same timeline. This is the code so far (on an Actions frame in
    WhoBtn_mc):
    whoButton.addEventListener(
    MouseEvent.CLICK,
    function(evt:MouseEvent):void {
    whoGlow.gotoAndStop("click");
    I have another movie clip on the main timeline that I would
    like to control with this button:
    blackFadeBottom_mc
    What would the code look like for this?
    Any help is appreciated - Thank you.

    Thanks, I was able to place the code on the main timeline and
    get a trace when I clicked on the movie clip instance itself. I
    probably didn't explain what I was trying to do very well, so I
    apologize.
    What I need to do is to control this movie clip that is
    physically placed on the main timeline (fadeBlackBottom) with the
    button that is buried under two other movie clips
    (mainMenu_mc>whoBtn_mc>whoBtn).
    I would like the whoBtn to tell the fadeBlackBottom movie
    clip to (what used to be)
    _root.fadeBlackBottom.gotoAndPlay("play"); This will drop down a
    box that will contain the content of my 'Who' link.
    How can I accomplish this?
    Thanks again,
    Chuck

Maybe you are looking for