Beginner question: linking movie clips.

I am making a dart board game.  I have a target that moves around the board to each of the 82 positions a dart can land and a button stops the target.  Each of those positions is its own MC and is named as such. I also have 82 MCs of a dart animation that travels to all of the possible destinations on the dart board.  I need help with the scripting that will tell a specific dart MC to play when the target is stopped on a particular point. Thank you for your help in advance! I am using cs5.5.

There's not enough info to offer a solution, but here's some things to consider.  When the target stops, you should have some way of determining where it is, by a position number.    Figuring that out would require knowing more about how you move the target and how the button manages stopping it.
Since there are 82 possible positions for it, then your mcs that make up the dartboard could be named/numbered in such a manner (I'd recommend 0 thru 81 since an array might come in handy at some point in the design) and they could be assigned a number property equal to that.  Supposed your board mc's were named as such ... brdmc_0, brdmc_1, brdmc_2, etc... Then you could assign a number to them in a loop using bracket notation to target them...
for(var i:uint=0; i<82; i++){
    this["brdmc"+String(i)].num = i;
Likewise, each of your 82 dart animations could be named/numbered to match.. dartmc0, dartmc1,etc... 
So when you have determined which mc the target has stopped on, you can use that mc's number to tell the associated dart animation to play, again using bracket notation... in the line below, the "boardmc" represents the brdmc# that the target landed on, and you dart
this["dartmc_"+String(boardmc.num)].play();

Similar Messages

  • A question about movie clips and the eraser

    So I'm kinda new to flash and whatnot, probably not nearly as
    good as half you people with the scripting and I donno what half of
    things you say are.. and yeah.. but I'll learn one day. :]
    Anyways.. so I want to use the eraser tool to erase a
    graphic, but it doesn't seem to be able to do that. Basically I
    have this picture of an eraser and when I l click the link I want
    the eraser to erase the page, but the thing that actually could
    erase doesn't seem to erase things unless they're made in flash.
    Suggestions???
    Also, how do you make a movie clip stop moving when you hover
    over it?

    Ok - let's go step by step:
    Re-re wrote:
    > In flash CS3 there's an eraser tool that lets you erase
    things, but doesn't let
    > you erase graphics from what I can see.
    "Graphics" is a pretty general term - it can mean anything
    from vectors to bitmaps to symbol
    instances. I have to assume that you are referring to
    imported graphics. Please clarify.
    If you are finding the eraser tool does not erase "graphics"
    then you are either trying to erase a
    bitmap or an instance.
    If bitmap: you must break it apart or Trace Bitmap (convert
    to vectors) before using the eraser
    tool. More importantly, if you are trying to erase part of a
    bitmap, it is probably more
    advantageous to go back to the original source file and edit
    it in your graphics editor and
    re-import into flash.
    If it is an instance of a Graphic symbol, double click the
    symbol to enter Edit Mode - then use the
    eraser tool (assuming the artwork inside this symbol is
    vector art. If a bitmap refer to the
    previous steps.
    >
    > But I have this button that looks like an eraser, and
    when it's clicked I want
    > the eraser to swipe across the page and erase it,
    leaving it white from behind,
    > but sence the ereaser tool in flash doesn't seem to let
    me erase graphics, I
    > was trying to figure out how to exicute my idea.
    Here's where my confusion increases - this is a different
    issue from the first one right? The eraser
    tool and this eraser button are 2 different things? Let's
    assume this eraser button is something you
    made ok? But your last scentence still confuses me - what
    does the Flash eraser tool have to do with
    your eraser button?
    What I think you want might be found by going to
    www.flashkit.com and searching for "scratch lottery
    ticket" or similar.
    >
    > Also, I have a movie clip with a botton on it, and the
    movie clip rotates
    > consantly. I want it to stop rotating when I hover over
    the botton. How do I do
    > that?
    Give the MC an instance name and target it on rollOver of the
    button:
    on (rollOver) {
    myMC.stop();
    Chris Georgenes
    Adobe Community Expert
    www.mudbubble.com
    www.keyframer.com
    www.howtocheatinflash.com

  • FLV in a linked Movie Clip slow to show at runtime

    Hi All,
    I have a linked FLV in a FLVPlayback, inside a movie clip that is a child of my main timeline. Let's call it 'redBoxMovie'. I have bitmaps on the stage and the redBoxMovie. I would like the first frame of the redBoxMovie to be visible on the stage along with the bitmaps as soon as the flash movie shows in the web browser. However, when I open the swf in the browser I see the bitmaps for about a 1/2 second before the first frame of the redBoxMovie.
    Is that because it's a linked flv? Is there any way to assure everything shows on the stage at the same time (bitmaps and flv)?
    Thanks

    Ok so it looks like you're referring to the method of placing a screenshot of the flv on the stage in front of the flv so that users don't notice that the flv loads more slowly than the other bitmaps on the stage, right?
    yes
    Looks like I'll have to do this (since embedding the flv in the main swf, which avoids the slow-to-show problem, is not recommended).
    that's also correct (and it will make your entire swf load slower).
    Thanks Kglad.
    you're welcome.

  • Questions about movie clips

    I want to play a movie clip in a separate file. First, I use loadMovieNum("[url]",1); which works, but the movie is ends with being too large, even though I adjusted the movie clip's size and exported it. When I load the movie, is there something I can do to adjust the movie in code?
    Also, when the movie ends, is there a way to have it move the main page to the next frame (e.g., on(release){gotoAndStop(2);})?

    Bump. Anyone?

  • Major question about movie clips

    Ok so for this class project i have tried it all. I want to get a certain clip our of a certain movie but i cannot find a way to do this at all. What applications do i even need. I need so info about this asap please. Will imovie work or do i need another. I know final cut studio will work but thats like over 1,000.00 and i'm not looking to spend that much. All information is greatly appectiated

    Hello horsecrazy,
    I want to get a certain clip our of a certain movie but i cannot find a way to do this at all
    Do you want to export a single clip from an iMovie project? If so, place the clip in the timeline, then choose File > Share from the menu. Select Quicktime and "Full Quality" and make sure you check "Share selected clips only". Hit share and have a coffee while iMovie exports.
    hope this helps
    mish

  • Beginner Question - Inserting a Clip

    I just started using iMovie HD (5.x) after my old version of Premiere suddenly quit working. I have a bunch of still images that I want to sync to a voiceover soundtrack. I put the entire sound track in and a few clips synced to the soundtrack while I'm waiting for the rest of the images. Now I have the other images and I can't seem to insert them into the timeline. If I drag a still image clip into the timeline, everything else after it moves to the right. I left gaps of just the right size to insert these clips, and even though their duration is shorter than the gaps, they still moves everything after to the right. I can find no mention of this anywhere in the help and I've tried every possible key combination while dragging. Is there any way to insert a clip into a gap in the timeline without moving everything in the timeline after it? Or do I have to remove everything after it and only work forward in time (like an old linear editing system)?
    Oh, and this is unrelated, but there is no simple wipe transition?!?

    Klaus1 wrote:
    It is supposed to work like that. You don't have to create a gap first, just drop them between two clips.
    I have gaps because I only had some of the images I needed, and I didn't want to wait until I had all of them to start putting the movie together. So I put the images I had where they go on the timeline, leaving gaps to insert the others later. Just like with any other non-linear video editing software I've ever used. So now it looks like I've wasted hours getting the images lined up with the voiceover, and now I have to go back and delete everything and start over with just the audio track. I guess iMovie just wasn't made for much beyond the simplest of editing.

  • Beginner question - link five items in menu to five pages in iPhone app

    I can set up a menu to link to one page. But I'm confused on how I can set a table for five items to link to 5 different text pages.
    That is all I want to do.
    Also, if I'm doing a text page how do I completely eliminate the typewriter so it never appears.
    Can anyone help?
    I have been diligent in trying to accomplish this for 40 plus hours and failed.
    My email is [email protected]
    Thank You

    Hi Fred, and welcome to the Dev Forum!
    Fred Reiss wrote:
    I can set up a menu to link to one page. But I'm confused on how I can set a table for five items to link to 5 different text pages.
    Can you describe the screen you want to build and what it needs to do in any more precise way? "Menu to link to one page", and "Table for five items .." doesn't tell me enough to make any suggestions. If you've written some code, it might help to post that (see the formatting help in the first forum topic).
    Also, if I'm doing a text page how do I completely eliminate the typewriter so it never appears.
    Can anyone help?
    As abpve, a little more precision might help. I need to understand what you mean by "text page". For example, if you mean an instance of UITextView which the user isn't going to edit, just set its [editable|http://developer.apple.com/library/ios/documentation/UIKit/Reference/ UITextViewClass/Reference/UITextView.html#//appleref/doc/uid/TP40006898-CH3-SW6] property to NO, and the keyboard will never appear.
    \- Ray

  • Linking back from movie clips

    I want my menu bar to be in a movie clip. How do I link back
    to a frame in the main timeline from a movie clip?

    Hi velob54,
    Interesting question...
    This solution concerns actionscript 3.
    I put an object on frame 10 of the main timeline, and on
    frame 1 put this actionscript:
    stop();
    then I created a symbol with class name, MyMC and on it's
    first frame added the following code:
    var t:Timer = new Timer(1000);
    var tFunc:Function;
    var mt:MovieClip = this.parent as MovieClip; // [object
    MainTimeline]
    t.addEventListener( TimerEvent.TIMER, tFunc =
    function(e:TimerEvent):void
    t.removeEventListener(TimerEvent.TIMER, tFunc );
    mt.gotoAndStop(10);
    t.start();
    I then added an instance of MyMC to frame 1 of the main
    timeline after stop();
    stop();
    addChild(new MyMC());
    When I run the movie, after 1 second, the playhead jumps to
    frame 10.
    Hope this helps.

  • Can dynamic text links (XML) pass arguements to movie clips?

    I have a dynamic text field that i'm pulling a XML file into,
    but I need the URL links within the XML to control a movie clip.
    I've read that you can pass an arguement inside flash from within
    the XML doc but i'm not positive how it would be done.
    Any love on this one?

    Hmm, this leaves a couple questions... Where would I put the
    script/function, inside the <a href> tag? That could get out
    of hand... like in-line CSS styles. And I have a URL node within
    XML set-up so I don't know if this solution would work.

  • Flash CS4 Link to a Movie Clip from inside another Movie Clip

    I am working on a Flash CS4 project which has 5 buttons with 5 corresponding movie clips all on the main timeline. Everything in functional so far.
    My problem is this: I want to be able to mouse click on a particular word in the text inside movie clip 4 ("mc4") and have it link to movie clip 3 ("mc3") (on the main timeline).
    I've tried many things, and I can't get it working.
    I have tried to highlight the word then link it to "mc3" in the properties panel where it says link (I successfully linked to an email address and to an outside website in other parts of the project)....
    I tried to link it in the properties panel to "mc3", I tried & "parent.mc3", "root.mc3";
    Linking it this ways seems to be the simplest, logical thing to do, but I don't know what kind of prefix it needs.
    Then, I tried making the word (inside mc4) an invisible button (button6) then linking it to the mc3, with it's actionscript in the main timeline with the other button functions.
    I tried duplicating mc3 and duplicating invisible button 3 and moving it's hotspot to over the word.
    I tried putting a copy of mc3 and the button inside mc4, with the actionscript also inside mc4.
    I tried duplicating mc3 and calling it mc6, and putting that inside mc4, with the actions back on the main timeline, and tried again with the actions inside mc4.
    I tried with mc6 and invisible button 6 on the main timeline, but that doesn't seem possible.
    I tried using this code from Adobe Actionscript 3.0:
    button6.addEventListener(MouseEvent.CLICK, startMovie);
    function startMovie(e:MouseEvent):void
            this.play(&quot;mc6&quot;); [and I also tried with &quot;mc3&quot;]
    Nothing works!! Please, I would appreciate any suggestions!!
    Thanks,
    Suzanne

    If I limit my attention to the second sentence of your posting, then I suggest the following (borrowing from the rest of your posting)...
    If that invisible button6 is inside MC3 (on MC3's main timeline), atop the word you are trying to link to the movieclip, and you just want to make mc4 play by clicking that invisible button6, then assign the following code to the button6 inside MC3...
    button6.addEventListener(MouseEvent.CLICK, startMovie);
    function startMovie(e:MouseEvent):void
            MovieClip(this.parent).MC4.play();
    If I missed, then I missed following your explanation.

  • In the time line, cutaways and titles are supposed to be linked on the top side of movie clips in the time line window.  I don't know what I did, but now they are linked to the bottom side.  How do I get them up to the top where they belong?

    I'm working on a movie in FCP and using cutaways and titles in many places in the timeline.  While working on a movie 2 days ago, and I don't know what I did, all the cutaways and titles are now linked to the movie clips from below rather than above.  When I "grab" them and drag them up to the top-side, as soon as I "release", they go back down.  Along the menu bar, I've check the "view", "modify", "clips", etc., looking for any thing that might refer to appearance of the time line.  What must I do to get the cutaways and titles back on top where they belong?  The audio clips remained properly-linked to the time line and play properly.  The cutaways and titles can be seen but do not play. 

    The cutaways and titles should be linked above the timeline clips, not below

  • How Do I Make Bitmap, Graphic, or Movie Clip into a clickable link??

    I am designing a website entirely in flash (macromedia flash) but I cannot get the bitmap, graphics, or movie clips clickable links, although when hovered over turns into a hand.  Any suggestions? I have also tried the following script;
    on (release){
    getURL("http://www.google.com/", "_blank")
    Obviously I didnt use google, but still no go.
    I'm hot linking the raw fla file below.  I bought this template online and have modified it alot (all cosmetic) but I cant get the tabs to be links!?  I used action script (the one posted above) in every layer and the text inside the tabs.  But still doesnt work Does anybody know whats wrong?
    Sorry, but I dont know much in action script, I'm a c++ and web designer, this is my first time working in only flash.
    http://www.hotlinkfiles.com/files/2449178_iizru/_menu2_fv8.fla
    Here is my modded template in my website:  http://9karim.com/adminI only need to modify the menu bar

    I wouldn't say you're screwed, you just have some work ahead of you to find out what are actually the buttons in that thing.  If you look at the file on stage you'll see a large turquoise shape (an invisible button) that when you select it shows it has an instance name of "menu"... I still couldn't figure out what it has to do with those animated tabs, but it may lead to further discoveries.
    There's a lot of stuff woven into that file, and with the frame by frame animation, it's hard to isolate just about anything.  Based on what I see in the library as far as object naming goes, and your not knowing what's where, I'd conclude that this is an "acquired" design that has been decompiled into the fla you are trying to figure out.  While I haven't any experience with decompiled files, it wouldn't surprise me if there is an increased level of complexity as a result of how the decompiler rebuilt the file.

  • How to make a movie clip button into a url link?

    Hello,
    I'm kinda new to using Flash and am trying to edit a template for a friend of mine, the problem is I'm trying to add a url link to the buttons. I tried adding this action to the button
    on(release){
    getURL(http://www.yoururl.com.);
    I saved as swf & got this error msg in the compiler errors: Symbol=but1,layer 4, frame=1 Mouse events are only for button instances
    In the library I checked the properties of the button and its a movies clip, I'm not sure if it will make any difference if I change to button or graphic?
    I would like to upload the fla and swf files but this forum doesn't seem to allow me to attach files to messages.
    Does anyone know how to do this? Any help is greatly appreciated.
    http://jaedenyoo.com

    Unfortunately that doesn't seem to be the problem, I checked and
    in my flash file its typed correctly.

  • TextArea link inside a move clip

    The actionscript calls textArea to have a rollover action and
    then link to another site when released. However when placed inside
    a movie clip the rollOver works but not the link. I need someone to
    tell me what syntax I'm missing. It's gotta be possible.
    Please help.
    Here's the Code:
    var feature_styles:TextField.StyleSheet = new
    TextField.StyleSheet();
    feature_styles.setStyle("backgroundColor", 0x000000);
    feature_styles.setStyle("mainbody", {color: "#333333",
    fontFamily: "FFF Hero", fontSize: "8", display: "inline"});
    feature_styles.setStyle("a:link", {color: "#333333",
    fontFamily: "FFF Hero", fontSize: "8", display: "inline"});
    feature_styles.setStyle("a:hover", {color: "#FF0000"});
    background1_mc.textbox_1.links_1.label.condenseWhite=true;
    background1_mc.textbox_1.links_1.styleSheet = feature_styles;
    background1_mc.textbox_1.links_1.wordWrap = true;
    background1_mc.textbox_1.links_1.html = true;
    background1_mc.textbox_1.links_1.label.selectable=false;
    background1_mc.textbox_1.links_1.editable=false;
    background1_mc.textbox_1.links_1.vScrollPolicy = "off";
    background1_mc.textbox_1.links_1.hScrollPolicy = "off";
    background1_mc.textbox_1.links_1.embedFonts = true;
    background1_mc.textbox_1.links_1.text += "<a
    href=\"Fall08images/downloads/FALLOUT_1600x1200.jpg\"
    target=\"_blank\">1600 x 1200</a><br>";
    _global.styles.TextArea.setStyle("backgroundColor" , "none");
    _global.styles.TextArea.setStyle("borderStyle", "none");
    _global.styles.TextArea.setStyle("borderColor", "none");
    stop();

    Try:
    background1_mc.textbox_1.links_1.htmlText += "<a
    href=\"F...

  • How to change the movie clip a button links to???

    I am working on a website in Flash that had already been
    designed by someone else. There are a number of buttons across the
    website that are linked to the same symbol. Those buttons link to
    movie clips, in the button's actions, that pop up as small windows
    providing more information in regards to the button clicked. The
    problem is that I cannot figure out how to properly change the link
    association between button and movie clip.
    Here is the action script for one of the buttons:
    on (release) {
    _root.scrHEIGHT=100
    _root.scroller.scroller.gotoAndStop(2);
    _root.scroller._x = 100;
    _root.scroller._y = 150.7;
    _root.TM_title = "About Chris Smith";
    _root.READ = 3;
    When I change the number after "root.READ =" it will change
    it to another movie clip but I how do I know what that association
    is based on? For instance if I make a duplicate movie clip how can
    I make the above script link to it? Also, what exactly does that
    last line in the above script mean? When I tested various numbers,
    like 3 and 6, they would link to the same movie clip.
    Please help! This is driving me crazy!
    Thanks!!!

    Hi,
    buttons can be defined with static icon/text, or dynamically via a variable (containing @08\Qtooltip@text for example). You choose the pushbutton type when you define your button using the screen painter. For the dynamic definition, you must tick the "output only" checkbox, enter a global variable name, that you'll fill in your program, preferably using ICON_CREATE function module.
    BR
    Sandra

Maybe you are looking for

  • Item Category determination while copying

    Hello Guys, What is the difference between Normal Item Category determination and Item category determination while copying? What could be the business logic behind this? Thanks in advance. Ravi

  • HT4437 Why can't you stream Amazon Prime using Apple TV?

    The whole reason I bought the Apple TV was to be able to stream from my ipad and my macpro to TV my Amazon Prime free movies. Now it looks like this is blocked. This seems outrageous. I told the sales person at the store what I wanted to do and they

  • Trouble Importing P2 Files

    Hi, I'm trying to bring in P2 footage that has already been transferred to a GRaid drive using ShotPut. I watched Shane's excellent tutorial <http://library.creativecow.net/articles/rossshane/tapeless-workflowfcp-7/video-tutorial> about importing P2

  • Database down

    My database is down. i can't log in through db console. and i can't log in by sqlplus connect / as sysdba what should i do? help! thanks.

  • OS X Mountain Lion has removed iMovie?

    Right after i update the software which is OS X Mountain Lion, I planning on making movie for my project, off the suddenly there is no iMovie OR it is just me.. Does it still have iMovie?