Navigation button question

OK, I'm moderator, and not much of a programmer.

What I have is a button which acts like a music video. you fly over and he did some aninmation, roll-off and and the reversal of the animation. Here's the code.

What I can't understand is when the button is clicked, I want the navigation to occur on the main timeline or root. My question is, what is the code that I have to place instead of the route command that will allow me to position the main timeline is a framework or an instance of movieclip? Thank you

anim_mc. Stop();

anim_mc.addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);
anim_mc.addEventListener (MouseEvent.MOUSE_OUT, onMouseOut);
anim_mc.addEventListener (MouseEvent.CLICK, onClick);

anim_mc.buttonMode = true;
anim_mc.mouseChildren = false;

function onClick(e:MouseEvent):void
{
trace ("Click");
}

function onMouseOver(e:MouseEvent):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

mc.removeEventListener (Event.ENTER_FRAME, rewind);

MC. Play();
mc.addEventListener (Event.ENTER_FRAME, advance);
}

function onMouseOut(e:MouseEvent):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

mc.removeEventListener (Event.ENTER_FRAME, advance);

mc.prevFrame ();
mc.addEventListener (Event.ENTER_FRAME, rewind);
}

function advance(e:Event):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

If (mc.currentFrame is mc.totalFrames)
{
MC. Stop();
mc.removeEventListener (Event.ENTER_FRAME, advance);
}
}

function rewind(e:Event):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

If (mc.currentFrame == 1)
{
MC. Stop();
mc.removeEventListener (Event.ENTER_FRAME, rewind);
}
on the other
{
mc.prevFrame ();
}
}

If this code is on the main timeline, use:

anim_mc. Stop();

anim_mc.addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);
anim_mc.addEventListener (MouseEvent.MOUSE_OUT, onMouseOut);
anim_mc.addEventListener (MouseEvent.CLICK, onClick);

anim_mc.buttonMode = true;
anim_mc.mouseChildren = false;

function onClick(e:MouseEvent):void
{
this.gotoAndPlay ("maintimelineframelabel");

otherwise, as a last resort, you can always use: MovieClip (root) .gotoAndPlay ("maintimelineframelabel");

}

function onMouseOver(e:MouseEvent):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

mc.removeEventListener (Event.ENTER_FRAME, rewind);

MC. Play();
mc.addEventListener (Event.ENTER_FRAME, advance);
}

function onMouseOut(e:MouseEvent):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

mc.removeEventListener (Event.ENTER_FRAME, advance);

mc.prevFrame ();
mc.addEventListener (Event.ENTER_FRAME, rewind);
}

function advance(e:Event):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

If (mc.currentFrame is mc.totalFrames)
{
MC. Stop();
mc.removeEventListener (Event.ENTER_FRAME, advance);
}
}

function rewind(e:Event):void
{
var mc:MovieClip = MovieClip (e.currentTarget);

If (mc.currentFrame == 1)
{
MC. Stop();
mc.removeEventListener (Event.ENTER_FRAME, rewind);
}
on the other
{
mc.prevFrame ();
}
}

Tags: Adobe Animate

