How to access frame labels in a SWF loader?

I have a swfloader, which has a swf file embedded.  It loads and plays, and stops at the frame in the swf where I have a stop().
In one of my app's functions, I need to send the playhead in the swf to another frame labe, but I seem to have forgotten how to talk to the swf.
<mx:SWFLoader source="@Embed(source='assets/thermal.swf')" id="diagram" />
diagram.gotoAndPlay("myLabel"); does not compile.
I know this is simple, but I can't find it anywhere...

I tried this:
                    import flash.display.MovieClip;
          protected function accordion1_changeHandler(event:IndexChangedEvent):void {
                    var mc:MovieClip = diagram.content as MovieClip;
                    switch (event.currentTarget.selectedIndex) {
                         case 0:
                              currentState = "phase1";
                              mc.play();
                              break;
                         case 1:
                              currentState = "phase2";
                              mc.gotoAndPlay("start2");
                              diagram
                              break;
                         case 2:
                              currentState = "phase3";
                              break;

Similar Messages

  • How to access custom labels in Table?

    In IDML I have set up custom lables inside Table element. How can I access those labels?
    Thx!

    Hi Michael,
    If you just want to retrieve the data, you could use the following code.
    //Get the node which the table is bound to
    IWDNode node = wdContext.nodeTable();
    //iterate thru the elements
    for(int i = 0 ; i<node.size();i++)
      IWDNodeElement ne = node.getElementAt(i);
      Object value = ne.getAttributeValue("<column name>");
      //Here you have the data in the value variable
      //and you can manipulate this now
    Regards,
    Sudeep

  • How to access dynamic movie clips in a loaded swf

    Hello,
    I have a main movie file that loads a swf through loadclip.
    There are several dynamic movie clips in the library of the
    loaded swf (all set to export in first frame).
    I'm trying to create a popup window (using the Window
    component) by using code in the main movie to popup content that is
    in a dynamic movie clip within the swf loaded by loadclip.
    So far, I can create the popup without any problem as long as
    the contentPath refers to a linkage identifier of a library item in
    the main movie, but it won't work for a library item in the loaded
    movie. Is there a way to make this work? Is there a special way to
    reference library items in loaded movies?
    Here's my code to create the window:
    myWin = mx.managers.PopUpManager.createPopUp(this,
    mx.containers.Window, true, {title:mytitle, contentPath:myref,
    closeButton:true});
    where myref is a string containing the linkage identifier for
    the library item within the loaded swf.
    Thanks in advance for any assistance,
    Julia

    I have found out that I can access a dynamic mc from the
    loaded library (using attachMovie), but cannot use that same
    dynamic mc as the contentpath for a popup window.
    Any ideas why?

  • FLV/Mp3 Cue Points for Accessing Frame Labels on the Main Timeline in Flash 8

    Hello,
    In Flash MX2004, creating cue points for syncing locations on
    flv and mp3 files to locations on the main timeline included:
    1) Dragging a media component onto the stage
    2) Entering file path, frame label name, and time code
    information in the component inspector
    3) Creating the frame label names on the main timeline, and
    4) Enabling the Media Labeled Frame Cue Point Navigation
    Behavior
    Flash 8 documentation details a considerably different
    process of creating cue points. While it discusses how to create
    cue points in the flv, I have not been able to locate how to enable
    linking locations in flv and mp3 files with frame labels on the man
    timeline. It appears that there would need to be ActionScript
    necessary to accomplish this that is not available in the docs.
    Please advise what ActionScript/process would enable this
    function.
    Thank you!
    James
    [email protected]

    I usually start off solving problems with the livedocs, as I
    recommend for anyone. The following link will take you to the
    NetStream.onCuePoint handler. This is what you need.
    http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context= LiveDocs_Parts&file=00002561.html
    You can have this code on the main timeline. When the
    cuepoint is hit, it will invoke this event handler and inside is
    where your gotoAndPlay( ) should go.
    Your other question about the text will get activated by the
    same handler. Just have a conditional statement (if, switch, etc.)
    to differentiate between the two events. The text itself can be
    mask inside a movieclip.
    Does this help?

  • How to access frame lable on main stage from a nested symbol

    All-
    I have two buttons
    btnA on the main stage
    btnB is nested inside btnA
    How do I access a frame lable on the main stage from btnB

    ok i figured this one out.
    i created a button symbol 'BTN-NAV-INTRO' and placed it on the main stage.
    i created a mouse over/out effect on it's timeline with an object on top called 'MC-HIT-AREA' 
    i placed the mouse over graphics inside the button and animated them on their own timelines
    coded the MC-HIT-AREA to play those timelines 'MC-HIT-AREA' is nested inside the button
    then on the main stage (this is what threw me) i set the button ('BTN-NAV-INTRO') to cursor and coded it to call the other button form the main stage.  Nesting it wasn't necessary.  I didn't realize you could have multiple mouse over/out effect below a mouse over effect from the main stage
    Edge rocks when i get it to do my bidding! 

  • How can I call functions from a SWF loaded in to another SWF?

    Hi there,
    Please excuse my ignorance, I am very new to actionscript and flash.
    I have 2 SWF's - a.swf and b.swf.
    I load b.swf into a.swf with the following code:
    var swfLoader:MovieClipLoader = new MovieClipLoader();
    swfLoader.loadClip("b.swf", container_mc);
    Now in b.swf, I have a function as follows:
    public function sendData(){
      trace("I ran the function!");
    So I have done a lot of reading, from what I can tell I should be able to run the sendData() function from the code in a.swf, by typing:
    container_mc.sendData();
    but its not working. What am I doing wrong?
    Thanks in advance,
    Adam

    Thanks heaps mate, after a bit of trial and error it works! Here is the code that I added:
    var loadingListener:Object = new Object();
    swfLoader.addListener(loadingListener);
    loadingListener.onLoadStart = function(container:MovieClip):Void  {
        trace("The MovieClip "+container+" started loading");
    loadingListener.onLoadInit = function(container:MovieClip):Void
        trace("The MovieClip " + container + " has been initialized");
      container_mc.test();
    Marked your answer as correct :-)
    Thanks again, I really appreciate your help.
    Cheers
    Adam

  • How can I control stage position for swfs loaded by Loader class?

    I'm creating a grid of buttons that, when clicked, will load a specific swf and I'd like for each swf to play in a certain portion of the stage.  When I use the Loader class:
    var my_loader:Loader = new Loader();
    my_loader.load(new URLRequest("abc.swf"));
    addChild(my_loader);
    the swf always displays at top left.  Is this an attribute of the individual swfs that I'm loading, or can I address the position in the main movie?
    Thanks-
    Sean

    addChild(my_loader);
    my_loader.x = 500;
    my_loader.y = 250;

  • How to get the label of parent container?

    Hi
    I have a Canvas, Its label is "News".
    I added a text control in it and i want to set its text
    dynamically from the canvas label.
    But i dont know how to access the label of the Canvas
    "without" using the id of the canvas.
    like
    <mx:Canvas label="News">
    <mx:Text text="{parent.label}"/>
    </mx:Canvas>
    Please guide me to achieve the above thing.
    Thanks in advance

    "manofspirit" <[email protected]> wrote in
    message
    news:garoob$lqh$[email protected]..
    > Thanks for the reply Amy
    > But I dont have any idea about sub-classing!
    > Please put some light on this concept.
    > Thanks
    Say you have an application
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:mm="com.magnoliamultimedia.*"
    layout="absolute">
    <mx:Canvas label="foo">
    <mm:ParentLabelText width="100" height="25" />
    </mx:Canvas>
    </mx:Application>
    If you have a directory com that has a directory
    magnoliamultimedia in it,
    then if it has this file, you should see "foo" on the screen
    when you run
    that application:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Text xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private function init():void{
    if (parent.hasOwnProperty('label')){
    text=parent['label'];
    } else {
    text='parent has no label property';
    ]]>
    </mx:Script>
    </mx:Text>
    HTH;
    Amy

  • Accessing a label through peoplecode

    HI all,
    I have to access the Label of a field using Peoplecode.
    I have tried using the Rec_name.Field_name.Label, but it is NOT returning any thing. I thought of using the GetLongLabel OR GetShort label functions. but for those functions i have to use the LabelID, which i can not have in the component buffer. one more problem with those functions is that Label can be changed manually on the page, right.
    Please share your thoughts how to access the Label of a record field using peoplecode

    To access the field label use the following:
    Local Field &FIELD;
    Local Record &REC;
    &REC = GetRecord();
    &FIELD = &REC.GetField(&I);
    &Label = &FIELD.GetShortLabel(&FIELD.Name);
    To update the field label at run-time use the following:
    &REC.FIELD.Label = &Label;

  • [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

  • How to access the Text Frame, when we use scrollable frame,

    Hi Friends,
    How to access the Text Frame, when we use scrollable frame,
    Thank you,
    [ Nav ]

    That's the same question:
    how can I access something (a page item) on a page…
    Answer: you need something unique in that object you can get a handle on.
    Or you use the selection a user of your script is doing and work with that selection…
    A "scrollable frame" is nothing special. What it makes it a "scrollable frame" is the DPS software.
    So you have to look for attached labels on the object, that identify the object for the PDS plug-in "Overlay Creator" as a "scrollable frame". That's possible with the "extractLabel("KeyString")" function. But you need to know the appropriate key-string in advance.
    In another of your thread in the DPS forum, I basically answered the question how to obtain those key-strings.
    When knowing the key-string you could loop through all your page items (you can skip all text frames) in the allPageItems-collection, to identify the "scrollable frame" by extracting the right label.
    If you have more than one "scollable frames" you need a second unique identifier for the particular object.
    That could be nearly any property.
    Keep in mind, there is no "scrollableFrames" collection in the DOM !
    Uwe

  • AS3: How to access and control embedded sounds in an external swf?

    I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can't seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF.
    It's easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF.
    I read several solutions, but none seem to work.
    I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 import tool and then open the actionscript properties panel on flash to select the class name: SoundSegment1. Then I edit the class code and create a file called SoundSegment1.as and it's saved right next to my document class main.as in the same directory. The code of the SoundSegment1 class looks like this:
    package  {
        import flash.media.*;
        public class SoundSegment1 extends Sound
            public function SoundSegment1 ()
                // no code in here
            public function playSound()
                var soundSegment1:Sound = new SoundSegment1();
                var channel:SoundChannel = soundSegment1.play();
    Then, in my main.as, I have done several attempts to play this sound such as:
    var fileLocation:URLRequest = new URLRequest(SWFToLoad); loader.load(fileLocation); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener); loader.contentLoaderInfo.addEventListener(Event.INIT, initListener); 
    function initListener(e:Event):void // I also placed this code on the completeListener and it didn't work {      loader.content.soundSegment1.playSound(); // doesn't work.  }
    I get:
    Line XXX 1061: Call to a possibly undefined method playSound through a reference with static type flash.display:DisplayObject.
    or, I also read that I should be able to do something like this anywhere in the Main.as file:
    var theClass:Class = Class(loader.content.getDefinitionByName("SoundSegment1")); var theSound:theClass = new theClass(); theSound.play()  //doesn't work either.
    I also tried on the completeListener:
    var TheClass:Class = e.target.applicationDomain.getDefinition("SoundSegment1") as Class; var theSound:TheClass = new TheClass();
    theSound.play()  //doesn't work either.
    I get:
    ReferenceError: Error #1065: Variable SoundSegment1 is not defined. at flash.system::ApplicationDomain/getDefinition()
    I am stuck and I really need to get this to work. I would be genuinely grateful for your help.
    Thank you in advance for any help provided. I really need to get it to work, because I can't simply embed them in the main SWF or load them individually externally one by one.
    Thanks again!

    THANK YOU!
    I think your code may be over my head though. I think you are using an anonymous function which is not something I am familiar with (but I want to learn about if it's useful).
    I also don't know where the classS came from. I see that it's a parameter sent along with the event, but I don't really see where that came from.
    Someone at: http://www.kirupa.com/forum/showthread.php?305098-Playing-a-embedded-sound-in-an-external- swf&p=2658098#post2658098
    Is showing what seems to be an easier solution, but my problem there is I can't access the source file of the "child" swf....  ayayay.....
    I am going to tinker with your solution and see if it gets me anywhere. Thanks so much for your help again.

  • How to access individual pixels in a frame...

    Hi there,
    I am newbie in java and i basically want to know how to access individual pixels in the frame so that i can change the RGB color values of some definite block of pixels. I did have a look at the RotationEffect java example at
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/RotationEffect.html but couldnt get much information from that.....If anybody has some information on this pls lemme know at the earliest...Regards, Kunal

    The source code examples at http://www.exactfutures.com/index02.htm may help.

  • How to access the handle of  the Frame window ?

    How to access the handle of the frame window through out the application ?. I want to display an alert box, while I click the fifth inner child component of the Frame . I am using Dialog Class for the alert box, I have to pass the frame handle to the Dialog constructer, I am getting the handle of the frame by getParent().getParent()......getParent().. But can any one suggest any better solution.

    If you application extends Frame or JFrame, you could simply refer to "this", or if you create a global or final Frame object that you use as your "top-level" component, you could refer to it this way. Additionally, if you're ever in a situation where you really need to go all the way to the top through n levels of components, I believe you could always do something like this...
    // assume myContainer is the "child" component that you're on, and you want to find its top-level parent
    Container c = myContainer;
    while (c.getParent() != null) {
         c = c.getParent();
    }

  • File upload uix controller (how to access/save file name in DB returned by

    sorry i am new in uix xml.
    my question is how to save/access file name in DB returned by FileUploadManager.
    I have used example Using a Controller in ADF UIX. Its uploading the file fine but i am not able to save this filename in DB so that i can access later.
    I only want to upload the files in Web Server not DB so only i need file name to save in DB.
    anybody can help me.

    you can use the movieclip properties, currentLabel (the current or previous, if there is no current, frame label), currentFrameLabel (may be null ) and currentLabels (an array of the movieclip's frame labels).

Maybe you are looking for