How to keep a Movie Clip on the screen for 5 secs.

I am having trouble with keeping a movie clip on the screen.
I am setting it up to play a movie using the .onPress function. It
is calling the movie but only shows it for a split second. How can
I make the movie stay on the stage for 5 seconds? Here is how I
have it coded:
rc1MC.onPress = function() {
if (rc1MC.hitTest(_xmouse, _ymouse, false)){
_global.correct++;
updateStats();
var c1:MovieClip = this.attachMovie ("correct1_mc",
"correct1",4300);
var ymov = this._y;
var gravity = 20;
c1.onEnterFrame = function() {
ymov += gravity;
xmov *= 0.5;
c1._rotation += 5;
c1._x += xSpeed;
c1._y = ymov;
if (c1._y>stageHeight) {
c1.removeMovieClip();
delete this.onPress;
Thanks Brandon

Got my answer...
http://forums.verizon.com/t5/FiOS-TV-Technical-Assistance/For-Those-of-You-Who-Want-to-View-Subscrib...

Similar Messages

  • Hi, I can not get my iphone 4 voice over function to work. I turn it on and then it turns off automatical. I ok the message the message stays on the screen for 30 secs or so and then turns it off????

    I am unable to turn on the voice over function on Iphone 4.  The meesage appears informing me of what the functions does, I press ok and the the message stays on the screen for 30 secs or so and then it automatically turns the voice over function "off" - why???? what am I doing wrong?

    I just had this same issue. It occured after I joined my school's Wi-Fi. Suddenly, my home ATV2 and iPhone4 weren't on speaking terms. All five other iphones, ipads, and macs were operating as they should. My phone was not. I tried everything: unplugging and restarting ATV2, deauthorizing all my devices and reauthorizing them, deleting and reinstalling remote app, and countless home sharing on and offs on all devices. Finally, I turned the Wi-Fi off and then on in the setting of my iphone. Boom. Situation remedied. I hope this helps.

  • How do I recerence Movie Clips on the Main Timeline from inside a class?

    Hey everyone, this might be a stupid question but I thought
    I'd ask cause it's making me nuts. I'm all of 2 days into AS3
    (coming from not using Flash at all in YEARS) so feel free to
    consider me ignorant. I do have plenty of application development
    experience in other areas though.
    I can't seem to create a class that can reference an instance
    of a movie clip on my main timeline. I'd post code of what I've
    tried but I've gone through so many desperate edits & wild
    guesses that it was just garbled junk before I deleted it all.
    Basically here's how I figured Flash could work, though maybe
    it doesn't work this way at all.
    I'm assuming that with AS 3 being so big on being a true
    object oriented environment, I wouldn't need to mix my code and
    interface together. Preferably I'd be using the Flash authoring
    tools just to design my interface. Create a button... place it
    somewhere... give it an instance name. Roughly the equivilant of
    Apple's InterfaceBuilder for those of you that might be familiar
    with Cocoa development. I can see maybe having to put a few lines
    of ActionScript onto frame 1 (though really I'm hoping Flash would
    have a better method of kicking off the application at this point
    that using code tied to frames) to load my classes & such, but
    after that I'd like all of my code to be held in external class
    files.
    So maybe I've got:
    Interface.fla - My interface
    Button_1
    Button_2
    TextField_1
    Main.as - My main controller class using to handle all of my
    applications behavior
    SomeClass.as - Some helper Class
    SomeOtherClass.as - Some helper Class
    Main.as would have instructions in its initialization method
    to go ahead & attach events to buttons & initialize
    anything else that needs to happen when the application starts.
    From there on it would all be objects communicating back &
    forth. Button_1 would get clicked with would fire
    Main.someMethod(). Main.someMethod() would then do it's thing and
    set the value of TextField_1. All very clean & code is very
    separated from interface.
    Unfortunately I can't for the life of me figure out how AS3
    classes reference each other like that. There doesn't seem to be
    any kind of a global 'root' or '_root' I can use to locate any
    movie clips on the stage. I've searched the help & the web for
    any kind of simple tutorial but to no avail. My job has tasked me
    with building a flash app for a project but I'd really rather not
    have a tone of ActionScript just shoved into frame 1. That just
    seems... ugh! (::shudder::)
    Can someone maybe point me in the right direction here? I'm
    really willing to do my homework but I can't seem to locate the
    info I need to get started. Also, is there an ActionScript IRC
    channel or something maybe?
    Thanks,
    Cliff

    I worked with the problem last night and the solution I
    started coming to involved creating my own custom document class
    based off which extends MovieClip. My thought is that way I have
    access to the initialization routine of the timeline itself and
    that all of the elements on the main timeline should be
    "properties" of my custom class.
    Is this correct? Is there a down side to doing this & if
    so what is it & why?
    Also, just for my reference, the last time I did anything
    with ActionScript I think I was using '_root' to target the main
    timeline. WHat are the global variable names in AS 3? Is it just
    'root' & 'stage' or 'Root' & 'Stage' or what?

  • How to make a movie clip follow the player

    Ok I want to make spawn able enemies and when they get in like 5 pixles in range they start to follow the player they are moving and if they switch directions it will go to another frame that will make it look like they are running in that direction. How can this be acheived?

    use Math.atan2() to find the angle between the player and enemy.

  • Garage Band 10.0.2 - How do I move clips in the editor?

    Pretty basic question about Garage Band 10.0.2.   I find it difficult to grab and move clips in the editor - the bottom window - as I could in previous versions. Instead, I'm having to go up to the top window to move clips closer together.  What am I doing wrong?

    Hold down the command key, while you click the region in the track editor and drag it. Don't click the ruler, click the wave shape in the audio region.

  • How do I inactivate all other movie clips except the running one.

    Hello guys
    I would need help to inactivate all other actions on movie clips while the active movie clip is running. So in my flash scen when the user makes a roll over on a movie clip I would like that movie clip to play all frames in that movie clip before the user can roll over on an other movie clip. So the active movie clip don't gets interupted. What actionscript 2.0 should I look for?
    Thanks!
    /Klas

    You could use a boolean variable in a conditional that wraps whetever functionality the objects have to prevent them from taking those actions.  So when you rollover an object it starts to activate its animation or whatever and sets that boolean to prevent any others from doing the same.  And when it completes its actions it rets the boolean.
    If you show your rollover code it might be easier to show an example, but it might be something like...
    var allowPlay = true;
    mc1.onRollOver = rolloverFunction;
    mc2.onRollOver = rolloverFunction;
    mc3.onRollOver = rolloverFunction;
    function rolloverFunction(){
       if(allowPlay){
           allowPlay = false;
           this.play(); // or whatever action your rollover executes
    and when that animation completes the movieclip resets the allowPlay to true.
    _root.allowPlay = true;

  • How can you make movie clips partially visible?

    Okay, so this sounds simple, but I'm tottally lost... I'm a thirteen year old boy that has been using Flash for a little over 3 years. I program video games. I recently embarked on a game where one of the modes is to be split screen, player one gets the top half, player 2 the bottom. The promblem with this is that my game is based off of a moving background, where inorder to keep the main character centered the background moves instead of them. Becsause of this,when setting up split screen, the screen on the upper layer takes over the bottom because there would be more showing then there would be in the game: Parts would be off screen. I was wondering if there was anyway that using hitTest(s) (or some other method) you could make a movie clip partially visible/ invisible. I know the code for making something invisible when touching something else. But I was wondering if there was a way to make only the part of the movie clip touching another movie (it would have its alpha turned off... let's say it's a hitBox) or only the part of the movie clip touching the hitBox visible, invisible. Another way of looking at this is that I want a movie clip to be a small box, but inside I want their to be a huge picture. I want to make it so that when you move the picture different parts are viewable in this little box. And to make this as clear as I can... : I want to make a circle that I'll call the magnifying glass. I want to make an invisible picture that can be moved using code (I know that part). I want it so that when part of the picture is under the magnifying glass it's visible, not the hole thing, jus that circular area. Another reason I'd like to have this promblem solved is for a moving water effect. I want to make a movie clip and tween showing a square of rushing water, but without putting anything over parts of it (other than a hitBox) I want to make only a squiggly line of that water box visible. Thank you so much! =D I really hope you guys know! =D P.S. I also am currently using the trial of CS4, if that helps anything. But if it's only possible in AS3, then it's impossible to me because I use AS2 conservatively.

    Thanks... but I think you've misunderstood my question. I suppose magnifying glass wouldn't be the right word... I just wanted to explain that I want only the part of one mc touching another mc to be visible. I hope this isn't confusing. I have no need to enlarge an image. I want to make a movie clip only partially visible. Check out the fla.

  • How can i fix a clip when the video and audio are not matching up?

    How can i fix a clip when the video and audio are not matching up? I imported the video from a junkdrive in a .VOB format and concerted to a .mov the videos were filmed on a miniDVD recorder.

    I would try detaching the audio and the dragging the audio to the left or right until it lines up.

  • How to stop a movie clip moving

    I'm not newbie to flash but I am newbie to coding using
    actionscript!!!
    I am trying to create a button that moves a movie clip
    ("content1") diagonally across the screen but once the movie clip
    reaches a certain x co-ordinate I want it to stop and then when I
    click another button I would like it to return to it's starting
    position. At the moment the movie clip moves if I click one of the
    buttons but as soon as I click another one it stops which it
    shouldn't it should go back in the other direction. The other
    problem is that once I've clicked a button I cant seem to get it to
    stop moving once it reaches a certain _x position it just keeps on
    moving off the stage.
    Below is the script I have so far not including any
    conditions to check if "content1" has reached it _x position
    Could anyone help please!!!!
    //on Right movie clip containing the button
    onClipEvent (enterFrame) {
    _root.content1._x += speedX;
    _root.content1._y -= speedY;
    //on Right button inside movie clip
    on (press) {
    speedX = 5.5;
    speedY = 1.33;
    //on Left movie clip containing the button
    onClipEvent (enterFrame) {
    _root.content1._x += speedX;
    _root.content1._y -= speedY;
    //on Left button inside movie clip
    on (press) {
    speedX = 5.5;
    speedY = 1.33;

    Many thanks ClBeech!!!
    I've tried the code you suggested but it doesn't seem to work
    :0(
    I'm working on a Mac using Flash Pro 8 which only has the
    option to publish as 'actionscript 1.0 or 2.0' is the script you
    supplied an actionscript 3.0?
    Below is the script with the amendments, I've changed my
    button instance names to match the script you supplied (left_btn /
    right_btn)
    stop();
    import mx.transitions.Tween;
    import mx.transitions.easing.Strong;
    var rposX = 369;
    //the ending x of the right position
    var rposY = 84;
    //the ending y of the right position
    var lposX = 116;
    //the ending x of the left position
    var lposY = 154;
    //the ending y of the left position
    right_btn.onPress = function() {
    new Tween(content1, '_x', Strong.easeOut, content1._x,
    rposX, time, false);
    new Tween(content1, '_y', Strong.easeOut, content1._y,
    rposY, time, false);
    left_btn.onPress = function() {
    new Tween(content1, '_x', Strong.easeOut, content1._x,
    lposX, time, false);
    new Tween(content1, '_y', Strong.easeOut, content1._y,
    lposY, time, false);

  • Passing a variable from a movie clip to the main timeline

    Hi,
    I'm having trouble passing a variable from a movie clip in my
    flash file to the main timeline.
    I have a movieclip with the instance name IntroNav which
    contains several buttons. Clicking a button sets the variable
    "page" to a specific name, i.e. page = "home"
    However, outside of the movie clip, on the main timeline I am
    unable to call this variable, and "page" seems to have no value.
    Can anyone tell me why this is and how to solve it?
    Thanks

    Umm, yes ... declare your variables correctly.
    var page:String = new String(); //proper complete
    var page:String; //strict typing
    var page:String = "home"; //stirct typing with value
    declaration
    Do not declare the variable in your buttons, you would have
    to do so in every button and be constantly resetting the value.
    Declare it on the main timeline at the lowest level. You do not
    need to use it as a _global, you just need to resolve your path
    issues. You can 'set' the variable value from a button, without any
    problem, but you have to call to the variable correctly.
    You do not 'name' a variable as "_root.page" , the '_root'
    refers to the lowest level of the SWF or the main timeline, as does
    a call to ' _level0' (that's a zero). If the variable is declared
    on the main timeline, and you're calling from the MC/button or
    anywhere you can refer to the variable by calling to it by
    the proper path of '_root.page'
    To set the variable from any of your button/MC instances
    call:
    _root.page = "value"; OR _level0.page = "value";
    But you must have the varibale declared on the main timeline,
    and only once and the playhead should be stopped or it will reset
    the value to the default upon looping.

  • Dynamically adding multiple instances of a movie clip to the stage with one button

    hello,
    I was wondering if there was a way to add several instances
    of the same movie clip to the stage dynamically utilizing one
    button.
    I can do one with the following code placed on the button...
    on (release) {
    attachMovie ("filledCircle", "filled1", 5);
    filled1._x = 370;
    filled1._y = 225;
    But I want the user to be able to hit the button again and
    get yet another instance of "filledCircle" on the stage.
    I also want the user to be able to drag these instances
    around...
    Any help would be appreciated...
    Thanks,
    Muhl

    Muhl,
    > I was wondering if there was a way to add several
    > instances of the same movie clip to the stage
    > dynamically utilizing one button.
    Sure thing.
    > I can do one with the following code placed on the
    > button...
    >
    > on (release) {
    > attachMovie ("filledCircle", "filled1", 5);
    > filled1._x = 370;
    > filled1._y = 225;
    > }
    Gotcha.
    > But I want the user to be able to hit the button again
    > and get yet another instance of "filledCircle" on the
    > stage.
    You're in luck, because this isn't very hard to do. The main
    thing to
    keep in mind is that each instance must have A) its own
    unique instance name
    and B) its own unique depth. In your example, the instance
    name is filled1
    and the depth is 5. The next clip's instance name should be
    filled2 at a
    depth of 6. Then filled3, depth 7, and so on. You can use a
    single
    variable to handle the incrementation.
    // code in a frame
    var counter:Number = 1;
    // code on your button
    on (release) {
    attachMovie ("filledCircle", "filled" + counter, counter +
    4);
    With me so far? The variable counter contains the numeric
    value 1. The
    second parameter of attachMovie() is provided with a
    concatenation of
    "filled" + 1, which makes "filled1". The third parameter is
    provided with
    the sum of counter plus 4, which makes 5. Obviously, we need
    a bit more.
    The button must, in addition, increment the value of counter.
    The ++
    operator handles this perfectly.
    on (release) {
    attachMovie ("filledCircle", "filled" + counter, counter +
    4);
    counter++;
    Now, it seems you also want to position the attached movie
    clip to (370,
    225). Are they call supposed to go to the same place? If so,
    you may use a
    second variable to hold a reference to the newly attached
    clip. Look up
    MovieClip.attachMovie(), and you'll see that the method
    returns the exact
    reference you need.
    // code in a frame
    var counter:Number = 1;
    var mc:MovieClip;
    // code on your button
    on (release) {
    mc = attachMovie ("filledCircle", "filled" + counter,
    counter + 4);
    counter++;
    mc._x = 370;
    mc._y = 225;
    Make sense?
    > I also want the user to be able to drag these instances
    > around...
    Then you need to handle a few events. You're dealing with
    movie clips
    here, so your best bet is to study up on the MovieClip class,
    which defines
    all movie clips. (Note, also, that the TextField class
    defines all input
    and dynamic text fields; the Sound class defines all sounds,
    etc. This is a
    very handy arrangement of the ActionScript 2.0 Language
    Reference.)
    // code in a frame
    var counter:Number = 1;
    var mc:MovieClip;
    // code on your button
    on (release) {
    mc = attachMovie ("filledCircle", "filled" + counter,
    counter + 4);
    counter++;
    mc._x = 370;
    mc._y = 225;
    mc.onPress = function() {
    this.startDrag();
    mc.onRelease = function() {
    this.stopDrag();
    Easy as that. You're simply assigning a function literal to
    the event
    of each new MovieClip instance as you create it. Take a look
    and you'll see
    each of these class members available to you -- that is, to
    all movie clips.
    MovieClip.onPress, MovieClip.startDrag(), MovieClip._x, etc.
    Wherever it shows the term MovieClip in the Language
    Reference, just
    replace that with the instance name of your clip -- or a
    reference to that
    clip (which even includes the global "this" property).
    David
    stiller (at) quip (dot) net
    Dev essays:
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Boundary for movie clips following the mouse

    here's my AS...
    myInterval = setInterval(KBMOglobal,15);
    function KBMOglobal () {
    KBMOglobal1._x -= (KBMOglobal1._x - _xmouse)/10;
    KBMOglobal1._y -= (KBMOglobal1._y - _ymouse)/10-2;
    ok, so my movie clip follows the mouse around, with a small
    delay and the y axis is slightly lowered. the stage of my movie is
    380 x 640. does anyone have any suggestions on how to create a
    boundary, equal to the size of my stage, that does not let the
    movie clips that follow the mouse extend past? does that even make
    any sense? essentially, i would like the movie clips to follow the
    mouse, the entire movie clip stay visible on the stage. because of
    the positioning of the items on the stage that initiate this
    function, i only have to consider the width of each movie clip,
    which luckily is a constant = 200. does that make any sense? let me
    try this all again....
    how do adjust the above function so that the movie clip,
    KBMOglobal1 (which has a width of 200) stay within the horizontal
    limits of the stage (which is 380)?
    thanks for your time and to everyone in this forum that has
    been so very helpful with all my questions in this project so far,
    yall rock!

    quote:
    Originally posted by:
    NickTheNameless
    this is almost working perfectly, however i need to adjust
    the boundary of the x axis. for some reason, the movie clip stops
    following the mouse when it reaches half way across stage,
    horizontally.
    would you please be so kind to explain what your script is
    doing? because i'm not a total idiot, i realize i could probably
    replace 380 with 760 (double the width of the stage) and it would
    work as expected. however, if you could spare the time to explain
    what the following two lines are doing, step by step....i'll give
    you my first born.....
    KBMOglobalGeneralCancelDispatch._x<0?KBMOglobalGeneralCancelDispatch._x=0:KBMOglobalGenera lCancelDispatch._x;
    KBMOglobalGeneralCancelDispatch._x>380-KBMOglobalGeneralCancelDispatch._width?KBMOglobalG eneralCancelDispatch._x=380-KBMOglobalGeneralCancelDispatch._width:KBMOglobalGeneralCancel Dispatch._x;
    thanks again for your time!
    do you know ?: operator? it is like if...else... statements,
    when we say:
    somethingIsTrue ? do1() : do2();
    it is exactly same meaning like:
    if (somethingIsTrue) {
    do1();
    } else {
    do2();
    Now, we look at this line:
    KBMOglobalGeneralCancelDispatch._x<0?
    KBMOglobalGeneralCancelDispatch._x=0:
    KBMOglobalGeneralCancelDispatch._x;
    it is same like
    if (KBMOglobalGeneralCancelDispatch._x<0) {
    KBMOglobalGeneralCancelDispatch._x=0
    } else {
    KBMOglobalGeneralCancelDispatch._x

  • How to flip a movie clip using actionscript

    I have a movie clip on the stage facing one way (--->) how
    can I make it face the other way (<---) by flipping it over (not
    rotating it) using action script 3?

    var flipTween:Tween = new Tween(mc, "scaleX", Regular.easeIn,
    mc.scaleX, mc.scaleX*(-1), 1, true);
    should do it I think.

  • How do I transfer movie clips from iPhoto to iPad?

    How do I transfer movie clips from iphoto on my iMac, to my iPad?

    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import.
     Cheers, Tom

  • HitTest for multiple Movie Clip at the same time

    I have a movie it is a triangle.I duplicate it and I want to hitTest on the first triangle movie clip and I added 3 different line movie clips on the 3 side of triangle.I tried to write a code something like that.
    if(firstTriangle_mc.hitTestObject(line1_mc,line2_mc,line_3mc){
    trace("Ok");
    but I've got error.I think it is not allowed hitTestObject for multiple Movie Clips.So is there anyone have an opinion about it?What should I do?

    Here is another test for multiple movie clips for hitTestPoint but only the first work the others don't
    uc_mc.addEventListener(Event.ENTER_FRAME,hitle);
    function hitle(e:Event) {
    if (uc_mc.hitTestPoint(cub1,cub1Y,true)&&(cub2,cub2Y,true)&&(cub3,cub3Y,true)) {
      uc_mc.alpha=0.5;
    }else{
      uc_mc.alpha=1;
    The code above doesn't work.What should I do?

Maybe you are looking for

  • Getting "Error 500--Internal Server Error" for Enterprise Manager

    Hi, I'm getting "Error 500--Internal Server Error" while invoking EM of wls server ie http://<host>:7001/em/ It used to work fine before. Restored config.xml from domain_bak, but still error persists. I can see following error in AdminServer logs whi

  • How to get the Clinet IP address in PAR files

    Hi Frndzz... My requirement is  to get the log on details of portal users, here i need the User ID n client IP address . Am trying to  get these details from masthead iview PAR file, and this details am passing to a java(custom) class which can creat

  • Why doesn't the FloatVolume Control work?

    Hi! First message for me on this board, so I hope I did the things right posting here (and sorry in advance for my bad english) I have a problem with the Java Sound API. I'm trying to control the sample rate from a wav file to change the pitch (so so

  • Migrating Workflow Customizations from 11i to R12

    Hi: I have customizations to the PO Account Generator workflow that need to migrate from 11i to R12. I've attempted to drag 'n drop and copy/paste between workflow processes, but have been unsuccessful. Does anyone know of a way to migrate changes in

  • Loading .obj and .mtl in Java, how I can do this?

    Well, I'm having problem with this, I'm doing my Course Conclusion Work related with augmented reality in java (JARToolKit) and I want to import models 3D in the format .obj, but I need to import it's materials too that is in the file .mtl. Anyone th