CS2 JS - targetting frame labels within groups

I have some CS2 JS scripts that cycle through sequentially labelled frames but they fail if the target frame happens to be part of an object group.
Is it possible to target frames via their labels whilst they are still grouped together or perhaps grouped with other objects?
thanks
Greg

Hi Greg and Brett,
Here is what Robin said but in JS. It works even for nested groups.
Kasyan
var myDoc =app.activeDocument;
var myFrame = myDoc.textFrames.item("red");
// do something here
myFrame.fillColor = myDoc.colors.item("C=0 M=100 Y=0 K=0");
var myGroups = myDoc.groups;
for ( i = 0; i < myGroups.length; i++) {
   var myItems = myGroups[i].allPageItems;
   for ( j = 0; j < myItems.length; j++) {
      if (myItems[j].constructor.name == "TextFrame" && myItems[j].label == "red") {
         // do something here
         myItems[j].fillColor = myDoc.colors.item("C=0 M=100 Y=0 K=0");

Similar Messages

  • Opening a CC .fla in CS6 replaces symbols and duplicates layers, frame labels and code on compile.

    So when I compile an fla in CS6 that I built in CC, It replaces all my symbols and puts "m&#058" in front of all the names.
    Not only that, but on compile, it duplicates layers and frame labels within selected movieclips and then spits errors out calling duplicate functions and frame labels as the issue. Has anyone ever run into this?

    Figured it out.  I had a certain naming convention for my symbols (m:video_1). Turns out that CS6 didn't like the colon and was duplicating my symbols in the library and screwing up a bunch of other stuff too. I changed my naming convention in my library to m_video_1. Adobe take note!

  • How to target a label on the stage from a loaded composition

    from EdgeCommons I'm using EC.loadComposition to load another website into a container within EA.
    Now, from a button inside this loaded composition I would like to call a stop function to target a label on the main stage of the EA file.
    sym.getComposition().getStage().stop("scene4"); does not work.
    It think it has to go outside of sym because the composition container is actually an iframe.
    Thank you

    Hi,
    I think you may have replied to my post accidentally. I had asked a question regarding javascripts that could target the stage from a symbol, not about coloring book apps.  However I have made one in Flash, here is the page I made (don't laugh, I never finished it).
    http://boogerbunch.com/home.html
    Here is a link to the forum I used to get the Info to build it, I would think the process would be very close in edge.
    http://www.kirupa.com/developer/mx2004/coloringbook.htm
    Good luck!
    >>> scottsalter0 <[email protected]> 3/1/2013 10:29 AM >>>
    Adobe Community ( http://forums.adobe.com/index.jspa )
    Re: How to target a label on the stage from a div embedded in a symbol?
    created by scottsalter0 ( http://forums.adobe.com/people/scottsalter0 ) in Edge Animate - View the full discussion ( http://forums.adobe.com/message/5113759#5113759 ) 
    Hi there,
    I noticed your Edge Colouring Page post on the Adobe Forums.
    For my University work, I need to create a colouring page using Adobe Edge Animate. Is it possible if you could post a tutorial or step-by-step guide on how to do this please?
    Many Thanks
    Reply to this message by replying to this email -or- go to the message on Adobe Community ( http://forums.adobe.com/message/5113759#5113759 )
    Start a new discussion in Edge Animate by email ( mailto:[email protected] ) or at Adobe Community ( http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=4823 )

  • Firefox does not print the target frame in PeopleSoft Enterprise or Campus Soultions Portals

    When using PeopleSoft Enterprise Portal or Campus Solutions Portal Firefox does not print the target frame. PeopleSoft utilizes iframes and has indicated this is the technology path they will follow. On each page is a header, footer, and left menu. Content is displayed in the target after it is selected from the left menu. This issue prevents users from using the standard print preview or print functionality.

    We need the standard print and print preview functionality that all of our end users are already familiar with to work. We have a large end user group that is frustrated this functionality is available in IE and Chrome, but not Firefox.

  • Navigating to Frame Label In a MC

    Hi All,
    I need some help and I will try to explain what I am trying
    to do the best i can.
    I have a flash movie that has a mc called "pages" in Scene1.
    In the mc "pages" I have 4 key frames each representing 4 pages
    (i.e. 4 movie clips each one representing a page).
    I have buttons in each of these pages. My question is this.
    How can I navigate from a button in a page to another page
    specifically going to a frame label? I can get to the page using
    this ActionScript:
    on (release) {
    _root.pages.gotoAndPlay(_root.link = 3);
    This works. The above example takes me to page 3. However, I
    not only want to get to page 3 but specifically go to a frame label
    in the mc that I am identifying as page 3.
    Any help is much appreciated.
    Scott

    you do not assign a value to a variable within the
    gotoAndPlay method. you should state this call as:
    _root.pages.gotoAndPlay(3);
    if navigating to a label within that MC, ie:'pages.MC3', you
    may need to assign a variable like you're trying to do above, but
    in a different manner. since you already have 'link' on the root
    timeline, assign the label value to it instead of a number (change
    it to a String var), then in the four MCs, add a conditional
    statement to the first frame which then 'decides' where to go when
    the MC is instantiated. like for instance:
    if(_root.link == 'home') {
    gotoAndStop('home');
    }else if(_root.link == 'about') {
    gotoAndStop('about');
    }else if( ...
    but make you assignment of this var separate from the call
    that you'd used above, as in:
    on (release) {
    _root.link = 'home';
    _root.pages.gotoAndPlay(3);
    EDIT: sorry kg, typing ... as per usual :)

  • [AS] Access Text Frame Labels in CS5

    Hello Everyone,
    I am updating a CS2 InDesign AppleScript to CS5 and finding an issue accessing the text frame labels. In CS2 the script below would set the variable x to the contents of the text frame "bob", unfortunately, this script not longer works in CS5.
    tell application "Adobe InDesign CS2"
            set x to contents of text frame "bob" of active document
    end tell
    The documentation tells users how to insert text, but not access it. If anyone has an idea of how to do this in CS5 I would appreciate it.

    Got it!
    tell application "Adobe InDesign CS5"
         tell active document
              set x to contents of item 1 of all page items whose label is "bob"
         end tell
    end tell

  • Error 1009: Buttons Linking to Frame Labels?

    Hello here is my code for my buttons for my rather simple Flash site. I have 5 "frame labels" each label contains a set of frames representing a page. Yet when I test the site with the action script below it freezes on the first frame and gives the message
    Error #1009: Cannot access a property or method of a null object reference. at SelfPromoSite_fla::MainTimeline/frame1()
    This is my code below for my main navigation buttons
    Home_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goHome);
    function goHome(event:MouseEvent):void {
    gotoAndPlay("Home");
    About_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goAbout);
    function goAbout(event:MouseEvent):void {
    gotoAndPlay("About");
    Resume_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goResume);
    function goResume(event:MouseEvent):void {
    gotoAndPlay("Resume");
    Work_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goWork);
    function goWork(event:MouseEvent):void {
    gotoAndPlay("Work");
    Contact_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goContact);
    function goContact(event:MouseEvent):void {
    gotoAndPlay("Contact");
    Also on the "Work" "page" "set of frames" I have buttons to advance between frames.
    button1.addEventListener(MouseEvent.MOUSE_DOWN, goBack);
    function goBack(event:MouseEvent):void
              prevFrame();
    button2.addEventListener(MouseEvent.MOUSE_DOWN, goForward);
    function goForward(event:MouseEvent):void
              nextFrame();
    I've tried putting this action script on the frame where the "Work" label starts and the actual buttons for advancing back and forth are located. I've also tried putting the action script for these buttons on the first frame with the remainder of the button action script above, it does not work. Also when I remove the 2nd set of actionscript altogether the site still freezes on the first frame.

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is declared but not instantiated
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • Playing a frame label in a parent

    I was just getting used to actionscript 2 now 3 comes
    along...
    I have this segment of code:
    this.parent.videoOne.gotoAndPlay("playing")
    it doesn't work in AS3, in the parent I have a movie clip
    instance called "viedoOne" with a frame labeled "playing". Anything
    I do that doesn't involve movie clip instance names gets the job
    done. But what else do I do to make this work when instances are
    involved? Thanks

    If you're lucky and things haven't moved around much when you
    return, the posting right after this one in the forum, titled
    "Target Path", may shed some light on things.

  • Wanting to navigate with frame labels...

    Hello,
    I'm not too sure if this is difficult to most people or not,
    but I have not been able to find a working solution. Here is the
    situation:
    I have a parent SWF file ("index.swf") that loads external
    SWF files. In a couple of my external SWF files, I want to have a
    few different frames that all have unique text content. I am
    wanting to gotoAndStop on a frame using buttons. However, the frame
    I want to go to is in Scene 1 of the external SWF file, and the
    button lies in a movie clip within Scene 1. I have tried the
    following code:
    b1.onRelease = function() {
    _root.gotoAndStop(2);
    It seems to work fine when I test that SWF file, but when I
    test it within "index.swf" (parent) it goes to frame 2 of
    "index.swf" instead of the external SWF file that it is supposed
    to. I have also used the following code:
    b1.onRelease = function() {
    gotoAndStop("frameLabel");
    This does not work at all. The frame label name has been set
    on the top layer of 4 layers (including the actions layer). I was
    under the impression that if I had a unique frame label name on a
    particular frame, that function would work.
    To sum it all up, I'm am wanting the externally loaded SWF
    file to basically switch between its own frames based on buttons
    clicked within the external SWF file, without it effecting the
    parent movie ("index.swf"). Any help would be awesome! Thanks in
    advance!
    Elijah

    when you load your external swf files you have to load them
    into things that have instance names. by addressing the movies by
    their instance name you can make the code work on them.
    your loader code might look like:
    my_mcl.loadClip("
    http://www.macromedia.com/software/drk/images/box_drk5.jpg",
    clip1_mc);
    in which case your code to control that clip would look like:
    clip1_mc.gotoAndPlay("myFrameLabel");
    or, if your button was on a timeline that was a child of the
    timeline that contained clip1_mc
    _parent.clip1_mc.gotoAndPlay("myFrameLabel");
    or if you didnt know how many levels down your button was:
    _root.clip1_mc.gotoAndPlay("myFrameLabel");
    using root will, however, stop working if you ever load this
    movie into another movie
    luck
    jon
    ps i was too slow it seems :(

  • Using Frame Labels

    I want to use buttons to move the play head from one frame
    label to the next on the main timeline.
    I get the following error:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at Intro_fla::MainTimeline/Intro_fla::frame6()
    What am I leaving out. It was so simple in AS2.
    there are three buttons with instnce names: InArticleBnt,
    InVideoBnt, backBnt
    there are three frame labels: intro, video, article
    // The buttons listeners
    InArticleBnt.addEventListener(MouseEvent.CLICK, article);
    InVideoBnt.addEventListener(MouseEvent.CLICK, video);
    backBnt.addEventListener(MouseEvent.CLICK, intro);
    //the button with the labels I want them to go to.
    function article(event:MouseEvent):void {
    this.gotoAndPlay("article");
    function video(event:MouseEvent):void {
    this.gotoAndPlay("video");
    function intro(event:MouseEvent):void {
    this.gotoAndPlay("intro");

    http://207.8.191.165/development/Intro.fla
    I need to declare the object for the button to target but I
    have no idea how to do that. I took a guess. But there is still an
    error.
    I have decided to make each section a movieClip and load them
    into the one frame using the buttons. Instead of using frame labels
    on the timeline. I do not have any more time to mess with something
    this incredible simple. The problem appears to be trying to do
    something that worked fine in AS2 code needs to be rethought and
    planed differently in AS3. For goodness sake asking the playhead to
    respond to a mouseEvent and go to a frame label on same time line
    as the button calling the event should not require writing a
    dissertation in code.

  • Creating new buttons on different frame labels

    can someone tell me if im doing something wrong or assigning
    the as to the wrong frame?
    first off i have all my buttons on frame 2. im creating a
    real estate site and i have to have a couple links like HOME ABOUT
    BUYING SELLING CONTACT, the thing though is that in the BUYING and
    SELLING frames i want to add more sections and links but only on
    these 2 other parts of my site. when i code it and add new buttons
    to these sections though my movie plays over and over and over non
    stop. heres my coding...
    FRAME 1 preloader
    Frame 2 has a frame label of home and all the buttons on a
    diff layer, and AS3 on a different layer
    Frame 3 has a frame label for about section
    Frame 4 is my contact for example
    so if i create a new button in the about frame label and just
    add the code to the working as3 code on frame 2 my movie just plays
    over and over and over again, and all i want it do do is act like
    the other buttons and go to a different frame label down in the
    time line. the only way i get it to work is if i have ALL my
    buttons on frame 2.
    frame 1
    my preloader
    frame2
    home_btn.addEventListener(MouseEvent.CLICK, onHome)
    function onHome(event.MouseEvent):void
    gotoAndStop("home");
    about_btn.addEventListener(MouseEvent.CLICK, onAbout)
    function onAbout(event.MouseEvent):void
    gotoAndStop("about");
    etc....
    etc...
    i enter my btn code just like this and the buttons on frame 2
    work but any new buttons i try and creat and put into different
    frames othere then frame label "home" aka frame 2 wont work

    correct.
    there are lots of ways around it. but they all require the
    object to exist when the code executes.
    with as3 it's particularly easy to create objects, code for
    them and then add them to the display list later when
    needed.

  • If / Then for Buttons to go to Frame Labels?

    Hello.
    I'm asking for some hand-holding on this one. Hopefully I can explain this well enough.
    I have a complex button that when rolled over the playhead goes to Frame Label textOut.
    When a roll out is executed, the playhead is to go the Frame Label textIn.
    Easy enough.
    mcBtnHome1.addEventListener(MouseEvent.ROLL_OVER, dropText);
    function dropText (evt:MouseEvent): void
      mcBtnHome1.gotoAndPlay("textOut");
    mcBtnHome1.addEventListener(MouseEvent.ROLL_OUT, raiseText);
    function raiseText (evt:MouseEvent): void
       mcBtnHome1.gotoAndStop("textIn");
    mcBtnHome1.addEventListener(MouseEvent.CLICK, landHome);
    function landHome (evt:MouseEvent): void
      mcBtnHome1.gotoAndStop("textStay");
    The problem occurs when I plug in the third event, the click. I click the button, and the playhead moves to Frame Label textStay, as it's supposed to, but once I roll out/ off of the button, the roll out action is again executed. Once I click on the button, no more interaction is supposed to be possible.
    This happens despite my having a stop(); action at the textStay frame.
    I'm guessing I need an if / then of if / else statements, with some true / false declarations,  but I've no clue as to what "if's" I should be checking for.

    In your click function you could remove the ROLL_OUT listener, and then reassign it when you get to your textStay frame.
    (Edit - actually, you probably want to assign that ROLL_OUT listener in the ROLL_OVER function at all times)
    mcBtnHome1.addEventListener(MouseEvent.ROLL_OVER, dropText);
    function dropText (evt:MouseEvent): void {
         mcBtnHome1.addEventListener(MouseEvent.ROLL_OUT, raiseText);
         mcBtnHome1.gotoAndPlay("textOut");
    function raiseText (evt:MouseEvent): void {
         mcBtnHome1.gotoAndStop("textIn");
    mcBtnHome1.addEventListener(MouseEvent.CLICK, landHome);
    function landHome (evt:MouseEvent): void {
         mcBtnHome1.removeEventListener(MouseEvent.ROLL_OUT, raiseText);
         mcBtnHome1.gotoAndStop("textStay");

  • Cs3 bug - global objects and frame labels

    Just found a bug that took me an hour to figure out.
    A strange problem occurred when I had a global object and a
    frame label named the same.
    Example:
    _global.discussion = new Object();
    //lots of functions here
    I was directing the timeline of a movieClip to the frame
    label "discussion". On this frame there were a number of actions
    involving the discussion object. However, flash was treating the
    object as if it didn't exist. All variables / functions residing in
    this object were completely gone. Has anyone seen this problem. If
    not, watch out for it.
    james

    that's coder bug, not a flash bug.

  • How do I filter on multiple values / labels within a Pivot Table which points to a Power Pivot Model

    Hi,
    How do I filter on multiple values / labels within a large data set within a Pivot Table which points to a Power Pivot Model. I am current using Excel 2010 64 bit. I intend to empower users to achieve this by simply using the Excel user interface, not by
    using Excel formula or DAX. Please find the attached screen shot as a worked example, also in my real life example not all the values are available in the drop down. You can't use a slicer for the same reason as you can't use a drop down. I guess what I was
    hoping for is for the user to be able to enter AND or OR within the associated dialog box. Is there any way around this?
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Hi
    This is the forum to discuss questions about Microsoft Excel develop (VBA, Automation). For your question is more about pivot table features  for Excel, I will move
    this thread to the TechNet forum for Excel.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share
    their knowledge or learn from your interaction with us.
    Thank you for your understanding.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Wacky problem with Frame label

    I have a menu set up with three items. Menu item one has
    "gotoAndPlay("video"), menu item two has
    "gotoAndPlay("somethinghere") etc...
    My menu items two and three always jump to the correct frame
    label. I am having a problem with the first menu item.
    When you click through the menu items slowly, content loads
    in correctly, but it seems that if you click different menu items
    too fast, the first menu item jumps back the main timeline to frame
    1. My menu is inside of a movieclip. This is where my frame labels
    are.
    Has anyone ever seen an issue like this before or know how to
    prevent this wacky behavior?

    use the goto methods, not functions:
    _root.gotoAndPlay("video");

Maybe you are looking for