Button movie clip

hello,
i am building a full flash site, and i have created animated
buttons seperatley,outwith the main fla, and i have imported them
into the main timeline. The button file is a movie clip,and works
beautifully when testing from its own fla,but it does not work (no
animation on roll over) when i embed it into my main site. Below i
have trhe action script
On top level main timeline,where movie clips reside,in one
keyframe -
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
this.onRollOver = function(){
rewind = false;
play();
this.onRollOut = function(){
rewind = true;
this.onRelease = function(){
getURL("
http://www.kirupa.com","_blank");
within each button movie clip
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
this.onRollOver = function(){
rewind = false;
play();
this.onRollOut = function(){
rewind = true;
this.onRelease = function(){
getURL("
http://www.siteName.co.uk","_blank");
any ideas ?
hope you can help !

This is what I came up with and it seems to work... can this
be refined and improved on?
For example, what if I want it to return to its original
value when clicked a second time?

Similar Messages

  • Unable to edit Flash file - Can't enter inside buttons/movie clips.

    Hi
    I am in the middle of creating a website using Flash CS5. I opened up my .Fla file one day to continue my work but I am no unable to access buttons and movie clips. When creating movie clips or buttons I am unable to get inside them, when I hover my mouse over them there is a white hand icon which never used to be there it was always just a normal mouse icon. I double click to enter inside the buttons/movie clips but nothing happens. This happens to existing movie clips and buttons on the page and even when I create new ones. Can anyone please help.. I really don't wanna have to start this website again!!
    thanks!

    Hi,
    This would normally happen when you have a Button symbol on stage and the 'Enable Simple Buttons' setting is enabled.
    Can you check in your Control menu, if the option 'Enable Simple Buttons' is enabled? If it is, click on the option to disable it and then try double clicking on your symbols.
    In case you still face the issue, can you send across your test file for investigation.
    Thanks!
    -Nipun

  • Button Movie Clips Loops Ad Nauseum

    Greetings
    I have a button that is a movie clip that is set up with animations triggered with MOUSE_OVER and MOUSE_OUT event listeners.  The glitch is that once the mouse is over the button ... each ensuing pixel that the mouse is moved, loops the animation again.  That probably didn't make a whole lot of sense, so I posted the file on my test site (http://www.savagepixels.com/test/test.html).  You have to drag your mouse slowly across the button to see this. The bottom part of the button works as I'd expect.  When you roll over the text at the bottom of the button, everything functions as it should.  The looping problem starts when you roll over the image portion of the button.  For some reason it considers each consecutive pixel rolled over to be a new event and consequently triggers the "over" animation again.
    The code I have is below.  I've commented out the MOUSE_OUT function for now.  There is also a screenshot at the above link of my Layers palette for the button clip in question.  I put a "stop" label at each frame that has an action so you see the actions used.
    Thanks for helping!
    oneBedButton_mc.buttonMode = true;
    oneBedButton_mc.addEventListener(MouseEvent.MOUSE_OVER, overEffect);
    //oneBedButton_mc.addEventListener(MouseEvent.MOUSE_OUT, outEffect);
    function overEffect (e:MouseEvent)
        oneBedButton_mc.gotoAndPlay("over");
    function outEffect (e:MouseEvent)
        oneBedButton_mc.gotoAndPlay("out");

    That was helpful. I had one of images in the button movie clip that wasn't a movie-clip type symbol ... it was just a static .png image.  Once I converted that into a movie clip, the repetitious looing went away.
    There is still some weirdness if you refresh that same link ... (http://www.savagepixels.com/test/test.html) if you roll over the lower part of the button where the text "One Bedroom + Study" is, and then move your mouse up over the image portion, the whole MOUSE_OVER event gets triggered again.  This is weird because there are no actions whatsover in the button movie clip except a few stop(); keyframes.  It treats the image as a separate button.  Any ideas on what is causing that event to be triggered in this way?

  • A really annoying problem with a button/movie clip

    I am having a problem with a button! its driving me insane
    because i managed to do it last week, but that was by chance and
    now i can't remember how i did it!
    I can get the button (i'm using gelright from the common
    libraries panel) and convert it to a movie clip(by pressing F8) and
    even attach a behaviour but when i play the movie it doen't work!
    when i move the curser over the button it changes into a hand, but
    will not act like a button, even though i have set the behaviour to
    'on release, go to and play keyframe 2'.
    Please help me, for the sake of my laptop goin through the
    wall!

    virgosam20 wrote:
    > first, i found the button i wanted in the common
    libraries (gelright) and
    > added it to the stage. I resized it and converted it
    into a symbol as a movie
    > clip. Then it got added to my library.
    > Then i deleted it from the stage and replaced it with
    the movie cip version i
    > had just converted it to. so now i have the same object
    on the stage, but now
    > its a movie clip and not a button.
    ok - you are running yourself around in circles - why did you
    delete it to the stage only to add it
    again? once you converted it to a movie clip, you had what
    you wanted on the stage - but then you
    deleted it and dragged another instance of the same symbol
    back onto the stage - there's no reason
    to do that.
    > Then i double clicked on it to bring up the movie clip
    timeline, but instead
    > of saying 'top, down, over, hit' (or whatever it says),
    it jsut said 'layer 1'
    > (but this was not my original stage as i have a number
    of layers on that one).
    Right - this is expected because yoyu are now inside the
    movie clip timeline - not the button timeline.
    > When i double clicked on it again, it brought up the
    right headings (top, down,
    > over, etc),
    Right - because by double clicking the button symbol you were
    then brought to "edit mode" for the
    button symbol.
    but there were about 5 layers that showed the different
    layers for
    > the original button.
    Huh? What "5 layers"? What do you mean "original" button -
    per your description there has only ever
    been 1 button you have been working with.
    > I think i have to add the button to each of the
    headings, bt there is no room,
    Lost you completely now - what do you mean add the button to
    each heading? I have no clue what you mean.
    > as when i did it before, there was only one layer for it
    and i had to insert
    > the key frames myself.
    Still losing you here.
    > I then added a behaviour to it using the Behaviours
    pannel, (selected
    > movieclip, then 'go to and play....') and it appears in
    the behaviours pannel.
    > But when i got to Play Movie, although the curser
    changes into a hand, the
    > button does not work.
    That's because you are applying a behavior for a button to a
    movie clip instead.
    I think you went wrong when you converted the button to a
    movie clip - i have no idea why you did
    that or why to think your button needs to be in a movie clip.
    >
    > Hope that can help you with what i've done and you can
    tell me where i've gone
    > wrong.
    >
    I just think you don't understand how timelines, symbols or
    buttons work yet in flash.
    1. drag a button to the stage.
    2. select it and open the Behaviors panel (dont double click
    it to edit it).
    3. add your actions.
    4. test movie.
    (no need for a movie clip here.
    -chris

  • 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

  • Basic invisible button movie clip frame actions not working, pls. help!

    Hi,
    I've got a basic little slide show player which is timeline-based, rolling through 5 images with alpha transitions, and on the topmost layer, I have 5 invisible movie clips which have actions applied to them as follows:
    on (press) {
        gotoAndPlay(21);
    This action should allow for the on click button to navigate to that specific frame, or image, but for some reason it is not working.
    Did I do something wrong? I feel like I've done this before but I'm rusty with Flash since I don't use it all the time.
    Any help is greatly appreciated!
    Thanks,
    Sean

    The invisible movie clip is something I know I've done over the years on many occasions - I'm not sure I'm understanding your alternate technique, can you explain it better? The way my movie clips are invisible is just by setting the alpha to zero in the properties for the movie clip instance (clicking on the object on stage, then setting it in properties)..
    Also, the actions are on the invisible movie clips (buttons) and not the timeline.
    Cheers,Sean

  • Button Movie clip link

    I've created some simple buttons that I'd like, when clicked,
    to play a movie clip. Whats the best way to do this?

    This is what I came up with and it seems to work... can this
    be refined and improved on?
    For example, what if I want it to return to its original
    value when clicked a second time?

  • Making Button links within a movie clip

    I am attempting to learn more Flash in general and
    actionscript in particular. I have created a flash piece that
    consists of 4 buttons within a movie clip that is being masked by
    another movie clip. One movie is the set of 4 buttons. The other
    movie is a "spotlight" that moves with the cursor. As the spotlight
    shines on each button, the button's text changes color and is "lit
    up".The Over state of each button is set to cause the button to
    change color. When I put a keyframe in the Down state of each
    button in order to add actionscript to create the action that makes
    the button clickable to take the viewer to a web page, it tells me
    that no actions can be given to this Down state. If I try using
    Behaviors to accomplish the same thing, it tells me that Behaviors
    are not supported. If I put actionscript into the actions layer of
    the timeline, it does not do the required action, i.e. clicking on
    the buttons leads nowhere. I have tried moving the actionscript
    before, between, and after the setInterval and setMasker
    actionscript that controls the interaction between the two movie
    clips (which work perfectly). I have tried inserting an actions
    layer into the button movie clip--same result--nothing. I have
    tried putting the actionscript in the second frame of the actions
    layer (both in the main timeline and in the movie clip), all to no
    avail. I did give each button an instance name and used them in the
    actionscript.
    Here is the actionscript I am using for one of the buttons:
    book.onPress = function(){
    book.getURL("http.//www.bainbridge.wednet.edu");
    I do not get an error message with this actionscript. I just
    don't get sent to the web page. I am using Flash 8.
    What else I should be doing? Is this a problem because the
    cursor is already attached to an action? I am sure that this must
    be possible, if only I knew more.
    Thanks for helping.

    do you have the actual mc identified as ( book ) on the root
    as well as the code i posted above? if so, are the code and the mc
    on the same frame? also you should note that the code posted above
    is meant to be placed on your root time line, not directly on the
    mc identified as ( book ). one more thing: you must target your mc
    ( book ) correctly.
    target like this:
    IF YOU ARE ON THE MAIN TIME LINE ( _root ):
    // if ( book ) is setting on the _root already then your
    target path is simply book.onRelease.
    // if ( book ) is setting inside another movieclip on the
    _root, find out what movieclip ( book )
    // resides in. that will now be the first part of your target
    path.
    // next find out if ( book ) resides in yet another
    movieclip. if so, that will be the next part of
    // your target path.
    // continue this until you reach ( book ). the entire path
    you took to reach ( book ) is your
    // target path.
    // you can also click on the target icon in your actionscript
    pane to insert a target path for
    // your movieclip.
    here is an example in which ( book ) resides inside another
    movie clip ( yourMovieClip ) on your _root:
    yourMovieClip.book.onRelease = function () {
    getURL("
    http://www.cnn.com/");

  • How do I stop a Movie Clip (Button) from working once clicked?

    Ok,
    I'm using a movie clip as a button to show content on a page, effectively its like a new page of the website. Problem is, with the script im using for it, once the content is show, the button is still active and if clicked again, will re-load the content. I want a way to effectively disable the button whist the content is shown.
    Thanks.
    this.services_inner.buttonMode = true;
    this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
    this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
    function rollOver_services(evt:MouseEvent):void {
    this.services_inner.play();
    function onClick_services(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.colour.gotoAndPlay(2);

    Thanks, that does stop it, however, i now need it to work again if a different button is clicked... there are 4 buttons (movie clips) in total, so I assume I'd just need to add the event listener back again on click of the others?
    This is the "Services" Button, with the event listener removal.....
    this.services_inner.buttonMode = true;
    this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
    this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
    function rollOver_services(evt:MouseEvent):void {
    this.services_inner.play();
    function onClick_services(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.colour.gotoAndPlay(2);
    this.services_inner.removeEventListener(MouseEvent.CLICK, onClick_services);
    This is the "Contact" Button, which when clicked would need to "re-activate" the Services button.
    this.contact_inner.buttonMode = true;
    this.contact_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_contact);
    this.contact_inner.addEventListener(MouseEvent.CLICK, onClick_contact);
    function rollOver_contact(evt:MouseEvent):void {
    this.contact_inner.play();
    function onClick_contact(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.art.gotoAndPlay(2);
    this.services_inner.removeEventListener(MouseEvent.CLICK, onClick_contact);

  • Button "go to movie clip"

    Hi,
    I had previously posted a discussion entitled "how to link a
    button to a .swf file" and after some feedback, decided to try and
    create multiple movie clips (which were actually to be individual
    site pages) which could be accessed by clicking on a particular
    button. The last response I left was this:
    Okay, here I am again. So I created a movie clip called
    ENERGYwhiteTransparentBoxMC. On my Sustainability page, there is a
    button called Energy Services. When I click on that button, I would
    like it to go to the ENERGYwhiteTransparentBoxMC and begin (which
    is a page that is laid out identical to the Sustainability page
    only with a new image, new text, etc.)
    In my button movie clip which contains the Energy Services
    button (as well as 2 other buttons), I applied the following
    actionscript in the first frame.
    import flash.events.EventDispatcher;
    import flash.display.MovieClip;
    this.stop();
    function startMovie(event:MouseEvent):void
    this.gotoAndPlay(ENERGYwhiteTransparentBoxMC);
    btnEnergyServices.addEventListener(MouseEvent.CLICK,startMovie);
    A couple of things...
    1.) it doesn't work and go to the Energy Services movie clip
    when the Energy Services button is clicked.
    2.) my stop action that had previously been applied doesn't
    work (the links fade in and drop, the transparent box slides
    in...but they are supposed to stop and now they don't). So, I'm
    confused as to where to apply the stop action for this now.
    Am I close at all?????
    I would also add now that I wasn't sure what to insert here:
    this.gotoAndPlay(
    TextENERGYwhiteTransparentBoxMC);
    ...I would like it to go to the movie clip that is called
    ENERGYwhiteTransparentBoxMC.
    It might help to check out my original post as I explained it
    better there what I was trying to do. I last posted on it today,
    November 19. Any help would be greatly appreciated!
    Thank you!

    Just a suggestion: maybe the preloading could be done in a
    movie script of the new movie and the particular cast member sent
    to the new movie in a global variable.

  • Moving three movie clips together to a y co-ordinate of an event click

    I have 9 buttons (with instance names mov_1 - mov_9) verticle along a page. I want movie clips a, b and c. with instance names (ltop, graphic and lbottom). to move in parrallel down the page to the y co-ordinates of each of the 9 button movie clips when clicked on. My code so far for each of the cases is:
      public function onClicked( e:MouseEvent ):void
       var circle:MovieClip = e.currentTarget as MovieClip;
       HtmlTextFieldFactory.formatTextFields(  [panel.title, panel.content], this.context );
       switch( circle )
        case mov_1:
         panel.title.htmlText = _modelDataHelper.getTextAssets( "ct1" );
         panel.content.htmlText = _modelDataHelper.getTextAssets( "c1" );
         panel.x = 30;
         panel.y = 438;
         circle.alpha = 1;
         circle.removeEventListener(MouseEvent.MOUSE_OUT, onMouseOut );
         circle.removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver );
         var mov_1_y:Number = mov_1.y;
         var myTween1a:Tween = new Tween(graphic, "scaleY", Strong.easeOut, graphic.scaleY, 1, 2, true);
         var myTween1b:Tween = new Tween(graphic, "y", Strong.easeOut, graphic.y, mov_1_y, 2, true);
         var myTween1c:Tween = new Tween(ltop, "y", Strong.easeOut, ltop.y, graphic.y, 2, true);
         var myTween1d:Tween = new Tween(lbottom, "y", Strong.easeOut, lbottom.y, graphic.y + 135, 2, true);
         break;
    Currently on one click of mov_1, graphic moves to the correct place. But it takes a second click before ltop and lbottom move to the correct place. I am needing them to move at the same time, together.
    Any suggestions?
    Thanks

    This is happening because of what the value of graphic.y is at the time of instantiating myTween1c and myTween1d. Perhaps they should be this:
    var myTween1c:Tween = new Tween(ltop, "y", Strong.easeOut, ltop.y, mov_1_y, 2, true);
    var myTween1d:Tween = new Tween(lbottom, "y", Strong.easeOut, lbottom.y, mov_1_y + 135, 2, true);
    HTH

  • Resize a movie clip

    Hi,
    Here is the scenario:
    I have a document with the following dimentions:  1000x700 px. In Scene 1 I have a movie clip called mc_master. Inside mc_master I have all the other elements (buttons, movie clips, graphics, etc.)
    I need to resize the whole document vertically, so in Scene 1 I resized the document to 1000px x 850px. This created a 150px empty space in the bottom of the document. I wanted to resize mc_master to include this space (basically mc_master should cover the whole document). However, when I selected mc_master and modified its height property all elements inside stretched instead of just including the blank space at the bottom.
    To simplify the question: is there a way to enlarge a movie clip without distorting the element inside it? I am assuming that I can create a new movie clip with the new dimentions in Scene 1 and then copy all the elements from mc_master inside the new clip, but I wondered if there is a better method of handling this situation?
    Thank you,
    Daniel D.

    Thank you meqlomor,
    This is what I was looking for.
    Daniel D.

  • 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

  • How do I create a play button for movie clip using AS3

    Hello.
    Bit new to this and have been searching the adobe forums and google. I am trying to create a button that will play an imported MovieClip.
    I have a movie clip that I've imported into it's own layer (Layer1) Frame 1.  I've given the MovieClip an instance name of foundationMovie.
    I've created a button and have that on its own layer(Layer2) above layer1, it is also in Frame 1.
    I've added a
    stop (); action to layer2
    The video is not set to autoplay.
    I want the video to start playing when the viewer clicks the button.  I know I've got to put some kind of event listener using AS3 in my timeline somewhere.
    I've found some code and I've been trying to work with it.  I'm sure I've mutilated it beyond usability but this is what I've got.
    stop ();
    player.addEventListener(MouseEvent.CLICK,play);
    function play(event:MouseEvent)
    gotoAndPlay("foundationMovie");
    If someone could point me the right direction or help me with my code I would really appreciate it.  Thanks.

    First, you need to clear up what you are working with... a movieclip and a video are usually entirely different things.
    Next, your code may get you started on your way with some changes.   You shouldn't use "play" as a function name due to there already being a play() method/function in Flash.
    If the movieclip is a movieclip and has an instance name of "foundationMovie", and your button has an instance name of "player" then the following adjusted code would normally work...
    stop ();
    player.addEventListener(MouseEvent.CLICK,playMovie);
    function playMovie(event:MouseEvent)
         foundationMovie.play();

  • Button no longer works when inside a Movie Clip?

    Again I turn to the almighty Adobe forums for help...
    So basically, I've had this problem for over a day now, and I've posted on Experts-Exchange.com... to no avail really.
    So here we go:
    I have a button in a Flash project I've made. It's used to jump to another place on the root timeline, labelled "Why". It used to work perfectly.
    I have now placed the button inside a movie clip (it has to be in an animated sequence), but now it no longer works. It appears to work fine, the rollover state works and all. But when clicked it does nothing.
    The code I use to work the buttons goes on the main timeline, the code for this button is:
    mc_anim_backdrops_menu.btn_subsection1.onRelease = function() {
    gotoAndStop("Why");
    _global.swfloaded = "";
    Why does it no longer work? and what can I do to fix it?
    The question is posted here over at Experts Exchange - http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Act ionScript/Q_24888850.html
    what we've tried there is tracing the problem. The code seems to be pointing to the right place, but none of the actual function works.. as you'll be able to see if you open up the attached file (and change it's extension from .txt to .fla to get it working)
    So would someone be able to open it up, have a look and tell me what's wrong? Because I'm stumped. And frustrated.

    My guess is that you have a scope problem. By putting the button inside a movieclip you have made the buttons scope the same as that clip.
    So if you add a trace inside the release event handler, what do you get?
    trace("My current scope is: "+this);
    I'm guessing it is "_level0.mc_anim_backdrops_menu," right?
    So since you are using the global function of gotoAndPlay() it is looking for that label in the current timeline and not finding it.
    You should probably use the MovieClip method and specifiy which timeline it should look in.
    _root.gotoAndPlay("Why");
    _level0.gotoAndPlay("Why")
    _parent.gotoAndPlay("Why");
    both would probably work. I would never use the first two, other than to make sure that there wasn't something else going on...

Maybe you are looking for

  • Backing Up My Songs and Audio Books  AND  Updating to 3.1.2

    Hello, 1. My Touch is set for manual management of my songs and audiobooks and a few podcasts. What's on the Touch is not exactly what is in my Music Folder on my MacBook Pro which is the "home" computer. Most of my songs on the Touch are not from th

  • No sound output on Slimline S2130n (or USB activity)

    A buddy gave me this "HP Pavilion Slimline S2130n TV PC" to work on.  There was SO much junkware installed I had to do a Factory recovery back to Day-1.  It originally came with Vista Home Premium so, I updated it with SP1 and SP2.  I finished by  up

  • Read from own jar file

    Using netBeans IDE 4.1 I wrote a stand-lone application contained in a single jar file. It transforms xml files into drawings. I'd like to distribute the application with some sample xml-files in that one jar-file. But how can I make the application

  • Running SQL script at a certain time

    Please suggest in application express what I need to do to run a sql script say 6.00 AM every day

  • How can a client lie about its IP address to the server (HTTP)

    I'm trying to set the user agent property to other than Java/1.4.2_02, and also send requests to the server that should appear coming from ip specified by me. In another words i am trying that I could hit the server with variety of different setting