Rollover scrolling menu - no buttons

So below is my code for a project I'm working on. I'm having some trouble though. I got the code for the scrolling menus online from another forum, but I can't figure out where that was. In any case, the current version of the code allows for the scrolling to happen when I open the page displays (enter Frame). But I can't figure out how to get the scrolling to happen only when I hover over the menu. Can anyone help? I only want each one to scroll when I hover over the menu, not when I get on the page. I tried to replace the "enterFrame" part of the code, but it didn't work right. I need this done ASAP. Thanks in advanced!
import fl.transitions.Tween;
import fl.transitions.easing.*;
var mymovie = this;
var mymovieW = this.width;
var horizontalMode = 0;//1--horizontalMode; 0--verticalMode
var spaceImg = 7;//space beteen images
var fade = 0.5;
var containerPosition_x = 2;//put the container with images to the buttom of the stage
var containerPosition_y = 1;//put the container with images to the right of the stage
var yoffset = 10;//offset to adjust the position of big image on y axis
var xoffset = 10;
var numItems;
var objects;
var container:MovieClip = new MovieClip();
this.addChild(container);
var scrolling:Boolean = true;
var useFixedImageSize = 1;
var thumbnails:Array = new Array();
//load xml file
var xmlData = "Photoimages.xml";//set xml data file
var xmlObj:XMLDocument;
init();//init call -> load config XML and create objects
function init()
    xmlObj = new XMLDocument();
    xmlObj.ignoreWhite = true;
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest(xmlData);
    loader.load(request);
    loader.addEventListener("complete", onComplete);
    loader.addEventListener("ioError", onIOError);
function onIOError(event:Event):void
    trace("IOERROR (maybe XML file does not exit or have an incorrect name)");
function onComplete(event:Event):void
    var loader:URLLoader = event.target as URLLoader;
    if (loader != null)
        xmlObj.parseXML(loader.data);
        xmlHandler();
    else
        trace("Loader is not a URLLoader!");
function xmlHandler()
    addObjects();
    startEngine();
function startEngine()
    container.addEventListener("enterFrame",startMovie);
