Add navigation buttons on top of every scene

Hello,
I've got a Flash movie with quite a few scenes and I'd like to add navigation buttons (prev\next) with AS3 to move from scene to scene.
Sounds easy but...
If I write this on first frame of first scene :
this.addChild(play_btn);
buttons will appear OK on this first scene but will disappear under objects of the second scene
If I change to
stage.addChild(play_btn);
button will appear OK over every scene but, as my SWF is loaded in an e-learning software that produces SWF, the buttons will remain on the "stage" of every slide of the final module ! I can't remove them when the user changes slide because I can't run AS3 when changing slide...
Is there way of adding the buttons "inside" my movie but on top of everything that might appear afterwards ? No more depth or Z order in AS3 ?
Thanks.
Please don't tell me using scenes is bad because I've been using them for years and I've always read that all scenes become a long timeline at runtime. They're just very handy to me.

  I believe in AS1/2 you can set a depth at any value.
Yes ! And that would have been handy here... not clean, but handy !
Here's what I did so far :
I added the buttons to the root and found a function that did the trick, called with a timer :
var play_btn:mcBtnPlay = new mcBtnPlay();
Object(root).addChild(play_btn);
function moveToTop(child:DisplayObject):void {
  (child.parent != null) ? child.parent.setChildIndex(child, child.parent.numChildren-1) : null;
function timerListener(e:TimerEvent):void {
  moveToTop(play_btn);
The only problem is that the buttons will flash on screen at scene change because the of the timer interval, but you can think it's on purpose (visual clue) .
Don't know if there's a more clever way to detect scene change apart from some code on each first frame of scenes ?

Similar Messages

  • How to add a button in top ribbons of ALL library types (Not just document libraries)?

    Hi there,
    How to add this custom button on all Library Types (Not just document libraries)?
    RegistrationId="101" RegistrationType="List" adds this button to Document Libraries only - which does not work for me.
    Thanks so much.

    Hi,
    According to your post, my understanding is that you wanted to add a custom button on the ribbon of all the library.
    You can refer to the following code snippet, it would add a custom button “Site Settings” on the ribbon of all the libraries.
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="ListViewCustomization" Location="CommandUI.Ribbon.ListView" RegistrationId="101" RegistrationType="List" Title="List View Ribbon Customization">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.Documents.Share.Controls._children">
    <Button Id="ListViewButton" Command="ListViewButtonCommand" Description="Go to Settings" LabelText="Site Settings" TemplateAlias="o2" Sequence="93"/>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="ListViewButtonCommand" CommandAction="/_layouts/settings.aspx" />
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    </Elements>
    More reference: http://msdn.microsoft.com/en-us/library/ms473643.aspx
    Thanks & Regards,
    Jason 
    Jason Guo
    TechNet Community Support

  • How to add one button at top of table that creates new rows each time a user clicks on it?

    In the help guide, there is an example of adding buttons to each row - an Add Row and Delete Row button.  I am interested in having one button at the top of the table that can add rows. 

    Hi,
    You can create a table with a header row, where you can place your add button in one of its cells.
    Then you need a script to create a new row in the buttons click event. In a table named 'Table1' with a row named 'Row1' it looks this way:
    Table1._Row1.addInstance()

  • Gallery navigation buttons

    Hi, is it possible to add navigation buttons to select an item an image gallery (First, Previous, Next, Last) to iterate through the selected items of a gallery?I have a photo gallery (OneDrive like) with thumbnails and a big image with the selected photo.
    I figured out how to do the first last, but still puzzling on the next / previous.
    First / Last:
    I programmed the OnSelect: UpdateContext({MyCurrentImage:First(PhotoTable)})
    Any help would be appreciated.

    Hi Mark,
    There is a way you could accomplish this, but your file names for the images will need to follow a similar pattern with a number. For the following discussion, assume that the file names are of the format SPx.jpg, where x is a number, i.e SP1.jpg, SP2.jpg
    etc and we use a context variable called Name. Therefore to accomplish this you could do the following:
    1) Add an Image Gallery onto the canvas and set its 'Items' property to your image source. This will be used for the thumbnails.
    2) Add a button, called Back and set its 'OnSelect'
    property to:
    UpdateContext({Count: Count - 1}); UpdateContext({Name: "SP" & Count & ".jpg"})
    3) Add a button, called Forward and set its 'OnSelect'
    property to:
    UpdateContext({Count: Count + 1}); UpdateContext({Name: "SP" & Count & ".jpg"})
    4) Add an Image Control. This will be used to display the image in a larger view. Set its 'Image' property to:
    First(Filter(Gallery3!AllItems, Title = Name))!Image
    5) Click the Back and Forward buttons a couple of times each and you should notice the image visible from the image control changing as you click.
    Note that this design will not actually move the selected Gallery item, but at least allow you simulate moving from one item to the next.
    As an alternative you could have the user select the photo they want to be displayed front and center, please see
    our tutorial video here. This walk through does not have navigation buttons, but at least presents an alternative for you.
    Hope this helps get you going?

  • How can I copy and edit navigation buttons and anchors to remain consistent?

    I have inherited a web site and I'm just getting started. I need to add navigation buttons that look like the ones already used on severalpages on my site. How do I reproduce these navigation buttons? I have attached one as an example. Thanks for helping such a rookie.

    Sue,
    Some very friendly advice here.  Stop what you're doing.  Put down the mouse. Walk into the boss's office or phone the client and tell them their current website is a flaming disaster.  It uses frames which makes the site overly complicated and difficult for site visitors to use.  To add further insult, the site is constructed so poorly as to be un-navigable. I can't even see the lower menu in Firefox 3.0.10 on XP.  Seriously, this needs to be rebuilt ASAP without frames and with a navigation system that doesn't suck.  In the long-run, a good CSS menu would be much simpler for you (and the next poor soul who inherits this site) to work with.
    Frames are Evil
    http://apptools.com/rants/framesevil.php
    CSS List menu
    http://www.projectseven.com/tutorials/css/uberlinks/index.htm
    CSS drop-down menus
    http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm
    Best of luck,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Buttons on top of an image?

    Ok, i've got a background image, currently being displayed by a custom canvas class that simply paints the image. I need add some buttons on top of this background image, but how can I do this? The canvas class doesn't allow bottons and the like to added to them, does it? Is there some other component I can extend, set the image as its background, and then add buttons to?
    Thanks in advance.

    import javax.swing.*;
    import java.awt.*;
    public class ImagePanel
    public static void main(String argv[])
    new ImagePanel();
    public ImagePanel()
    JFrame myFrame = new JFrame();
    myFrame.setSize(300, 400);
    myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    myFrame.getContentPane().add(new MyPanel());
    myFrame.pack();
    myFrame.show();
    public class MyPanel extends JPanel
    ImageIcon aboutimage;
    public MyPanel()
    //JPanel buttonpanel = new JPanel();
    aboutimage = new ImageIcon(getClass().getResource("about.gif"));
    this.setOpaque(false);
    JButton button = new JButton("OK");
    this.add(button, BorderLayout.CENTER);
    public void paint(Graphics g)
    aboutimage.paintIcon(this, g, 0, 0);
    super.paint(g);
    public Dimension getPreferredSize()
    return new Dimension(aboutimage.getIconWidth(),aboutimage.getIconHeight());
    } //end-class-MyPanel
    } //end-class-ImagePanel

  • We have been having a problem with newsletters for a client. The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!

    We have been having a problem with newsletters for a client.
    The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!
    This happened last month too. It seems to be related to length of the newsletter too. It works on every device except iPhones - so weird.

    Hi, is anyone else experiencing i-phone only problems on email campaigns? not bashing Apple, just having issues where our newsletter are only having issues on iPhones

  • How to add a button to every group's element in a presentation?

    Hi all!
    I am still a newbie with BPM. Just done the tutorial, a 2-day course and some experiments on my own. So, please, forgive my lack of knowledge.
    I need to add a button to every element of a group in a presentation. You can think this group as a list of invoices and the button linked to another presentation where you will be able to edit attributes of the single invoice. Completed this procedure you could come back to the first presentation where the whole list will be visible. And so on, until the user clicks the end button to confirm changes and exit the screenflow.
    I would like to use only simple presentation (not jsp). I have read about developers who create complex presentation, so I hope there are no limits about this issue.
    Thank you all!
    Luca

    There's no easy way to achieve this. You'll have to provide a RootPaneUI delegate with a custom title pane implementation. There, you'll have to provide a custom layout to position your button. In addition, this approach will not work on look-and-feels that do not support decorated mode (such as Windows or GTK) since under such LAFs the title pane always comes from the OS.

  • E 71 - navigation button light blinks every 5 seco...

    Is it a bug or a feature? The center light around the five way navigation button goes on every 5 seconds. Is this normal? Can I stop it?

    of course you can ! the feature is called "breathing light"
    menu > tools > options > modes => when you personalize your mode you have an option called "breathing light" or something like that (my phone is in french sorry !). it is the 9th option of the list, just after "vibrate".

  • How can I stick an accordion navigation MENU on top of a mobile scrolling page and make it work properly? As I can't pin it, I keep it on top of the page with scroll effect 0. It collapse, shows the menu buttons but doesn't close back once it reaches the

    How can I stick an accordion navigation MENU on top of a mobile scrolling page and make it work properly?
    As I can't pin it, I keep it on top of the page with scroll effect 0.
    It collapse, shows the menu buttons but doesn't close back once it reaches the anchorpoint.

    Muse won't let you, at least not that I know of. You could find the class in the code that muse gives it position: fixed…I think. You could paste it into the head area of your page properties to override the class. I believe something like this would give you persistent nav bar, pinned at the very top, on mobile:
    #youmuseclass {position: fixed;}
    I wouldn't use any parallax on mobile either, the performance is terrible.

  • How to add a Button on SUS top-right corner ( Near Log off button)

    Hi Experts,
    It's a bit urgent for me. Please give your valuable suggestions to achieve below scenario.
    My requirement is :-
    adding a button on top-right corner(near log-off button) of SUS screen.
    when that button is clicked, a pop-up should appear, which shows a list of supplier IDs.
    SUS user selects a supplier ID from this list.
    Subsequently, PO, Invoices and other documents should be filtered out based on supplier ID selected.
    Request you to help me how to achieve it technically. Thanks a lot.
    Regards,
    Ratnesh

    Hi,
    is that button really necessary or is it enough to achieve the functionality you are describing?
    If the latter, this is standard SUS.
    When you give that user the SUS admin purchaser role that user gets a 'find supplier' link in the menu at the left hand side.
    In here you can search for the correct supplier (or just press search without parameters and you get a list. When you click on one of the results the user will act as if it is an employee of that supplier. Including only displaying documents of that supplier.
    Regards,
    Robin

  • How can I make Navivation buttons remain coded through different scenes?

    Ladies and Gents,
    I am working on a flash website for an artist with a lot of work. In order to maintain my timeline clean and organized I have created multiple scenes to display the artwork.
    There is a home button and a a main navigation bar (present in every scene)
    there is also a sub navigation bar that leads to the artwork.
    The code is very simple and constant for all the buttons:
    btnHome.addEventListener(MouseEvent.CLICK, home);
    function home(evt:Event):void{
        gotoAndPlay(1, "Home");
    This works only in the scene where I first placed the code (Scene "Art"). The rest of the scenes give me this error
    ArgumentError: Error #2108: Scene Home was not found.
        at flash.display::MovieClip/gotoAndPlay()
        at Susan_Giles_MultipleScenes_Scene1999_fla::MainTimeline/home_1999()
    I am very confused because flash can find the scene "Home" and the other 11 scenes from the scene ART, but it cannot locate them from any other scene.... what am I doing wrong?
    I will appreciate all help.
    Thanks in Advance.
    J.

    One way would be to make the movieclip clickable.  That would make it block the other objects behind it...
         mc.onRelease = function(){ }
         mc.useHandCursor = false; // to hide the hand cursor
    Another way would be to disable the buttons while the movieclip is present...
         btn.enabled = false;
    Another way would be to build conditional code into the button clicking code to not work if the movieclip is visible.
         btn.onRelease = function(){
              if(!mc._visible){
                    // okay to do stuff

  • Scrollable/scalable image with buttons on top of it?

    Hey guys,
    I've had a few half-goes at doing this before but now have to do it for real in my project and I'm struggling to get something clean and I'm looking for pointers.
    I want to have an image (typically a schematic, or a map) which is scrollable and zoomable. I want to overlay some buttons on the image for controlling zoom (and other things, but lets keep it simple for now). I want the whole thing to be a custom component that I can drop into another panel, and for that custom component to be resized nicely inline with its parent (i.e. if I put it in a BorderPane.center it should take up the available space and no more or less).
    So I started with something logical/simple, a StackPane at the top-level with a ScrollPane containing an ImageView as the first child, and then an 'overlay' panel as the top child of the StackPane to conatain my buttons. I want to anchor my buttons to the top right of the image so I use an Anchor Pane for this. Something like:
    public class MapView extends StackPane
        public MapView()
            ImageView imageView = new ImageView(new Image("C:/temp/my-image.jpg"));
            ScrollPane scrollPane = new ScrollPane();
            scrollPane.setPannable(true);
            scrollPane.setContent(imageView);
            getChildren().add(scrollPane);
            HBox zoomButtons = new HBox(5);
            Button zoomInButton = new Button("+");
            zoomButtons.getChildren().add(zoomInButton);
            Button zoomOutButton = new Button("-");
            zoomButtons.getChildren().add(zoomOutButton);
            AnchorPane controls = new AnchorPane();
            AnchorPane.setRightAnchor(zoomButtons, 20.0);
            AnchorPane.setTopAnchor(zoomButtons, 5.0);
            controls.getChildren().add(zoomButtons);
            getChildren().add(controls);
    }This gives me the perfect layout but with one massive problem: the AnchorPane is stretched to take up the whole area of the StackPane (which is what I want from a layout perspective) but that means it blocks the mouse input to the underlying image view so I can't scroll.
    So I try adding a call to the handy setMouseTransparent method:
    controls.setMouseTransparent(true);And now I can scroll my image around, but I have the inverse problem: the buttons are now mouse transparent as well so I can't click them.
    Snookered.
    So maybe a Group is an option? I try using one instead of the AnchorPane:
    ImageView imageView = new ImageView(new Image("C:\\temp\\corso\\pandids\\pandid-2.jpg"));
    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setPannable(true);
    scrollPane.setContent(imageView);
    getChildren().add(scrollPane);
    HBox zoomButtons = new HBox(5);
    Button zoomInButton = new Button("+");
    zoomButtons.getChildren().add(zoomInButton);
    Button zoomOutButton = new Button("-");
    zoomButtons.getChildren().add(zoomOutButton);
    Group group = new Group(zoomButtons);
    getChildren().add(group);I get my buttons in the middle of the screen and I can both scroll my image and click my buttons. But I can't figure out a way to anchor the buttons up to the top right. Group seems to resize itself to the contents of its children (I imagine there's a reason for this, but it makes Group completely unusable for every scenario I've had for it), so I can't really adjust the size or position of the Group. Calling resize() seems to have no effect and there's no setMaxSize or setPrefSize. Calling setLayoutX doesn't do anything cause its all within a StackPane. The only horribly hack I can think of is to add a dummy component to the group which is the size of the container the group is in. Too painful and too fragile to be a real option.
    Snookered again.
    Maybe I need a Group at the top level instead of the StackPane, but then it all goes a bit nuts with the ImageView sizing and layout pretty much totally gone.
    The only other hack I can come up with is to put my own mouse listener on the anchor pane and implement 'panning' manually, but then the scroll bars won't work so I'll probably have to turn these off.
    It seems like this should be really easy, and the first, logical simple approach was so close it hurts. Am I missing something simple, or is it really this hard?

    Hi Zonski,
    what about this?
            Group group = new Group(zoomButtons);               
            group.translateXProperty().bind(group.layoutXProperty().subtract(20));
            group.translateYProperty().bind(group.layoutYProperty().multiply(-1).add(20));
            getChildren().add(group);Works for me
    Cheers
    Michael

  • Help with Re-Linking Navigation Buttons

    I have Adobe Flash CS3 Pro.
    I have a navigation header flash file that came with my website template and I am having difficulty making sense of the actionscript. It has a logo section with effects, 5 main nav buttons that move, and two extra link buttons above the navigation bar. Let’s focus on just the Navigation buttons for now. Here is what I have gathered. I have multiple text buttons on one movieclip, and I have successfully edited the text for each button. If I look at the actionscript in the top layer of this movieclip I see:
    “gotoAndStop(parent._parent.num);”
    I also have a separate movieclip symbol (with effects) with 5 buttons layers listed in the actionscript with the following actionscript tied to each button from numbers 1 through 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:
    stop();
    this["item"+_root.button].gotoAndPlay("s1");
    _root.link = _root.button;
    I also have a separate button symbol with the following actionscript:
    on (rollOver) {
                if (_root.link<>1) {
                            menu.item1.gotoAndPlay("s1");
    on (releaseOutside, rollOut) {
                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 website template came with 5 html pages that my flash navigation buttons correspond to: (index.html, index-1.html, index-2.html, index-3.html, index-4.html, index-5.html). My problem is that I have created new pages (index.html, about.html, featured.html, projects.html, contact.html). I would like each of the 5 buttons to correspond to these pages, not the existing standard “index-n.html” pages. 
    Also, this is probably not relevant, but each html page has something to this affect so I can see how they correspond to each button.
    <script type="text/javascript">
              var fo = new FlashObject("flash/menu_vf8.swf?button=2", "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 do I need to update or remove for the nav button LINKS to work with my new html pages rather than the standard 5 index-n.html pages that it automatically wants to link to?
    When I try and add a “getURL” command to each of the 5 buttons and test preview the movie, the links work, but it messes up the effects of the movieclip. In other words, the buttons don’t move, they are motionless, however the links work. If I added this command to each button in some way, what actionscript would I need to remove so there weren’t any complications? I need some expert help here for it would be much appreciated. I am a novice with Flash script and its killing me that I can’t figure it out. I asked for help from the template support and all they came back with was the following message and it wasn’t helpful:
    You need to duplicate each button you are editing - it is very important.
    2) Update the scripting to look 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 it to:
    on (release) {
    getURL("http://www.google.com");
    Also, I read through the following discussion, which was helpful to a degree, but it still didn’t answer my questions about getting the links to work.
    http://forums.adobe.com/message/3614092#3614092

    First of all, thank you for showing interest and helping out in my dilemma here. I wish I understood your meaning behind “on” because with my luck there is probably some hidden way of placing script on an object that I don’t understand or haven’t discovered yet.
    This is what I know:
    I have multiple text buttons on one movieclip entitled “textbutton1” (see previous picture), and I have successfully edited the text for each button and created two extra frames/buttons to make 7 total. If I look at the actionscript in the top layer of this movieclip I see:
    “gotoAndStop(parent._parent.num);”
    But there is no action on each individual frame (all 7 of them) on that layer.
    Like I mentioned before I have a separate movieclip symbol (entitled “menu effect”) with 7 button movieclip layers listed in the actionscript with the following actionscript on each layer.
    onClipEvent (load) {
                num=1;
    onClipEvent (load) {
                num=2;
    onClipEvent (load) {
                num=3;
    onClipEvent (load) {
                num=4;
    onClipEvent (load) {
                num=5;
    onClipEvent (load) {
                num=6;
    onClipEvent (load) {
                num=7;
    On the top layer (layer 4 frame 25) of these 5 buttons I have the following actionscript:
    stop();
    this["item"+_root.button].gotoAndPlay("s1");
    _root.link = _root.button;
    I can upload another particular image of the movieclip/actionscript if it would be helpful. Let me know.

  • First tab wont close, navigation buttons not working

    Every time I open up Firefox, the first tab loads up my Home Page. But none of my navigation buttons work. I cant go back or home or anything.Then the back, foreword, reload and stop buttons will work after I open up a new tab. I still can not click the home button, well i click it, but It just does nothing, and yes i have made sure I have a home page set. I am never able to close the first tab that opens with the browser until i close the entire browser. I am able to close any tab i open after, but never the first one.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    You may also have a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

Maybe you are looking for