Make my script work while the MC is inside a scrollpane

Script im using the following as part of the main storyline and I have a lot of buttons inside the buttons_mc. How can I modify this script to create a button that is in the book of buttons_mc with a scrollpane.

dparty1.addEventListener (MouseEvent.CLICK, releaseone1);
function releaseone1(evt:MouseEvent):void {}
gotoAndPlay (45);
}

The code below, this is the scenario:

(1) two button with instance names btn1, btn2 and symbols are placed inside a movieclip that has an ID of MC link.

2) there's a scrollpane on the stage with an instance sp name

(3) the code below is placed on the main timeline (or what Ms chronology is in).  In this way, the code the buttons can directly manage the main timeline to do something.

SP.source = "MC"; Place the movieclip in the scrollpane

var menuClip:Object = sp.content; get a target for the MC inside sp

Add functions to listeners/event handler for the buttons in the MC inside Ms

menuClip.btn1.addEventListener (MouseEvent.CLICK, btn1Click);
menuClip.btn2.addEventListener (MouseEvent.CLICK, btn2Click);

function btn1Click(evt:MouseEvent):void {}
gotoAndPlay (45);
}

function btn2Click(evt:MouseEvent):void {}
trace ("clicked btn2");
}

Tags: Adobe Animate

Similar Questions

  • How to make a script to expand the column width

    Hi experts,

    Is it possible to make a script to expand the purpose of column width to let the poster any overset text columns?

    Respect of

    John

    Hi John,.

    Sorry about that, try this, it will count through all tables in your document.

    myTables = app.documents[0].stories.everyItem().tables.everyItem().getElements();
    
    for (var t = 0; t < myTables.length; t++) {
        BE_resizeColumnsToFitContents(myTables[t]);
        }
    
    function BE_resizeColumnsToFitContents(tableToEdit) {
        for (var i = 0; i < tableToEdit.columns.length; i++) {
            while (tableToEdit.columns[i].overflows === true) {
                tableToEdit.columns[i].width += 1;
                tableToEdit.columns[i].recompose();
                }
            }
        }
    

    Brett

  • How to make a script to resize the image to fit the exact framework?

    Good afternoon

    My friend works on a task to do several images to adapt to the size of the image 500 x 700 px.

    We are working on this script, if she sometimes makes the height above 700 px.

    Can anyone help to change?

    ___

    doc = app.activeDocument;

    doc.changeMode (ChangeMode.RGB);

    var fWidth = 500;

    var fHeight = 700;

    If (doc.width > fWidth, 'px') {}

    doc.resizeImage (UnitValue(fWidth,"px"), null, null, null, ResampleMethod.BICUBIC);

    }

    else {}

    doc.resizeImage (null, UnitValue(fHeight,"px"), null, null, ResampleMethod.BICUBIC);

    }

    ___

    The thing is the need of the image to have a ratio of 5:7 to fit 500px 700px area.  An image can have a width and height of any number of pixels. All a camera will have a width and a height greater than the 700px. If your script above would create a very distorted portraits bouquet close

    Download the package of my action craft he has a script that I wrote for use in actions that make it very easy to do what you want.

    Scripts can be used in actions and actions can be used in scripts.  Photoshop scripts can also be programmed as a Photoshop plug-in.  When a plug-in is saved in action the plug-in saves the setting you used in its dialog box in the action stage. When the Action is played.  The plug-in does not display the dialog instead, it will use the setting saved in step of the action.  No user interaction is required action may be batched.

    Most Photoshop users cannot write scripts, but it have no problem using scripts to write than others.  As Adobe Photomerge, Image Processor, image Fit etc...

    I wrote a plugin script using Adobe adapt design Image that will make the selection of image format while maintaining the orientation of the document.  So if you have a 4:3 camera and a collection of pictures of her you landscape of 4:3 and 3:4 Portraits.  If you use my plugin aspectratioselection script in action and a followed centered 3:2 aspect ration of a culture of image and batch as the action on your images you would be left with landscapes of 3:2 and 2:3 Portraits.  The three step action, that's all you need registration.

    menu stage 1 file > automation > AspectRatioSelection...  In his dialogue game 5 7 central rectangle replace feather selection 0

    menu step 2 Image > Crop

    menu step 3 file > Automate > Fit Image in its width and height 700 px value dialog box

    You wind upward with 700x500px landscapes and portraits of 500x700px.

    I have created at least six of the lately. I use to do slideshows for my various devices.   I put the images I want to use in a folder of image source on my desk and play action creates six slide shows is a slide in a slide show on my desktop folder. In six of the subfolders. The Action is all two steps. The first step is running a script that deletes the folder slide shows.  The second step is a step in Image Processor Pro plugin.  This process, the image source in the slide shows folder file, save six series of jpeg images, it's six subfolders. Galaxy tab display 16:10 sideshow 2560 x 1600 and also as a 3:2 slideshow 2400 x 1600.  Surface Pro 3 sideshow 3.2 2160 x 1440, iPo4 4: slide show of 3:2 960 x 640, HDTV 1920 x 1080 and 4kTV 3840 x 2160. I take a coffee break... While the action runs.

    Package of shares of crafts UPDATE August 10, 2014 added conditional measures Action Palette tips.
    Contains

    Example of
    Download

  • Message: My windows Movie Maker has stopped working in the last week.

    Message: My windows stopped filmmaker working within the last week, began when the error message "the collections of file is not valid or is damaged. A new empty collections file has been created. When I try and import a file of any image type or otherwise, the file is not imported and the error message ends with "unknown error."
    So far WMM worked without fault, as full support has been removed for XP I am now unable to get all the patches. There is also no file conversion to allow to allow the import of files. Times, error message "class not registered"?
    What I'd really like is a copy of WMM version 5.1 (Build 2600 xpsp_sp3_gdr.101209 - 1647: Service Pack 3) Windows Movie Maker Version 2.1. 4028 0, I would continue with WMM, but am completely reluctant to upgrade to Windows 7. Someone at - he found a solution for the problem that I am facing.

    If you can open Movie Maker... try to go to... Tools / Options /.
    Compatibility on the left tab, click on the "all default settings"
    button / OK.

    Also... Do a restore of the system in Mode safe for a time
    before the problem started, may be worth a try.

    See the following articles:

    (306084) how to restore Windows XP to a
    previous state
    http://support.Microsoft.com/?kbid=306084

    How to restore a Windows XP system
    a previous state using system restore
    http://bertk.MVPs.org/

    (315222) a Description of the Safe Mode
    Boot into Windows XP options
    http://support.Microsoft.com/?kbid=315222

    How to start safe mode in Windows XP
    http://bertk.MVPs.org/html/SafeMode.html

    Good luck...

  • Carpet mouse stops working while the battery is charging.

    Recently, the mousepad does more, or very slow acts while the battery is charging, and the loptop is flat on the desk. However, if his load and I place on my knees the mouse pad works fine.

    How can I fix?

    Thank you

    Hello JoeNYC65

    Unfortunately you have to is hardware related and not big thing we can do for this purpose. I suggest you contact the manufacture of equipment and have them repaired/replaced for you.
  • This script works under the cs5? display and if adapt to screen imported from cs3

    Hello

    I used to run this script every time that I open a photo in photoshop cs3 on xp

    now I use cs5 and windows 7

    I use this script to load the photo under the eyes and fit the image of the screen

    Image on screen adjustment

    Attach to the event Open Document in Photoshop CS 2

    // =======================================================

    var id57 = charIDToTypeID ("TPCV");

    var desc15 = new ActionDescriptor();

    var id58 = charIDToTypeID ("null");

    ref6 var = new ActionReference();

    var id59 = charIDToTypeID ("min");

    var id60 = charIDToTypeID ("MnIt");

    var id61 = charIDToTypeID ("FtOn");

    Ref6.putEnumerated (id59, id60, id61);

    desc15.putReference (id58, ref6);

    executeAction (id57, desc15, DialogModes.NO);

    //=======================================================

    id20 var = charIDToTypeID ("TPCV");

    var desc7 = new ActionDescriptor();

    id21 var = charIDToTypeID ("null");

    Ref3 var = new ActionReference();

    id22 var = charIDToTypeID ("min");

    var id23 = charIDToTypeID ("MnIt");

    var id24 = stringIDToTypeID ("screenModeFullScreenWithMenubar");

    Ref3.putEnumerated (id22, id23, id24);

    desc7.putReference (id21, ref3);

    executeAction (id20, desc7, DialogModes.NO);

    but I did notice the photo in photoshop is not very strong , I have the zoom with the mouse wheel it to be sharper

    What's wrong?

    the script is not compatible with cs5?

    is there something wrong in my setup?

    Thank you

    see you soon

    either by the way, I use another script to start photoshop

    selectTool ('handTool');

    selectTool ('handTool');

    function selectTool (tool) {}

    var desc9 = new ActionDescriptor();

    ref7 var = new ActionReference();

    Ref7.putClass (app.stringIDToTypeID (tool));

    desc9.putReference (app.charIDToTypeID ('null'), ref7);

    executeAction (app.charIDToTypeID ('slct'), desc9, DialogModes.NO);

    };

    Good Yes it works a bit strange in cs5.

    It seems to work better if the mode full screen with the menu bar is run first, then to adapt to the screen.

    Like this:

    Image on screen adjustment

    Attach to the event Open Document in Photoshop CS 2

    //=======================================================

    id20 var = charIDToTypeID ("TPCV");

    var desc7 = new ActionDescriptor();

    id21 var = charIDToTypeID ("null");

    Ref3 var = new ActionReference();

    id22 var = charIDToTypeID ("min");

    var id23 = charIDToTypeID ("MnIt");

    var id24 = stringIDToTypeID ("screenModeFullScreenWithMenubar");

    Ref3.putEnumerated (id22, id23, id24);

    desc7.putReference (id21, ref3);

    executeAction (id20, desc7, DialogModes.NO);

    // =======================================================

    var id57 = charIDToTypeID ("TPCV");

    var desc15 = new ActionDescriptor();

    var id58 = charIDToTypeID ("null");

    ref6 var = new ActionReference();

    var id59 = charIDToTypeID ("min");

    var id60 = charIDToTypeID ("MnIt");

    var id61 = charIDToTypeID ("FtOn");

    Ref6.putEnumerated (id59, id60, id61);

    desc15.putReference (id58, ref6);

    executeAction (id57, desc15, DialogModes.NO);

  • work, while the SOUL is coding

    I'm working on a HP Pavillion Dv7 with 6 GB of ram.  Are there problems with working on the computer while the SOUL is video encoding?  Could my final file of the project be touched - IE stuttery, glitchy etc.?

    Thank you

    Lisa

    Never been a problem for me, even if according to the codec you use to encode, you may experience some slowdowns in the general operation of the PC. I have an i7 processor overclocked to 4.0 GHz and 24 GB of RAM, so this isn't really a problem for me

  • Need help to make my printer work with the new laptop.

    I just bought a laptop ACER Aspire V5-571. At the Windows experience index. Intel (R) core, 64-bit. My current project is gettting my 2005 Dell all-in - one 944 to work with my new laptop. I passed on the line and installed the recommended driver and used the printer to scan a document I then sent an email, but for some reason my computer any it will not print a page from an online account. Keeps saying needs of troubleshooting and I need to download the driver, which I did, a Vista 7 64-bit-compatible driver. How can I make this work? or what other driver or update do I need?

    It seems that Vista drivers are the latest Dell has provided.  I noticed that, they say, you have to install all the drivers for this device before installing the Vista (s).  I found the link depending on whether you should check out

    http://support.Dell.com/support/topics/global.aspx/support/KCS/document?&docid=270659&doclang=en

    Some older printers have no Windows 7 drivers, but usually the work of those of Vista.  If they are not, you can use XP mode if you have the professional or Enterprise version of Windows 7 Ultimate.  If you have the Home Premium version, you can use him anytime upgrade to professional for $90.  Of course to buy a new printer is always an option too.

    As you probably know, it is the responsibility of the manufacturer to provide drivers.  Many manufacturers have refused to provide any Windows 7 drivers for older devices.

    Good luck.

  • Please help, I've updated my iPad has a few days, but by exploring my camera I discovered that the front camera did not work while the main or back camera is not working properly, please, anyone with a secure solution please share.  Thank you

    I have tried everything that I could even, to the extent where I hard reset my device, but that it does not work, no possible solution please share with me, that I will accept it gladly. Thanks in advance.

    Already restore you factory? If this is not the case, try this. If you have, or it did not help the cause can be hardware partner. Take it to your local Genius Bar or Apple authorized service provider. -AJ

  • How can I make PS5.1 work with the raw files from my Panasonic GH4?

    My version of PS is worm. 5.1. it does not recognize my Panasonic GH4 raw files. I use Windows 7 64-bit. There must be a plugin, but no chance it is. Help, please.

    According to: supported by Camera Raw devices

    Your camera requires an ACR 8.5 or later and your PS 5 maybe isn't able to handle.

    The next best option is to download a free copy of Adobe DNG Converter and use it to a format that your current ACR can work.

  • the .swf and .html files does not work while the .fla file works great

    Hi I'm new to actionscript, and I have a question. The fla file works perfectly and runs the timer function and reads the xml file to create an RSS feed, but when I publish and choose HTML wrapper and then choose 14 Flash swf and html file load the photos and the text field but isn't something else please help.

    Thanks in advance.

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    import flash.events.Event;

    import flash.text.TextField;

    import flash.text. *;

    import flash.utils.Timer;

    import flash.events.TimerEvent;

    var RSSLoader:URLLoader = new URLLoader();

    var RSSURL:URLRequest = new URLRequest ("http://sports.yahoo.com/soccer//rss.xml");

    RSSLoader.addEventListener (Event.COMPLETE, RSSLoaded);

    RSSLoader.load (RSSURL);

    var RSSXML:XML = new XML();

    RSSXML.ignoreWhitespace = true;

    var title: TextField;

    var desc:TextField;

    var allText:TextField;

    title = new TextField();

    allText = new TextField();

    var i: int;

    function RSSLoaded(e:Event):void {}

    trace ("xml load file here");

    RSSXML = XML (RSSLoader.data);

    for {(var selectedItems:String in RSSXML.channel.item)

    title. Text = (RSSXML.channel.item [selectedItems] .title + "/");

    title.wordWrap = true;

    tfLog.text += title.text;

    tfLog.wordWrap = true;

    trace (title. (Text);

    }

    }

    var t:Timer = new Timer (200);

    t.addEventListener)

    TimerEvent.TIMER,

    function(EV:TimerEvent): void

    {

    tfLog.text tfLog.text.substr = (1) + tfLog.text.charAt (0);

    }

    );

    t.Start ();

    var picTimer:Timer = new Timer (2000);

    picTimer.start ();

    picTimer.addEventListener (TimerEvent.TIMER, timehandler);

    function timehandler(event:TimerEvent):void {}

    setChildIndex (getChildAt (7), 0);

    }

    A way around that is to have a PHP file on your server that reads the XML feed and your swf reads the data from the PHP file rather than directly from the external domain.

  • How can I make adobe Bridge works with the canon rebel t2i camera?

    I have photo shop cs3 and never had a problem with front deck. Now, I bought a new canon rebel t2i and it will not recognize the adobe bridge.  Anyone know how I can do this job?

    you have to work with this camera and Photoshop cs4 atleat

    However, you can download the DNG Converter and convert all your images from the camera to the dng format, and then you will be able to open them in your CS3

    Download dng converter here:

    Windows: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5310

    Mac: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5309

    Kind regards

    Bartholomew

  • I have two sites of BC. We're working while the other is not.

    I designed thoughtcake5.businesscatalyst.com and macademia.businesscatalyst.com in Adobe Muse. ThoughtCake BC site appears in my browser, but 'the server is not found' for macadamia nuts. This had been the case for a few days.

    No explanation or help would be greatly appreciated!

    Thank you!

    Hi rgrtht,

    It seems that the system and the "macadamia" Secure site URL was not a record. I have since fixed this problem, and I can confirm that these URLS now solves your Business Catalyst site. If not, please clear your browser cache and try again.

    About thoughtcake5.businesscatalyst.com, I am unable to find a site that uses this URL. However, I can see other sites associated with your account and which have similar names that have no similar problems.

    See you soon.

  • How to re - activate page body after working on the reference page?

    Dear friends,

    Even now I can't reproduce the following situation in a short test script:

    1. A document is opened and the script finds the existence of a page reference 'FM-calc.
    2. If found, go to step 4
    3. If it is not found, such a reference page is copied from a template
    4. Work on the reference page: replace certain paragraphs.
    5. The user does not see that the script worked on the Ref page and call a dialoge
    6. This dialog box inserts a marker at the current location
    7. The marker is inserted in the reference page where the work has been left

    How to get back to the current page of body (which is the first)?

    Just put

    var pgf = goCurrentDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
    

    before inserting the marker will not do.

    Normally the user woud the cursor in the document at a specific location, and then call the dialog box: it works very well.

    But this dialog box remains open when the user changes the document.

    In the new document, there may be no page reference, and as a result, the script creates one.

    The user clicks outside the text frame (illegal location for insertion of marker) - this can be managed with

      if (!goCurrentDoc.TextSelection.beg.obj.ObjectValid()) {
        alert ("Please place cursor in document text flow or select something!");
      return;
      }
    

    But for switching back to work on the page Ref I have not found a solution.

    Klaus,

    I think that there are better ways to handle this. The user should not have to finish the work begun your script. Why not just save the original insertion / text selection before doing a job on the reference page? Then you can restore later. Something simple like:

    var restoreTR = targetDoc.TextSelection;

    As long as the variable remains valid (IE, stays in the scope), you can do anything you want anywhere in the file, then simply return the insertion point to this place when you are finished.  If you have actually changed the view to reference pages, you can use the CurrentPage property to switch back. So, in summary, I would do something like this:

    var restoreTR = targetDoc.TextSelection;
    
    //....  do all the wild Klaus stuff on the reference pages, then;
    
    var bodyPage = targetDoc.FirstBodyPageInDoc;
    targetDoc.CurrentPage = bodyPage;
    targetDoc.TextSelection = restoreTR;
    targetDoc.ScrollToText(restoreTR);
    

    Hope this helps,

    Russ

  • No longer works with the new version of an old program F.P.

    With an old program in compatibility mode with Vista, installing the latest version (20.00) no longer works, while the 19 runs.

    Thank you

    Is not much to do, but I'm aware of a bug that could have this side effect at the moment.

    I was expecting, it should be resolved in the beta next week, here: http://www.adobe.com/go/flashplayerbeta/

Maybe you are looking for