function addObjects()
{//add objects in the scene
    objects = xmlObj.firstChild.childNodes;
    numItems = objects.length;
    for (var i=0; i<numItems; i++)
        var attr = objects[i].attributes;
        //Set the images
        thumbnails[i] = attr.thumb;
        init_thb(i);
function init_thb(i)
    if (useFixedImageSize == 1)
        var source1 = "AudioimgMc";//image mc linkage id from the library
    else
        source1 = "imgMc_01";
    var sourceType1 = "library";
    var regName1 = "p" + i;//the registration name used in Flash
    var classDef = getDefinitionByName(source1);
    var menuItemMc = new classDef  ;
    menuItemMc.name = regName1;
    container.addChild(menuItemMc);
    var myThumbMc = container.getChildByName(regName1);
    myThumbMc.buttonMode = true;
    myThumbMc.useHandCursor = true;
    myThumbMc.mouseChildren = false;
    myThumbMc["info"] = objects[i];
    myThumbMc.y = (myThumbMc.height+spaceImg)*(i);
    myThumbMc.x = (bkg.width-myThumbMc.width)/containerPosition_y;
    myThumbMc.alpha = fade;
    myThumbMc.addEventListener("mouseOver",mouseRollOver);
    myThumbMc.addEventListener("mouseOut",mouseRollOut);
    myThumbMc.addEventListener("mouseDown",mousePress);
function mouseRollOver(e:MouseEvent)
    e.target.alpha = 1;
function mouseRollOut(e:MouseEvent)
    e.target.alpha = fade;
function mousePress(e:MouseEvent)
    navigateToURL( new URLRequest( e.target["info"].attributes.url ), "_blank" );
function startMovie(e:Event)
    this.container.y += Math.cos((-stage.mouseY/stage.stageHeight)*Math.PI)*15;
        if (this.container.y > 0)
            this.container.y = 0;
        if (-this.container.y>(this.container.height-stage.stageHeight))
            this.container.y = -(this.container.height-stage.stageHeight);

I tried your solution but I got the following error.
ArgumentError: Error #1063: Argument count mismatch on Index_fla::AudiomovieClip_30/startEngine(). Expected 0, got 1.
Not sure why. Here is the updated code with your solution implemented. Thank you for helping me with this.
import fl.transitions.Tween;
import fl.transitions.easing.*;
var mymovie = this;
var mymovieW = this.width;
var spaceImg = 7;//space beteen images
var fade = 0.5;
var containerPosition_x = 2;//put the container with images to the buttom of the stage
var containerPosition_y = 1;//put the container with images to the right of the stage
var yoffset = 10;//offset to adjust the position of big image on y axis
var xoffset = 10;
var numItems;
var objects;
var container:MovieClip = new MovieClip();
this.addChild(container);
var scrolling:Boolean = true;
var useFixedImageSize = 1;
var thumbnails:Array = new Array();
//load xml file
var xmlData = "Audioimages.xml";//set xml data file
var xmlObj:XMLDocument;
init();//init call -> load config XML and create objects
function init()
    xmlObj = new XMLDocument();
    xmlObj.ignoreWhite = true;
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest(xmlData);
    loader.load(request);
    loader.addEventListener("complete", onComplete);
    loader.addEventListener("ioError", onIOError);
function onIOError(event:Event):void
    trace("IOERROR (maybe XML file does not exit or have an incorrect name)");
function onComplete(event:Event):void
    var loader:URLLoader = event.target as URLLoader;
    if (loader != null)
        xmlObj.parseXML(loader.data);
        xmlHandler();
    else
        trace("Loader is not a URLLoader!");
function xmlHandler()
    addObjects();
    container.addEventListener(MouseEvent.MOUSE_OVER,startEngine,false,0, true);
function startEngine()
    container.removeEventListener(MouseEvent.MOUSE_OVER,startEngine);// cleanup;
    container.addEventListener("enterFrame",startMovie);
function addObjects()
{//add objects in the scene
    objects = xmlObj.firstChild.childNodes;
    numItems = objects.length;
    for (var i=0; i<numItems; i++)
        var attr = objects[i].attributes;
        //Set the images
        thumbnails[i] = attr.thumb;
        init_thb(i);
function init_thb(i)
    if (useFixedImageSize == 1)
        var source1 = "PhotoimgMc";//image mc linkage id from the library
    else
        source1 = "imgMc_01";
    var sourceType1 = "library";
    var regName1 = "p" + i;//the registration name used in Flash
    var classDef = getDefinitionByName(source1);
    var menuItemMc = new classDef  ;
    menuItemMc.name = regName1;
    container.addChild(menuItemMc);
    var myThumbMc = container.getChildByName(regName1);
    myThumbMc.buttonMode = true;
    myThumbMc.useHandCursor = true;
    myThumbMc.mouseChildren = false;
    myThumbMc["info"] = objects[i];
    myThumbMc.y = (myThumbMc.height+spaceImg)*(i);
    myThumbMc.x = (bkg.width-myThumbMc.width)/containerPosition_y;
    myThumbMc.alpha = fade;
    myThumbMc.addEventListener("mouseOver",mouseRollOver);
    myThumbMc.addEventListener("mouseOut",mouseRollOut);
    myThumbMc.addEventListener("mouseDown",mousePress);
function mouseRollOver(e:MouseEvent)
    e.target.alpha = 1;
function mouseRollOut(e:MouseEvent)
    e.target.alpha = fade;
function mousePress(e:MouseEvent)
    //enter video code here
function startMovie(e:Event)
    this.container.y += Math.cos((-stage.mouseY/stage.stageHeight)*Math.PI)*15;
    if (this.container.y > 0)
        this.container.y = 0;
    if (-this.container.y>(this.container.height-stage.stageHeight))
        this.container.y = -(this.container.height-stage.stageHeight);

Similar Messages

  • Help With Scrolling Menu / Button Rollovers

    First thank you to anyone who can answer and help with this
    question.
    http://paragon.sortismarketing.com
    - at this link I have created a site with a simple scrolling menu.
    Now what I want to happen is when you rollOver the buttons on the
    scrolling menu they get larger and then smaller again after you
    roll off them.
    I know how to do this with tweening in a non moving
    environment, by making them a movie clip instead of button. But for
    some reason when I did this in this case it screwed the menu all up
    and made it go crazy. Is there a way to do this with action script
    that isn't going to screw up the underlying code for the
    scrolling?

    You can use the below code also. As your mouse pointer goes
    over the down, it will scroll down.
    on(rollOver){
    scrolltext.scroll -= 1;

  • Scrolling menu with indpendent static text

    I was hoping someone would be able to help me, im not very
    experienced, but i learn pretty quickly.
    This
    is a screenshot of my menu, it is a horizontal scrolling menu. Upon
    rollover, the icons glow red. I copied the actionscript from
    something i found online.
    I need static text to appear in the bottom section when each
    icon is selected, thus labeling the icon. I've tried different
    things, but each time the text would move horizontally as the icons
    do. I need the text to exsist independently from the menu, but i
    have no idea how to do this. Any help would be greatly appreciated.
    I can provide the FLA file if needed.
    this is the action script i have placed on the menu, i dont
    know if it will help
    xm = 0;
    //function to set the xpos of the movieclip
    function xpos(bar_length,mul)
    hpos = 0;
    scroll_length = 490;
    incr = bar_length/scroll_length;
    xm = _xmouse;
    if(_xmouse <= 10){xm = 10;}
    if(_xmouse >= 400){xm = 400;}
    scroll_x = hpos - xm;
    scroll_x = scroll_x * mul;
    x_pos = scroll_x * incr;
    x_pos = x_pos + hpos;
    return x_pos;
    _root.onEnterFrame = function ()
    // call function xpos
    x_pos = xpos(700,.20);
    with (bar)
    _x += (x_pos - _x)*.4;
    // call function xpos
    x_pos = xpos(950,.75);
    with (menu)
    _x += (x_pos - _x)*.4;
    thanks it advance

    you will need to create a 'dynamic' text field in the
    position that you want there, and then assign text to the field on
    rollOver of the button clip. You can control the text assignment
    from within the onRollOver and onRollOut handlers. Something like
    this from the main timeline:

  • Scrolling menu with independent static text

    I was hoping someone would be able to help me, im not very
    experienced, but i learn pretty quickly.
    This
    is a screenshot of my menu, it is a horizontal scrolling menu. Upon
    rollover, the icons glow red. I copied the actionscript from
    something i found online.
    I need static text to appear in the bottom section when each
    icon is selected, thus labeling the icon. I've tried different
    things, but each time the text would move horizontally as the icons
    do. I need the text to exsist independently from the menu, but i
    have no idea how to do this. Any help would be greatly appreciated.
    I can provide the FLA file if needed.
    this is the action script i have placed on the menu, i dont
    know if it will help
    xm = 0;
    //function to set the xpos of the movieclip
    function xpos(bar_length,mul)
    hpos = 0;
    scroll_length = 490;
    incr = bar_length/scroll_length;
    xm = _xmouse;
    if(_xmouse <= 10){xm = 10;}
    if(_xmouse >= 400){xm = 400;}
    scroll_x = hpos - xm;
    scroll_x = scroll_x * mul;
    x_pos = scroll_x * incr;
    x_pos = x_pos + hpos;
    return x_pos;
    _root.onEnterFrame = function ()
    // call function xpos
    x_pos = xpos(700,.20);
    with (bar)
    _x += (x_pos - _x)*.4;
    // call function xpos
    x_pos = xpos(950,.75);
    with (menu)
    _x += (x_pos - _x)*.4;
    thanks in advance

    you will need to create a 'dynamic' text field in the
    position that you want there, and then assign text to the field on
    rollOver of the button clip. You can control the text assignment
    from within the onRollOver and onRollOut handlers. Something like
    this from the main timeline:

  • Movieclip with scrolling menu

    In my site (stage1200x650) I use a button to load a movieclip
    (the loaded swf file is 550x400) the movie contains a menu with
    buttons wich I whant to scroll throug horizontaly. How do I make a
    scrollbar that scrolls through the menu horizontaly?
    thx
    K

    Please check out this video which addresses your query regarding changing the anchor link state as you scroll: http://www.youtube.com/watch?v=qNsI6DHz5Co
    Cheers,
    Vikas

  • Adding menu-like buttons to JToolBar (such as Back button in Netscape)

    Hi,
    I wonder wether it is possible to add a menu-like button to a JToolBar. I tried adding a JMenu but didn't succed, since the menu's visual appearance was completely messed up and, furthermore, it didn't respond to mouse clicks.
    Any hints appreciated.
    Janek.

    To do that, I wrote 3 classes.
    At the end, the new menu reacts and can be used exactly as a JMenu.
    The first class is the menu class which extends JMenu :
    import javax.swing.*;
    * This class override the method boolean isTopLevelMenu() to
    * allow a menu to be a top level menu in a JMenuBar and a JTollBar also !
    public class MyMenu extends JMenu {
        public MyMenu() {
            super("");
        public MyMenu(String s) {
              super(s);
        public MyMenu(Action a) {
              super(a);
        public MyMenu(String s, boolean b) {
            super(s,b);
         * Returns true if the menu is a 'top-level menu', that is, if it is
         * the direct child of a menubar.
         * @return true if the menu is activated from the menu bar;
         *         false if the menu is activated from a menu item
         *         on another menu
        public boolean isTopLevelMenu() {
            if (getParent() instanceof JMenuBar  || (getParent() instanceof JToolBar))
                return true;       
            return false;
    }The second class extends JToolBar. It is necessary to redefine the MenuBar behavior : When a menu is pressed, you can move the mouse over the other menus and they will open themselves, etc... So the toolbar must implements the interface MenuElement
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    * This class implements MenuElement to obtain the same behavior
    * as a JMenuBar.
    public class MyToolBar extends JToolBar implements MenuElement {
         public MyToolBar() {
              super();
         * Implemented to be a <code>MenuElement</code> -- does nothing.
         * @see #getSubElements
        public void processMouseEvent(MouseEvent event,MenuElement path[],MenuSelectionManager manager) {
         * Implemented to be a <code>MenuElement</code> -- does nothing.
         * @see #getSubElements
        public void processKeyEvent(KeyEvent e,MenuElement path[],MenuSelectionManager manager) {
         * Implemented to be a <code>MenuElemen<code>t -- does nothing.
         * @see #getSubElements
        public void menuSelectionChanged(boolean isIncluded) {
         * Implemented to be a <code>MenuElement</code> -- returns the
         * menus in this tool bar.
         * This is the reason for implementing the <code>MenuElement</code>
         * interface -- so that the menu bar can be treated the same as
         * other menu elements.
         * @return an array of menu items in the menu bar.
        public MenuElement[] getSubElements() {
            MenuElement result[];
            Vector tmp = new Vector();
            int c = getComponentCount();
            int i;
            Component m;
            for(i=0 ; i < c ; i++) {
                m = getComponent(i);
                if(m instanceof MenuElement)
                    tmp.addElement(m);
            result = new MenuElement[tmp.size()];
            for(i=0,c=tmp.size() ; i < c ; i++)
                result[i] = (MenuElement) tmp.elementAt(i);
            return result;
         * Implemented to be a <code>MenuElement</code>. Returns this object.
         * @return the current <code>Component</code> (this)
         * @see #getSubElements
        public Component getComponent() {
            return this;
    }The last class and morer difficult is the MenuUI. In my implementation, I use the WindowsLookAndFeel, so I redefine the WindowsMenuUI to look like Windows.
    I give you my code also (please, imagine how difficult it was to write!) :
    import com.sun.java.swing.plaf.windows.*;
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import javax.swing.plaf.ComponentUI;
    import javax.swing.plaf.basic.BasicMenuUI;
    import javax.swing.plaf.basic.BasicGraphicsUtils;
    import javax.swing.event.MouseInputListener;
    import javax.swing.*;
    * Windows rendition of the component.
    * <p>
    * <strong>Warning:</strong>
    * Serialized objects of this class will not be compatible with
    * future Swing releases.  The current serialization support is appropriate
    * for short term storage or RMI between applications running the same
    * version of Swing.  A future release of Swing will provide support for
    * long term persistence.
    public class MyWindowsMenuUI extends WindowsMenuUI {
        private boolean isMouseOver = false;
         private int shiftOffset = 0;
         private int defaultTextShiftOffset = 1;
        public static ComponentUI createUI(JComponent x) {
              return new MyWindowsMenuUI();
         * Draws the background of the menu.
         * @since 1.4
        protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) {
              ButtonModel model = menuItem.getModel();
              Color oldColor = g.getColor();
            int menuWidth = menuItem.getWidth();
            int menuHeight = menuItem.getHeight();
              UIDefaults table = UIManager.getLookAndFeelDefaults();
              Color highlight = table.getColor("controlLtHighlight");
              Color shadow = table.getColor("controlShadow");
              g.setColor(menuItem.getBackground());
              g.fillRect(0,0, menuWidth, menuHeight);
              clearTextShiftOffset();
            if(menuItem.isOpaque()) {
                if (model.isArmed()|| (menuItem instanceof JMenu && model.isSelected())) {
                        // Draw a lowered bevel border
                        g.setColor(shadow);
                        g.drawLine(0,0, menuWidth - 1,0);
                        g.drawLine(0,0, 0,menuHeight - 2);
                        g.setColor(highlight);
                        g.drawLine(menuWidth - 1,0, menuWidth - 1,menuHeight - 2);
                        g.drawLine(0,menuHeight - 2, menuWidth - 1,menuHeight - 2);
                        setTextShiftOffset();
                   else
                   if (isMouseOver() && model.isEnabled()) {
                        // Draw a raised bevel border
                        g.setColor(highlight);
                        g.drawLine(0,0, menuWidth - 1,0);
                        g.drawLine(0,0, 0,menuHeight - 2);
                        g.setColor(shadow);
                        g.drawLine(menuWidth - 1,0, menuWidth - 1,menuHeight - 2);
                        g.drawLine(0,menuHeight - 2, menuWidth - 1,menuHeight - 2);
                   else {
                        g.setColor(menuItem.getBackground());
                        g.fillRect(0,0, menuWidth, menuHeight);
              g.setColor(oldColor);
         * Method which renders the text of the current menu item.
         * <p>
         * @param g Graphics context
         * @param menuItem Current menu item to render
         * @param textRect Bounding rectangle to render the text.
         * @param text String to render
         * @since 1.4
        protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) {
              ButtonModel model = menuItem.getModel();
              FontMetrics fm = g.getFontMetrics();
              int mnemonicIndex = menuItem.getDisplayedMnemonicIndex();
              // W2K Feature: Check to see if the Underscore should be rendered.
              if (WindowsLookAndFeel.isMnemonicHidden()) {
                   mnemonicIndex = -1;
              Color oldColor = g.getColor();
              if(!model.isEnabled()) {
                   // *** paint the text disabled
                   if ( UIManager.get("MenuItem.disabledForeground") instanceof Color ) {
                        g.setColor( UIManager.getColor("MenuItem.disabledForeground") );
                        BasicGraphicsUtils.drawStringUnderlineCharAt(g,text, mnemonicIndex, textRect.x, textRect.y + fm.getAscent());
                   else {
                        g.setColor(menuItem.getBackground().brighter());
                        BasicGraphicsUtils.drawStringUnderlineCharAt(g,text, mnemonicIndex, textRect.x, textRect.y + fm.getAscent());
                        g.setColor(menuItem.getBackground().darker());
                        BasicGraphicsUtils.drawStringUnderlineCharAt(g,text, mnemonicIndex, textRect.x - 1, textRect.y + fm.getAscent() - 1);
              else {
                   // For Win95, the selected text color is the selection forground color
                   if (WindowsLookAndFeel.isClassicWindows() && model.isSelected()) {
                        g.setColor(selectionForeground); // Uses protected field.
                   BasicGraphicsUtils.drawStringUnderlineCharAt(g,text, mnemonicIndex,  textRect.x+getTextShiftOffset(), textRect.y + fm.getAscent()+getTextShiftOffset());
              g.setColor(oldColor);
         * Set the temporary flag to indicate if the mouse has entered the menu.
        private void setMouseOver(boolean over) {
              isMouseOver = over;
         * Get the temporary flag to indicate if the mouse has entered the menu.
        private boolean isMouseOver() {
              return isMouseOver;
        protected MouseInputListener createMouseInputListener(JComponent c) {
            return new WindowsMouseInputHandler();
        protected void clearTextShiftOffset(){
            shiftOffset = 0;
        protected void setTextShiftOffset(){
            shiftOffset = defaultTextShiftOffset;
        protected int getTextShiftOffset() {
            return shiftOffset;
         * This class implements a mouse handler that sets the rollover flag to
         * true when the mouse enters the menu and false when it exits.
         * @since 1.4
        protected class WindowsMouseInputHandler extends BasicMenuUI.MouseInputHandler {
              public void mousePressed(MouseEvent e) {
                   JMenu menu = (JMenu)menuItem;
                   if (!menu.isEnabled())
                        return;
                   MenuSelectionManager manager = MenuSelectionManager.defaultManager();
                   if (menu.isTopLevelMenu()) {
                        if (menu.isSelected()) {
                             manager.clearSelectedPath();
                        else {
                             Container cnt = menu.getParent();
                             if(cnt != null && (cnt instanceof JMenuBar || (cnt instanceof JToolBar))) {
                                  MenuElement me[] = new MenuElement[2];
                                  me[0]=(MenuElement)cnt;
                                  me[1]=menu;
                                  manager.setSelectedPath(me);
                MenuElement selectedPath[] = manager.getSelectedPath();
                if (!(selectedPath.length > 0 && selectedPath[selectedPath.length-1] == menu.getPopupMenu())) {
                        if (menu.isTopLevelMenu() || menu.getDelay() == 0) {
                             MenuElement newPath[] = new MenuElement[selectedPath.length+1];
                             System.arraycopy(selectedPath,0,newPath,0,selectedPath.length);
                             newPath[selectedPath.length] = menu.getPopupMenu();
                             manager.setSelectedPath(newPath);
                        else {
                            setupPostTimer(menu);
              public void mouseEntered(MouseEvent evt) {
                   super.mouseEntered(evt);
                   if (!WindowsLookAndFeel.isClassicWindows()) {
                        setMouseOver(true);
                        menuItem.repaint();
              public void mouseExited(MouseEvent evt) {
                   super.mouseExited(evt);
                   if (!WindowsLookAndFeel.isClassicWindows()) {
                        setMouseOver(false);
                        menuItem.repaint();
    }This UI simulate also the rollover effect.
    And now here is a class to test this code (under 1.4 and Windows L&F):
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.plaf.basic.*;
    public class MenuToolBar extends JFrame {
         public static String windowsUI = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
         public MenuToolBar() {
              super("Menu toolbar");
              setWindowsLF();
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
              setBounds(312,250,412,200);
              MyMenu menu = new MyMenu("File");
              MyMenu menu2 = new MyMenu("Help");
              menu.add(new JMenuItem("Try"));
              MyToolBar tb = new MyToolBar();
              tb.firePropertyChange("JToolBar.isRollover", false, true); 
              tb.add(menu);
              tb.add(menu2);
              JToggleButton jt = new JToggleButton("Toggle button", new ImageIcon("tog.gif"));
              jt.setFocusPainted(false);
              tb.add(jt);
              tb.addSeparator();
              JButton jb = new JButton("Button", new ImageIcon("but.gif"));
              jb.setFocusPainted(false);
              tb.add(jb);
              getContentPane().add(tb, BorderLayout.NORTH);     
              setVisible(true);
         public static final void setWindowsLF() {
              try {
                   UIManager.setLookAndFeel(windowsUI);
                   UIManager.put("MenuUI", "MyWindowsMenuUI");
              catch (Exception exc) {
                   System.err.println("Error loading L&F: " + exc);
         public static void main(String[] args) {
              new MenuToolBar();
    }Execute that, to see if the result is OK for you!
    Another thing : could you please report my name if you use and distribute the code ?
    Tell me if this helps you!
    Denis
    [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Scrolling Menu

    I've created a scrolling menu that should work when I put the
    mouseover it. Its very simple but for some reason it doesnt work.
    I basically just have a movie clip where the thumbnails move
    to the all the way to the leftmost position. Then applied a stop
    action to the first frame. Then after giving my movie clip an
    istance name of btns_mc, I added this actionscript:
    on (rollover) {
    btns_mc.play();
    on (rollOut) {
    btns_mc.stop();
    http://www.stargrrl.com/scrolling.zip
    (the .fla)
    http://www.stargrrl.com/scrolling.htm
    Maybe I should try prevframe and nextframe?
    TIA
    Amelia

    Hmmm well I tried the prevframe and nextframe and its working
    now but its very jittery. Any suggestions? I've updated the links
    on my first post to reflect the new changes.
    A

  • Vertical scrolling based on buttons and NOT Mouse

    I have 5 elements, basically rectangles with different colors. What I want to do is scroll to particular color based on buttons action. I have placed 5 buttons above the first rectangle. Based on the button action it should scroll to a particular color and the 5 buttons should stay in the same place.
    I have created the layout in edge of what i want to do. I dont want the scrollbars hence, I have then hidden. And I dont want to achieve this using mouse scroll but with buttons. Scrolling using the buttons.
    example download:
    http://www.4shared.com/zip/RTTSNCrjce/Scrolling.html
    @heathrowe's example comes close to what i want to achieve. he has different menu items on each rectangle. I tried doing it but was unable to make the things work.
    EDIT: If I create a website in Adobe Muse using anchors and add actions on buttons to switch to that anchor, I want o do something similar in Adobe Edge. I had almost done the same with Muse, unfortunately it doesn't have responsive support, therefore I'm trying to do it in Edge
    Message was edited by: alexmathayes

    @Dareell I have uploaded the same file to Dropbox as well, you can download from the link:
    https://www.dropbox.com/s/h1wgkuzuqr0p8b2/Scrolling.zip
    TimJaramillo was able to get this but with 3 buttons here:
    http://forums.adobe.com/thread/1166717
    I want to do this by 5 buttons. I now know that it is possible by creating Symbols and putting action statements for scroll. If someone can walk me through in doing so, like step by step, I would be very thankful.
    Here's another example:
    http://raven.comyr.com/Raven.html

  • Help - Scrolling Menu

    I'm working on a scrolling menu for a web page at work in
    Flash 8, the kind where several images scroll along the page and
    can be clicked as buttons to access other pages of the web site (an
    example of a similar application can be found for reference at
    http://www.northstar.ca/).
    However, when I test the animation in Flash, the Action Script I've
    written isn't working properly. I have very little previous
    experience with Flash (basically just doing animations, I've never
    really created a useful application before), so it's very likely
    I'm doing something wrong. The code I am using can be found below.
    Any help would be greatly appreciated. Thanks.

    I think your running into a common problem here (guessing
    though) - that is when you have 'handlers' assigned to a parent
    clip (like the scrollbar containing the 'buttons') the parent
    'intercepts' event notifications from child clips - and as result
    causes them not to work. Solutions are to use a hitTest method for
    the parent scroller - so that if it is false it scrolls and if it's
    true then it stops, this is running within a onEnterFrame event
    loop. this way the handlers assigned to buttons contained within
    the parent scroller can still receive their event notifications and
    should operate normally.

  • Menu bar button hyperlink to open a new page?

    I want to know if there is a way to add a hyperlink to a Menu bar button to open a new page showing a pdf file?

    To open url on button click, you can use the following example, that I used in one of my cases...
    Z P/L analysis
        ls_button-text     = 'P/L analysis monitor'.
        ls_button-tooltip = 'P/L analysis monitor'.
        lv_string1 = 'javascript:window.open( "'.
        lv_string2 = '" );'.
        CONCATENATE lv_string1
        lv_url2
        lv_object_id
        lv_string2
        INTO lv_string3.
        ls_button-on_client_click = lv_string3.
        ls_button-page_id  = me->component_id.
        ls_button-enabled  = abap_true.
        APPEND ls_button TO rt_buttons.
        CLEAR ls_button.
    Comments:
    - lv_string3 represents the URL
    - lv_url2 contains the url of bsp component, which you can build manualy or read from any table with select single statement
    - lv_object_id represents the id of opportunity which you can read from BOL or with one of crm_order_read function modules
    Regards.

  • My classic has come up with a sreen which 5 lins of text (in large font) Line 1  says 5 in 1 line 2 sdrampass L3 chksum any ideas I've tried the MENU   CENTRE BUTTON with no joy HELP

    My classic has come up with a screen which has 5 lines of text (in large font) Line 1 says 5 in 1 Line 2 sdrampass L3 chksum Any ideas ? I've tried the MENU + CENTRE BUTTON with no joy HELP

    Hi starbugdriver,
    I recommend trying the iPod classic troubleshooting assistant here:
    iPod classic Troubleshooting Assistant
    http://www.apple.com/support/ipod/five_rs/classic/
    Have a good one!
    - Ari

  • I am looking at online tutorials about parallax scrolling websites but I have a fully updated version via Adobe Cloud. I'm on Windows 8.1 but my Muse doesn't have the 'fill/scroll' menu. Why? Is it only a Mac option?

    I want to create and offer a scrolling website for a restaurant client but I am confused by online tutorials that show a drop down menu with either fill or scroll.  I have checked for updates but I am fully up to date.  Does anyone know why I cannot access this scrolling menu please?

    Hi Vivek,
    Thank you for your kind advice which I greatly appreciate.  However, I think I have solved most of my problems by signing up with Train Simple on a $9 per month technical learning course.  Within a few minutes I was able to locate the fill - scroll menu by simply clicking on the actual text of fill - which for some reason I didn't know about!.  I stayed with the Muse fundamental course all day today and covered everything to do in Muse in great detail.  I am now looking forward to the single page website learning experience with scrolling!

  • Menu and Buttons not showing up!?!

    OK. I was trying to burn a iDVD project on my dual G5 desktop w/iDVD5. I would get "there's an error while rendering". After fiddling with it for a day and getting no where, I switched to my laptop (G4/1.25ghz/10.4.8) with iDVD6.0.3. I started to re-assemble the project and the Themes button appears with the themes, the Media button appears with the media, but both the Menu and Buttons buttons show up with nothing but a empty white area! I need to reposition some buttons, but I can't.
    Please help.

    This frequently helps solve some problems. Quit iDVD. Search for the file named com.apple.iDVD.plist and trash it. (A new one will be created next launch of iDVD.) Or look in: User/Library/Preferences. This may solve project loading errors too. Restart and use Disk Utility to Repair Permissions.
    You'll need to reset some Preferences.

  • How to make a scroll Bar with buttons

    Hi all,
    I am using Flash cs6 on an iMAC running 10.7.2
    I would like to know if anyone could please point me to a tutorial, showing "how to create a scroll bar with buttons". I am having a heck of a time finding a tutorial.
    Many thanks in advance.
    regards,
    DH

    http://learnola.com/2008/10/27/flash-tutorial-create-a-custom-scrollbar-with-actionscript/

  • Scroll bars & creating buttons problem

    I am trying to create a basic photo browser. The upper area is the enlarged view of the image. The lower portion is a scrollable view of the thumbnails in the directory chosen. I have most of it working...except that the scrollable view doesn't scroll, and the buttons that I created don't cause the image to show up in the main view port.
    There is the main window, divided into two parts: upper and lower. The upper part is the main view, as described above. The lower part is a panel. That lower panel contains two things, another panel and a button. This panel inside the lower section contains the scrollable window; this scrollable window is a viewport onto another panel that contains the dynamically created buttons (which are thumbnails of the images in the directory).
    I was trying to force the scrollbar policy to always show the horizontal bar (that is the only one I want visible) but that wasn't working either; I would get compiler errors when that was included. I have tried adjusting sizes of things, and the order that things are added to the main JFrame.
    Any suggestions would be appreciated.
    Here is the code:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import java.io.FileFilter;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.border.EtchedBorder;
    import javax.swing.filechooser.FileNameExtensionFilter;
    * PhotoGUI Browse
    * Description:  Generate a GUI interface for viewing a large view of an image and previews of thumbnails
    * in a directory.  There are two parts to the GUI:  large upper section for main viewing, and a short lower
    * section for viewing the thumbnail previews.  The lower section is also split into two parts:  the left part
    * is a scrollable pane where the thumbnails will be previewed, and then a small section to the right where
    * a button for changing directories will be present.  (I wanted the button to always be visible so didn't
    * put it in the scrollable area.)
    public class PhotoGUI extends JFrame {
         final int SIZE = 75;     //scaling size for images in thumbnail browser
         boolean firstRunThrough = true;               //Changes behavior of directory requester
         private JPanel thumbs;
         private JPanel pickNThumbs;
         private ImagePanel bigView ;
         private JScrollPane scroller;
         private JButton pickDirButton;
         private thumbSelectedListener thumbPicksNose;
         public PhotoGUI () {
              this.setDefaultCloseOperation (EXIT_ON_CLOSE);
              this.setSize(600,600);       //Starting size of the overall container.
              this.setTitle("Eye Photo photo browser");
              //The upper portion of the GUI, where the large view of the image will be held
              bigView = new ImagePanel();       
              //bigView.setSize (600,500);
              //The bottom section of the GUI; will hold the thumbnail previews
              //(in a scrollable panel) and a button for changing directories.
              pickNThumbs = new JPanel();             
              pickNThumbs.setBackground(Color.WHITE);
              pickNThumbs.setSize(600,100);
              pickDirButton = new JButton("Pick directory...");
              //pickDirButton.setSize(75,150);
              dirPickListener dirButton = new dirPickListener ();
              pickDirButton.addActionListener(dirButton);
              thumbs = new JPanel();              //The panel that will hold the thumbnail previews
              scroller = new JScrollPane(thumbs);       //Setting the scroll bar pane to view the thumbnail panel
              //scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
              //scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
              // scroller.setSize(525,100);          
              scroller.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
              pickNThumbs.add(scroller);
              pickNThumbs.add(pickDirButton);
              this.add(bigView);
              this.add(pickNThumbs, BorderLayout.SOUTH);
              String pickedDir = pickDir();               //Setting up the while loop so it will keep requesting
              if (pickedDir.equals("-1")) {
                   if (firstRunThrough)   System.exit(0);          //End program if they don't pick a dir the first time through.
              }else {
                   thumbsUp(pickedDir);                  //They picked good Dir; populate thumbnails
                   firstRunThrough = false;
         public String pickDir () {          
              // This is the file chooser method. 
              JFileChooser dirPicker = new JFileChooser();
              dirPicker.setDialogTitle("Pick a directory");
              dirPicker.setApproveButtonText("Open directory");
              dirPicker.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
              int x = dirPicker.showOpenDialog(getParent());   //maybe I don't need this?
              if (x == JFileChooser.APPROVE_OPTION) {
                   return dirPicker.getSelectedFile().getAbsolutePath();
              } else return "-1";              //Just to cover all possible conditions
         public void thumbsUp (String chosenDir) {
              // Thumb populater method.  It adds each thumb-button to the scroller panel
              thumbs.removeAll();         //Need to remove old directory's buttons
              File selectedDir = new File(chosenDir);
             FileNameExtensionFilter filter = new FileNameExtensionFilter("JPG/GIF/BMP/PNG Images", "bmp", "jpg", "jpeg", "gif", "png");
              File [] dirEntries = selectedDir.listFiles();
              for (File tempFile : dirEntries) {    
                   if (filter.accept(tempFile) && tempFile.isFile()) {       //That way I only get certain types
                        JButton howToNameMultipleButtons = new JButton();
                        howToNameMultipleButtons.setActionCommand(tempFile.getAbsolutePath());
    //                    System.out.println(tempFile.getAbsolutePath());
    //                    System.out.println(howToNameMultipleButtons.getActionCommand());
                        howToNameMultipleButtons.setIcon(new ScaledIcon(tempFile.getAbsolutePath(), SIZE));
                        howToNameMultipleButtons.addActionListener(thumbPicksNose);
                        thumbs.add(howToNameMultipleButtons);
              this.setVisible(true);   //Down here so first run through program opens Dialog before showing
         public class dirPickListener implements ActionListener {
              public void actionPerformed (ActionEvent ae) {
                   thumbsUp(pickDir());     //Opens Dir selection dialog and feeds the thumbnail populater
         public class thumbSelectedListener implements ActionListener {
              public void actionPerformed (ActionEvent ae) {
                   String thumbPicked = ae.getActionCommand();    //Should return path string of thumbButton clicked
                   // System.out.println(ae.getActionCommand());    //TSing step; to see if this bit even fires off.
                   bigView.setImage(thumbPicked);
                   bigView.setToolTipText(thumbPicked);
                   //  bigView.setBackground(Color.GREEN);
    }

    Ah! I got some of it figured out at least...
    Setting the preferred size parameter has caused the scroll bars to display! :) Thanks for the hint on that.
    But I get an error when I try and use the scrollbar policy settings. Here are the results:
    Exception in thread "main" java.lang.IllegalArgumentException: invalid verticalScrollBarPolicy
         at javax.swing.JScrollPane.setVerticalScrollBarPolicy(Unknown Source)
         at javax.swing.JScrollPane.<init>(Unknown Source)
         at PhotoGUI.<init>(PhotoGUI.java:70)
         at PhotoBrowser.main(PhotoBrowser.java:15)And the code I used:
    scroller = new JScrollPane(thumbs,
                        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS,
                        ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);       //Setting the scroll bar pane to view the thumbnail panel
              Edited by: Mole_Hunter on Feb 1, 2010 9:57 AM

Maybe you are looking for

  • Want to Start Backing-Up and Would Like a Wireless Connection

    I will try to explain my question as simple as I can, but my tech knowledge is not the best, so please bare with me. As I said in the heading I would like to start backing up my MBP (something I never have done) and I would like to use a 3.5-4 year-o

  • Anyone with experience using DBMS_DATAPUMP.GET_DUMPFILE_INFO procedure?

    I want to get a little bit of information about the dump file prior to trying to restore. I think the get_dumpfile_info procedure will provide me with the information I seek. However, when I try to run the code below, I get an error on the get_dumpfi

  • Automatically create fillable fields

    Good afternoon, I'm using Acrobat Professional X (version 10.0.3).  I have an existing .pdf that I need to add fillable text fields and check boxes to.  Is there a way for these potential fields to be automatically detected and inserted into my .pdf,

  • Master Page Template problems

    1.)    I have a problem with the Master Page Template when I place a Back to Top link at the bottom of the page of the Master and then generate or publish my product the link only works at the higher level. If pages in the product are under a folder

  • Creating Servlets in Workshop

    Hi guys, A quick newbie question : How do I go about creating servlets in Workshop? and/or, I alternately copy a servlet file in my classes folder and manually tweak the web.xml file to point to this class in a WebProject. I however have to do the co