Programming an event to apply to multiple objects

I want to group some objects (movie clips) in a way allowing me program an event that applies to all of the objects.
To be specific, I want to group some buttons in a video player. If the mouse hovers over any one of the buttons, that button's animation will jump to frame 2. How can I do this?
(I figured there is probably an easier way than programming each individual button to jump to frame 2 on mouse over.)

In AS3 the coding might be a bit simpler due to being able to identify the event object (button, etc), but in AS2 I believe the easiest way is to code each button individually.  You could always assign the functions conveniently in a loop fashion if the buttons are sequentially named to ease some of the coding burden.
If you were to use a button symbol, it will automatically go to the second (Over) frame without any need for code.

Similar Messages

  • Apply multiple effects to multiple objects with single click box

    I would like to click on a click box and have one object appear and another object disappear. I guess what I'd like to do is apply effects to multiple objects with a single click box. Is that possible?
    Thank you.

    Welcome to our community
    Sure it can be done but you won't use effects to do it.
    When you insert an object in Captivate, you have an option to enable or disable Visibility. You also have an option to name the object. So you would give the object a meaningful name and clear the Visibility option to "hide" it until needed.
    Then you would create an Advanced Action that would hide some objects and show others.
    After that, you would assign the Advanced Action to a Click Box or a Button or some other event.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Adding multiple objects

    Hi.
    I'm trying to add multiple objects to my universe, but i'm not sure how to do it. What i was thinking was to create a for loop and create the object within it.The z value refers to the z vector point.The code is below.I'm new to java 3D so if anyone could help me, that would be great.
    Thanks
    Sharon.      
    for (float z = 0f; z < 20f; z = z + 2){
              Cylinder cylinder = new Cylinder( 0.8f,10f );
              Color3f col = new Color3f(8f, .15f, .15f);
              ColoringAttributes ca = new ColoringAttributes (col,ColoringAttributes.NICEST);
              app.setColoringAttributes(ca);
              cylinder.setAppearance(app);
              Transform3D transform = new Transform3D();
              Vector3f vector = new Vector3f(0f, 0f, z);
              transform.setTranslation(vector);
              tg.setTransform(transform);
              tg.addChild( cylinder );
              bg.addChild( tg );
    }

    Hi.
    I have two programs, BGroup.java, which creates a rotating sphere and coloring attributes etc. and some1Canvas3D.java which creates a canvas and simple universe and panel with buttons and works on the BGroup.java program by adding it as a branchgraph to the simple universe "simpleU.addBranchGraph(new BGroup());". what i'd like to do is that if one of the buttons in some1Canvas3D.java is pressed then i want to decrease/increase the radius size of the sphere in BGroup.java. and see this within the canvas.
    I'm not sure how this will work.
    If anyone has any ideas how to do this, that'd be great.
    The code for the two programs is below . i'm quite new to Java3D so i hope it makes sense.
    Thanks for you help.
    Sharon
    /********BGroup.java****************
    import com.sun.j3d.utils.geometry.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import com.sun.j3d.utils.image.TextureLoader;
    public class BGroup extends BranchGroup
    public BGroup()
    /*create the transformGroup and set the capability to write.needed for rotation*/
    TransformGroup someGroup = new TransformGroup();
    someGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    //add the transform group to the branchgroup
    this.addChild(someGroup);
    //create the sphere and add it to the scene
    Sphere mysphere = new Sphere(0.5f);
    someGroup.addChild(mysphere);
    // Create a light that shines for 100m from the origin
    Color3f light1Color = new Color3f(7f, 2.6f, 4.1f);
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    Vector3f light1Direction = new Vector3f(9.0f, -7.0f, 5.0f);
    DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);
    light1.setInfluencingBounds(bounds);
    someGroup.addChild(light1);
    Transform3D yAxis = new Transform3D();
         Alpha rotationAlpha = new Alpha(-1, 4000);
         RotationInterpolator rotator =
         new RotationInterpolator(rotationAlpha, someGroup, yAxis,
                        0.0f, (float) Math.PI*2.0f);
         rotator.setSchedulingBounds(bounds);
         someGroup.addChild(rotator);
    this.compile();
    *********************some1Canvas3D.java******************/
    import java.awt.*;
    import java.awt.GraphicsConfiguration;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.universe.*;
    import com.sun.j3d.utils.geometry.*;
    import javax.media.j3d.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.awt.event.WindowAdapter;
    public class some1Canvas3D extends Applet {
    private Button go = new Button ("Forward");
    private Button go2 = new Button ("Left");
    private Button go3 = new Button ("Right");
    private Button go4 = new Button ("Back");
    private Button go5 = new Button ("Do it for me !!!");
    public void init()
    setLayout(new BorderLayout());
    GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
    Canvas3D c1 = new Canvas3D(config);
    c1.setSize(256,256);
    add("Center", c1);
    SimpleUniverse simpleU = new SimpleUniverse(c1);
    simpleU.getViewingPlatform().setNominalViewingTransform();
    simpleU.addBranchGraph(new BGroup());
    Panel p = new Panel();
    p.add(go);
    p.add(go2);
    p.add(go3);
    p.add(go4);
    p.setBackground(Color.blue);
    p.setForeground(Color.red);
    add("North",p);
    Panel p2 = new Panel();
    p2.add(go5);
    p2.setBackground(Color.blue);
    p2.setForeground(Color.red);
    add("South",p2);
    public void start() {
    public void destroy() {
    public void run() {
    //Explains what happens when the Mouse is clicked on the Applet
    public void actionPerformed(ActionEvent e) {
         if (e.getSource()==go ) {
    /*when this button is pressed i want to be able to decrease the radius size of the sphere in BGroup.java*/
    public static void main(String []args)
    System.out.println("Program Started");
    new MainFrame(new some1Canvas3D(), 750,500);
    Thanks again.
    Sharon.

  • Multiple objects to have the same rollover state at the same time (but link to different pages)

    Hi,
    I have a mac
    I would like to know how i can have multiple images with the same rollover states - but which show up at the same time on more than one image, (but each item to have its own linking property applied to it)?
    see image below: i want both box 'A' to pop with the same rollover state even if I'm hovering on just one of the boxes. But i want each of the boxes to link to different pages in my website.
    Ive tried grouping the images and moving them to their own layer, but the rollovers aren't 'linking' together on multiple objects
    help!
    thanks

    It's not, but you don't need that to achieve the behavior you've described. A1, a trigger, will have the states and hyperlink you desire. On rollover it will show its rollover state and will show its target container which will be directly on top of A2. It will look like a rollover state for A2. Repeat this for A2, B1 and B2 and I believe you achieve the behavior you've described. It's just a different way of approaching the problem (that happens to fit the tools available in Muse).

  • How do I create multiple objects during runtime?

    I don't know how to create multiple objects during runtime, here's my problem:
    I get a String as input. Then I create an object called newobject. I put the object in a hashtable with the above string as key.
    Then comes the problem, in order to create a new object, I have to rerun the same class, which uses the same name (newobject) to create a 2nd object. Now my hashtable doesn't reference to my 1st object anymore...
    Is there anyway I can fill up the hashtable with different objects, and make each key point to each object it was supposed to?
    For those who want to see a bit of the program:
    public class PlayBalloon{
    public Hashtable ht = new Hashtable();
    for(){
    Balloon pB = newBalloon;
    newBalloon=new Balloon(pB);
    ht.put("Some input from user", newBalloon);
    for(){
    ht.get(s).draw;<= s=string, draw=own meth. in Balloon
    }

    I think i can see the problem that you are having. You have, in effect, duplicate keys in your hashtable - ie, two strings used as keys with the same name.
    The way that a hashtable works is as follows...
    When you ask for a value that is mapped to a key it will go through the table and return the first occurence it finds of the key you asked for. It does this by using the equals() method of whatever object the key is (in your case it is a String).
    If you cant use different Strings for your keys in your hashtable then i would consider writing an ObjectNameKey class which contains the String value that you are trying to put in the hashtable and an occurrence number/index or something to make it unique. Remember to override the equals method in your ObjectNameKey object or else the hash lookup will not work. For example
    class ObjectNameKey {
        private String name;
        private int occurence;
        public ObjectNameKey(String name, int occ) {
            this.name = name;
            this.occurence = occ;
        public String getName() {
            return name;
        public String getOccur() {
            return occurence;
        public boolean equals(Object o) {
            if (!(o instanceof ObjectNameKey)) {
                return false;
            ObjectNameKey onk = (ObjectNameKey)o;
            if (onk.getName().equals(name) && onk.getOccur() == occurence) return true;
            return false;

  • Error while doing multiple object updation from EP ! object lock error

    HI all,
    I am doing multiple  object updation using a standard RFC(BAPI_PROJECT_MAINTAIN). The RFC i am calling from Enterprise portal. I am sending data to RFC one by one. But the error i am getting is object is locked by user so data can't be save.
    Though i am using Lock and unlock method before and after calling RFC the project lock error comes up.
    What might be the reason
    regards
    sandeep

    Hi Sandeep,
    Is the RFC you use for locking in the same model as the bapi BAPI_PROJECT_MAINTAIN? If it is not then you are using two connections for communication with the sap R/3 backend.
    You can do 2 things.
    1. You could add the RFCs for locking in the same model as the BAPI_PROJECT_MAINTAIN
    2. Instead of adding the RFCs in one model synchronize the connections the models use as follows:
    IWDDynamicRFCModel model1 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model1.class);
    IWDDynamicRFCModel model2 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model2.class);
    model1.setConnectionProvider(model2);
    You can do this in the wdDoInit. This will make sure both models use the same connection but closing a connection will close both at the same time.
    The same problem applies to commit/rollback functionality.
    Regards,
    Jeschael

  • Is there a way to shift select multiple objects in layer palette, not just highlight multiple object

    Hi,
    Is there a way to shift select multiple objects in layer palette, not just highlight multiple objects?
    I would want to do this when I have a bunch of objects hidden under some other objects on the artboard. This feature is available in PSD, so I assume Illustrator should have it.
    Thanks!

    Thanks for the reply, Harron.
    I'm using CS4 & below.
    Highlighting object - click on object in layers palette & it turns blue
    Select object - click on object in layers palette to the right of the circle, which creates a square, and selects the object on the artboard
    How do I shift-select multiple objects in the layers palette...select 50 objects with a click, then a shift-click? Shift-select works for highlighting, but not selecting. On most programs shift-select is used to grab a bunch of stuff...:0)
    In the past I have inadvertently selected multiple objects in the layers palette, by somehow alt?-dragging over the layers...or something...I can't re-create it.

  • Opening multiple objects in Photoshop

    Sorry but I'm new to the wonderful world of Macs having been dancing with the PC devil for too long!
    When using Photoshop, in the PC world, when opening any image, the background to the workspace is a uniform grey. On my shiny new Mac, the background to any image that I open is actually the desktop background. What this means is that my photoshop images "float" over what ever stuff is still open on my desktop and this can be extremely distracting.
    When I open Word (yes the Mac Word), I also get the same transparent background workspace.
    Is there a way I can set my Mac so that when I open up Photoshop (and any other program that can have multiple objects of different sizes open at once) so that the workspace default background is some sort of uniform grey and not the clutter of the other programs that are open on my desktop?
    Thanks, and sorry if this is a really obvious question.
    Chris

    There are several things you can do:
    1. In Photoshop itself you can choose Full Screen mode from the Tools Palette, it is the middle icon of the three little screen icons in the next to last row of goodies at the bottom. There is a variant (the last one) which also hides the menu bar and displays on a black background. Full Screen mode displays on a 50% gray background.
    2. If you want to keep the ability to quickly access other PS windows or the Finder Desktop items with a mouse click, you can simply hide other applications. Click hold on a running application in the Dock and choose hide.
    3. I have my main monitor set at a neutral gray, and keep Desktop clutter to a bare minimum. I also routinely hide applications I'm not using by using Option click into the one I'm currently using. You bring back an application by a click or option click on its Dock icon (the Option click hides the application you are leaving).
    The black screen option in Photoshop is kinda neat: if you hit the tab key after selecting it the tool palettes are hidden too. If you have rulers turned on you can toggle them off with Command-R, and see your image in splendid isolation from anything at all.
    Francine
    Francine
    Schwieder

  • How to image trace multiple objects at once on Illustrator CC?

    Hello,
    This may sound like a stupid question, but I am having troubles trying to image trace multiple objects all in one go.
    I'm currently working on Illustrator CC and I remember this process being a lot easier to do on Illustrator CS5.
    I have a typical job where I create client specific barcodes on a separate program, and then bringing them into Illustrator to vectorize.
    When I used to do it in CS5, all I had to do was release clipping masks, select all 50 or so barcodes, then Image Trace - and voila, al of my barcodes were vectorized at once - easy.
    I now have to vectorize about 120+ barcodes and Illustrator CC is only letting me select & image trace one barcode at a time. There has to be a better way, and I'm hoping someone here can help.
    (I would open up CS5 and do it from there, but my work computer was recently replaced with a newer iMac and was only provided with Illustrator CC)
    Thanks!

    Not sure what your barcode-specific challenges and methods may be, but my general aversion to the image trace feature compels me to suggest that you just create the barcodes in vectors in the first place. I do that using Terry Burton's free online barcode generator.

  • Pages '09: Can't select multiple objects with mouse?

    Hello! I want to select some shapes. I know that I can hold down shift and click on them individually one by one, but they're very many and grouped together, so I just want to draw a 'selection-rectangle' with the mouse, just as it works in all other programs I've ever used. But this doesn't seem to work. What am I doing wrong?

    Hello Stef,
    You can simply click and drag over an area to select multiple objects if you are in a Page Layout document, but since this is your fourth post you may be new to Pages and you may not yet even be aware of the Page Layout mode. At the top of your Pages window is the document title and next to the title in parentheses are the words "Word Processing" or "Page Layout".
    So, in a Word Processing document, it's just a little bit more involved. In the upper left corner of the window, click on the View icon and select "Show Layout". You will see gray around the edges - your desktop, a white sheet - your paper, and three rectangular outlines - the header field, the text frame and the footer field. This assumes that you have the Header and Footer turned on.
    As you move your mouse, the text insertion bar, a vertical line with curved features top and bottom, will move about the document. Move the insertion bar to the margin, outside of the boxes, and press and hold the COMMAND key. Your cursor will change to an arrowhead. Now you can select multiple objects by click-dragging, just as you are accustomed to doing in other applications.
    Regards,
    Jerry

  • Gradient Across Multiple Objects?

    I have a few dozen paint stroke objects that I'm wanting to apply a gradient to so the outlines fade from one color to another, but over all the lines as a whole rather than individually.  I've tried a number of approaches but none have been successful.  Does anybody have some good ideas on how to achieve this?  Thanks.

    Motion is likely to not allow grouping several objects if those objects contain various filters, or a mixture of groups with other objects... and ... the disclosure triangles are dialed down. If you collapse all the items you select, then grouping of multiple objects works.
    It is possible to create  image masks for each "stroke" (without the need for grouping the stroke objects together.) You can add as many Image Masks as you need. It's usually just more convenient to group all the objects together and use a single mask with the group.

  • How can i execute multiple database operations using multiple objects

    i have data in files which i need to read/parse and insert/update the database. can someone tell me how can i read multiple statements at a time and process using multiple objects.

    This doesn't seem like too much of a JDBC question or at least the answer as I see it isn't unique or specific to JDBC.
    If you want to run multiple processes within your single program then you need to use Java threads. I would recommend you read up on how to properly code Java threads and if you have questions unique to your multi-threaded JDBC implementation come back and ask those questions.
    You may also want tot take advantage of a transaction manager that includes a database connection pool that will handle most of the complexity for you. Depending on the flexibility of your architecture you may not have to do any thread coding at all when using a transaction manager.

  • CS6: Select multiple objects - Hide border?

    Hi!
    Lots of our layouters are bothered because of the same thing: If you select multiple objects in CS6, you'll get a border which surrounds all of the selected objects. That way it's quite difficult to see, which items are already selected and which aren't, especially if they are all aligned.
    I hope, you understand what I'm talking about. I displayed it in the following screenshot.
    The text frame and the yellow frame are selected. The red one isn't but you have to look closely to see that, because there is this thin border spanning over all of the objects, covering the red object, too.
    Is it somehow possible to hide / disable this "extra" border? If you have a lot of objects on the page (with backgrounds and everything), the layouters have some problems with seeing what they already selected and what they didn't select yet.
    Best,
    Anke

    @Bob: quite hard, if you have about 50 elements on one layer (the layouts are done with only two major layers .... don't ask me -.-)
    @pixxel schubser: nope, I mean the overall border, that covers all of them in one big frame...
    @Sandee: I know. But tell that to 20+ layouters, who want their program to work the same way as it did before (CS3...)... They are really confused by this extra border.
    @Ellis: Wow, I didn't try that! Great, no border!!! Only that seems to be a bit buggy. If you have a lot of objects, after time it seems to "lose" some of them you selected at the beginning. Still, I'll tell the layouters, maybe this will make them a little happier Thanks a lot!
    For all, who didn't quite know what I was talking about... this is Ellis' solution without the extra border:

  • Custom scrolller - issue with multiple objects....

    Hi,
    I'm developing a very simple custom scroller as a proof of concept. The idea is to have a background image(content_mc), lay multiple objects(myContent[i]) on top of the image, and scroll them all as a cohesive unit. However, I can not scroll myContent[i] appropriately; each object has a unique position and when I try to scroll them, they all assume one position(in which everything overlaps), move to that position and then scroll(see the ### comment below). Does anyone know how to accomplish this?(or does any of this not make the slightest bit of sense?)
    Thx for any help,
    Chipleh
    var rect:Rectangle;var scrollerMinY:Number = scrollbar_mc.scroller_mc.y;
    var contentMaxY:Number = content_mc.y;
    var padding:Number = 40;
    scrollbar_mc.scroller_mc.buttonMode = true;
    scrollbar_mc.scroller_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragIt);
    function dragIt(e:MouseEvent):void {
        rect = new Rectangle(4, 3, 0, 180);
        scrollbar_mc.scroller_mc.startDrag(false, rect);
        stage.addEventListener(MouseEvent.MOUSE_UP, dropIt);
        scrollbar_mc.scroller_mc.addEventListener(Event.ENTER_FRAME, scrollIt);
    function dropIt(e:MouseEvent):void {
        scrollbar_mc.scroller_mc.stopDrag();
        scrollbar_mc.scroller_mc.removeEventListener(Event.ENTER_FRAME, scrollIt);
    function scrollIt(e:Event):void
        var scrollerRange:Number = rect.height;
        var contentRange:Number = content_mc.height - mask_mc.height + padding;
        var percentage:Number = (scrollbar_mc.scroller_mc.y - scrollerMinY) / scrollerRange;
        var targetY:Number = contentMaxY - percentage * contentRange;
        content_mc.y = targetY;
        //###Herein lies the problem; I can not get multiple clips to align consistently like content_mc
        for(var i:int = 0;i<myContentArray.length;i++)
            var myContent:Object = MovieClip(root).getChildByName(myContentArray[i]);
            myContent.y = targetY - myContent.y;   

    Hiyas moccamaximum,
    Thx for the reply. Below are the screenshots, where the "align consistently" issue is apparent. When I instantiate the objects, the objects align per the "Before scrolling" screenshot. As soon as I start to scroll, the objects all align to one position(targetY)i.e.: "After scrolling" screenshot. I understand why that is happening, what i don't understand is how to maintain the layout of the objects while scrolling, per:
    for(var i:int = 0;i<myContentArray.length;i++)
            var myContent:Object = MovieClip(root).getChildByName(myContentArray[i]);
            myContent.y = targetY;   
    Before scrolling:
    During scrolling:

  • IL CS4 Variables to multiple objects

    Hi.
    How can I bind several objects (on the same artboard) to a single, common, variable?
    The methods I've tried don't seem to work.
    This is what I've done:
    Select multiple objects
    Click "make text dynamic" (This created two instances in the Variables panel with the same title and content)
    Click "Capture Data set"
    Click "Save Variable Library"
    Open XML file in notepad to reveal the following:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"    "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" [
    <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
    <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
    <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
    <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
    <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
    <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
    ]>
    <svg>
    <variableSets  xmlns="&ns_vars;">
    <variableSet  locked="none" varSetName="binding1">
    <variables>
    <variable  trait="textcontent" varName="Variable1" category="&ns_flows;"></variable>
    <variable  trait="textcontent" varName="Variable1" category="&ns_flows;"></variable>
    </variables>
    <v:sampleDataSets  xmlns:v="&ns_vars;" xmlns="&ns_custom;">
    <v:sampleDataSet  dataSetName="Data Set 1">
    <Variable1>
    <p>Hello World!</p>
    </Variable1>
    </v:sampleDataSet>
    </v:sampleDataSets>
    </variableSet>
    </variableSets>
    </svg>
    Edit the XML node "Variable1" from "Hello World!" to "WTF!"
    Save the XML file and close
    In IL click "Load Variable Library" and select the XML file
    Then I'm presented with a dialogue that reads "The incoming variable library is invalid"
    Am I doing something wrong? What should I do to bind several objects to one variable? Is it even possible to do so?
    BTW, I've read through the "variable" related posts in the forum but couldn't find an answer to this question. Apologies if it does exist and I've simply overlooked it.

    function(){return A.apply(null,[this].concat($A(arguments)))}
    How can I bind several objects (on the same artboard) to a single, common, variable?
    Think of the bound object as a field in a database. Normally, you wouldn't have two different values assigned to one field. It's not uncommon, however, to have two instances of a single field on a particular form or layout.
    But this is XML based, not table-based. Per my admittedly very limited understanding of XML, each "field" or container or placeholder on the page is associated with one element in one position in the XML. So if you want the same "value" (element) to appear in two locations, you have to have two "fields" on the page and two occurrances of the element listed in the XML, just as you would have to in a web page's linear HTML text.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    If I want to have, for example, two text objects with identical content but one in Arial 20pt and the other Times 40pt...
    ...Then you would have to have two variables in the dataset containing the same values, bound to the two separate placeholders.
    I agree it's lame. My guess is that Illustrator's Variables function sees relatively little use, compared to the amount of use it would have received as a normal data merge feature based on ordinary tab-delimited data.
    But with XML all the rage a few years ago, I guess AI had to get on the XML bandwagon, too.
    JET

Maybe you are looking for