Similar Questions

  • Help re - bind the Navigation buttons

    I have Adobe Flash CS3 Pro.

    I have a header navigation file supplied with my flash Web site template and I find it difficult to make sense of the actionscript. It has a logo with effects, 5 buttons main nav that move and two additional link above the navigation bar buttons. For now, let's focus on all the Navigation buttons. Here's what I've collected. I have several buttons text on a movieclip, and I successfully edited the text for each button. If I look at the actionscript code in the top layer of this movieclip I see:

    "gotoAndStop (parent._parent.num);"

    I also have a movieclip symbol separated (with effects) with 5 layers of buttons listed in the actionscript code with the following actionscript code associated with each key of numbers from 1 to 5:

    onClipEvent (load) {}

    Num = 1;

    }

    onClipEvent (load) {}

    Num = 2;

    }

    onClipEvent (load) {}

    NUM = 3;

    }

    onClipEvent (load) {}

    NUM = 4;

    }

    onClipEvent (load) {}

    NUM = 5;

    }

    On the top layer of these 5 buttons, I have the following actionscript code:

    Stop();

    This ["Item" + _root. Button] .gotoAndPlay ("S1");

    _root. Link = _root.button;

    I also have a symbol to separate with the following actionscript code button:

    on {(overview)

    If {(_root.link <> 1)}

    menu. Item1.gotoAndPlay ("S1");

    }

    }

    on (releaseOutside, deployment) {}

    If {(_root.link <> 1)}

    menu. Item1.gotoAndPlay ("S2");

    }

    }

    on (release) {}

    If {(_root.link <> 1)}

    _root.menu ["Item" + _root. Link] .gotoAndPlay ("S2");

    _root. Link = 1;

    getURL ("index.html");

    }

    }

    Now, my Web site template came with pages of html 5 that my flash navigation buttons are: (index.html, 1.html - index, index - 2.html, index - 3.html, index - 4.html, index - 5.html). My problem is that I created a new page (index.html, about.html, featured.html, projects.html, contact.html). I wish all 5 buttons to match these pages, not existing pages of standard "index - tswan.html.

    In addition, this probably isn't relevant, but each html page has something to that effect so I can see how they correspond to each button.

    < script type = "text/javascript" >

    var fo = new FlashObject ("flash/menu_vf8.swf? ") button 2 =', the 'head', '100% ', '144', '7', ' ');

    fo.addParam ("quality", "high");

    fo.addParam ("wmode", "transparent");

    fo.addParam ("scale", "noscale");

    FO. Write ("Head");

    < /script >

    I guess my real question is: what actionscript should I update or delete the nav button LINKS to work with my new html rather than the pages of index pages - tswan.html 5 standard he wants automatically a link to?

    When I try and add a "getURL" command to each of the 5 buttons and test to preview the film, the links work, but it messes up the effects of the movieclip. In other words, the buttons do not move, they are immobile, but the links work. If I added this command to each key somehow, what actionscript would I need remove so there are no complications? I need help expertise here because it would be much appreciated. I am a novice with Flash script and its killing me that I can't understand it. I asked for assistance in support of the model and all they came back with the following message, it was, and it was not helpful:

    1. You need to duplicate each button you change - it is very important.

      (2) update the script to search in a similar way:

      on (release) {}
      If {(_root.link <>num)
      _parent ["Item" + _root. Link] .gotoAndPlay ("S2");
      _root. Link = num;
      If (num == 1) {}
      getURL ("index.html");
      } else {}
      getURL ("index-" + Number(num-1) + ".html");
      }
      }
      }

      Update for:

      on (release) {}
      getURL ("http://www.google.com");
      }

    menu.jpg

    Also, I read the following discussion, which was helpful to a certain extent, but it is not always answer my questions about links to work.

    http://forums.Adobe.com/message/3614092#3614092

    Can I make the code see you now, it's an approach I've seen somewhat regularly for AS1/2 designs.  These "num" values that specifies the html pages that are linked.  Each button is assigned a value of num, in your case 1 to 5.

    Based on the line of code...

    getURL ("index-" + Number(num-1) + ".html");

    I think that your header links pages were named index - 1.html thru index - 4.html.  If you can see why I say that there is hope, that you can fix yourself.

    If you want to bind the new pages you either must name them agree with this convention, sense rename index about.html - 1.html, rename featured.html index - 2.html, etc... or change the way the values num are defined or updated profit.

  • Unmodifiable navigation buttons

    I created my website in dreamweaver cs3. After that I upgraded to cs4, I can't edit the navigation buttons (swf). All the keys related to the other pages of my site, but even in code view, I cannot see the links and therefore change where they're going.

    Ideas?

    Either one works. It's really more a question of how strict the grammar of the language is written/rendering code. So, with XHTML, you need to make sure that each tag is lowercase and closed.

    While HTML is a bit more lenient. You can write code in the top tiny (or mixed), you may not actually close the tags and the rendering engine it will make as if it was closed.

    Most web developers tend to favor XML as XHTML, because it can help them write better code and locate problems in their code.

  • Reusable toolbar: how to disable the navigation buttons

    Hi all
    I managed to create a reusable toolbar following the instructions of the angle of the ADF.
    Now, I would like to (for example the first and the precedents) navigation buttons are disabled when I reach the first record of the iterator.
    How can I do?
    I have to define a new method? With what parameters?

    Thank you

    Andrea

    Published by: user10799119 on November 19, 2009 06:41

    Hello Andrea,

    Creating component declarative, create attributes w for your component called "FirstEnabledAttr", "LastEnabledAttr" (like you how to create methods to handle the navigation). Now for the first button and the last button in the toolbar of the dc set the Disable property to #{attr. FirstEnabledAttr} and #{attr. LastEnableAttr}

    Recompile and redeploy your jar file.

    Now, in the project where you access this component, you can find the newly created 2 attributes added. Set

     #{!bindings.First.enabled}
    

    for FirstEnabledAttr and LastEnabledAttr together.

     #{!bindings.Last.enabled}
    

    It should work. Let me know if you have any questions.

    Kind regards
    ~ Ahmed

  • In the new version of Firefox 29.0.1 removed the ability to move the right side navigation buttons. Restored version of Firefox 28.

    I always work hard and with Firefox. My customization assuming that it is transferred always organize buttons back and forward in the navigation bar on the right side which was convenient for a quick job. In the new version of Firefox 29.0.1 deleted the possibility of moving the navigation on the right side buttons... Firefox is not flexible enough for the user. Really sorry. Restored version of Firefox 28. More frequent to not remove the flexible adjustment of the navigation keys. Thank you.

    28 Firefox has security flaws. It is not safe to use.

    You can move the navigation buttons in Firefox 29 if you install an add-on.

    1. Classic restaurateur theme installation and restart Firefox when prompted.
    2. Open the modules (Ctrl + Shift + A Manager; Mac: Command + shift + A), then the Extensions category.
    3. Beside the classical restaurant theme, click on the Options button.
    4. On the main tab, make sure 'Mobile back-forward button' is checked. Close the options window when finished.
    5. Right-click on a zone empty of the tab bar and select Customize.
    6. Drag the previous/next buttons wherever you want.
    7. Click the Customize the output at the bottom right button when finished.
  • How can I change the color of the icons of navigation buttons?

    I was wondering if there are modules or mods for 25 of Firefox that would allow me to change the color of the icons on the navigation buttons.

    I think along the lines of the old style where the buttons next and previous lit up green reloading, in blue, stop at home with a mixture of yellow and white, and red when, they are clickable.

    I find with Firefox 25, I get light when gray grey and dark grey when active, I think is a little hard to tell at a glance. I prefer the colour keys and hoped there was an add-on that would allow me to change this in Firefox 25.

    You will need to search the site of Mozilla Add-ons to see if you can find a theme with colors that suites you.

  • made faulty navigation buttons

    I began to feel a strange rendering of the navigation buttons

    then I tried to re - install FF. I discovered that it's empty, fresh installation of Firefox, everything is good,
    but once I have installed one of the modules, the navigation buttons get rendered defective (e.g. on mouse over)

    I don't know what the problem is?

    Try disabling hardware acceleration in Firefox.

  • HOW TO REMOVE THE NAVIGATION BUTTONS AND ICONS IN THE HOME SCREEN IN FF13

    The new version of Firefox 13.0 has just installed and I find the icons and the navigation buttons on the homescreen annoying and distracting and I want to remove them and leave everything else as is. Is there a way to do this easily? Thanks for the help.

    Add code to the file in the chrome folder userContent.css

    Customization files (interface) userChrome.css and userContent.css (Web sites) are located in the chrome folder in the user profile folder.

    See also:

    @-moz-document url(about:home){
     #launcher { display: none !important; }
    }
  • on my laptop running windows 7 more information disappeared from the window - topics (file, publishing, display, etc.), address bar and navigation buttons - everything I can see tabs - how do the lack of points to display

    Missing on my laptop running windows 7, all the info displayed at the top of the home page. All headings, i. e. file, change the view etc. disappeared. There is no address bar. There is no "home button", the button refresh, etc.. My wife was using the machine when it happened, so I don't know what she was doing. How to restore these features?

    most of the information has disappeared from the window - topics (file, publishing, display, etc.), address bar and navigation buttons

    When all the toolbars are missing, you are probably in full screen view, press F11 to toggle mode full-screen, or you can move the cursor to the top of the screen.

    The real problems you describe all set thanks to an extension and customization, see 01:10 steps later...

    You can make Firefox 5.0 looks not like Firefox 3.6.19, see numbered 1 to 10 points in the next topic difficulty Firefox 4.0 UI toolbar, problems (Make Firefox 5.0, or 4.0.1 resemble 3.6). If you make changes, you must be aware of what has changed and what it takes to use changed or missing features.

    It is much more beyond these first 10 steps in the list, if you want to make Firefox more functional.

    Toolbars and their contents have been rearranged and buttons have been merged dual-use, the net result is that I could see about 25% of what I had before and recorded about 10% of the area of the toolbar with great loss of functionality to hide things that might already be hidden and to create confusing buttons that already have keyboard shortcuts and don't need to be seen. The only good thing that has been ' Ctrl + / ' has been added to hide/show the modules bar that has not replaced the status bar.

  • Down grilled Navigation buttons?

    Hey!

    I must start by saying I love my Razr (xt910), but I seem to have encountered a small problem. Two of the four navigation buttons on the bottom of the phone, Menu and home buttons, stopped illuminating all of a sudden! The buttons they work very well, but as stated, lights don't, leaving only the right two lit, giving the razr look strange to say the least. I did a factory reset (twice), but both times he failed to make a difference, leading me to believe that whatever powers the lights for these buttons no longer works. Is this a common problem? Does anyone know how or if it's possible to repair? My Razr is still under warranty.

    Thank you!

    Hi aamd11,

    This would mean that it is better to send it in for repair. They will be able to help, call your local technical support hotline:

    http://bit.LY/SJ6AXs

    See you soon,.

    Nicole

  • Storm Navigation buttons

    Hi, I noticed that the BlackBerry storm has navigation buttons in multiple builtin applications that look as if they were standard on the phone. Examples would be the buttons at the bottom of the application calendar and the contacts application on nav (arrows, X symbol, new document, etc...). It is posibile use these buttons as a developer, or would I need to create personalized my buttons? Thank you!

    For some reason, RIM does not expose this "toolbar" API used by internal applications.

    We have created our own, using a custom HorizontalFieldManager holding of the custom BitmapFields.

  • Region of the ADF, submit and problem of navigation buttons

    Hello world

    My JDev is 11.1.1.7

    I have a jspx page and it has a region.

    There is an af:table, an af:form with navigation buttons and submit buttons in the region. When I run the page jspx, region is working.

    When I chose a table row, form updates. There is no problem here!

    But, when I want to use the buttons, for example, I used the navigation or submit buttons. Nothing happens.

    How can I solve this problem?

    Thank you

    There is an af:table, an af:form with navigation buttons and submit buttons in the region.

    When I read that part once again, it's not very clear is your table inside the af: form or not.

    You should have that one af:form in the hierarchy of the pages and everything must be placed inside this form.

    Dario

  • Interactive navigation button does not work on a specific page

    Hey everybody

    I used interactive navigation buttons in my document.  But when I come to page 7 I can't go any further (yet there are 5 pages coming soon).  The navigation on this page button does not work.  Can someone tell me how to solve this problem?

    Thank you

    Wendy

    Hello

    As Bob, today is your lucky LOL day - I am bilingual... so let me try and answer ;-) in Dutch

    IK zou ten eerste Gebeurtenis veranderen naar: Bij Loslaten of will.

    All en in het Lagen Panel een nieuwe laag aanmaken die ridiculous laag is.

    En dan knop in die laag plaatsen.

    Hopelijk works het dan wel.

    Line,

    CARI

  • How to connect multiple pages eachother and move to keyboard navigation buttons? THX.

    Hello

    I'm trying to link several pages eachother so I can jump them with the keyboard navigation buttons. Its like a next page previous, but instead of having people to click on the buttons of this, I want that they browse the site with the keyboard. I hope someone can help.

    THX.

    It is not possible. It is totally dependent on how browsers handle it, but otherwise you can not set something like the global key combinations.

    Mylenium

  • AS3 tutorials for students - App with basic navigation, buttons and animated content

    Hello

    I am looking to buy two beginner tutorials for AS3 for my HND interactive media students.  They are required to create an application with basic navigation buttons and content driven, maybe a gallery of pictures too.  Some students have difficulty understanding the foundations, e.g. functions etc.  I'm also looking for the extension exercises for students who understood that.

    Any help would be appreciated.  I am familiar with Doug Winnie, but find its too advanced tutorials.  I also know the lack of manual Flash.

    Thank you

    Anna.

    Adobe Flash Professional CC Classroom in a Book (version 2014): Russell Chun: 9780133927108: Amazon.com: books

    There are many others available. Search Amazon for "manual Flash software" and you'll find a bunch that are still in print.

    Lynda.com has tutorials web-based.

Maybe you are looking for

  • How do you find the incompatible software folder?

    I need to remove the software Trend Micro surfing out of the incompatible software folder, but I can't after several searches located where this folder is located on my Mac.  The computer tells me he created the folder on my boot drive, but when I op

  • fingerprint laptop scanner HP ENVY m6 m6-1225dx

    I can't configure the fingerprint reader.  I jumped the password established when I got this HP laptop.  Now when I boot my laptop scanner blinks, but it won't let me set it upward and you request a password or a scanner.  Because I never put my pass

  • Acquisition of images with lasers of switching

  • Virtually none of my older games will take place

    I am very frustrated and disappointed that if some of my old games will work on Windows 7, when I could get virtually all operate on XP.  Compatibility mode has been completely useless in most cases.  Under XP, I could run various corrections and pos

  • RMA process

    Hello I just RMA has my opinion 8G that I bought in February (the process literally took about 2-3 hours from the time of the call to the dispatch of the mp3 player on). I was wondering about how long an anyone of you had to wait for the replacement?