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?

Similar Messages

  • How to stop a movie clip that is loaded dynamically

    Hello Flash Forum,
    I am using the loadmovie method to load a swf file into a
    movie clip "container"
    Code snippet:
    var mc:MovieClip = this.createEmptyMovieClip("mc",1);
    mc.loadMovie('bbc_module1.1.swf','bbc_audio',container.getNextHighestDepth(),
    {_x:300.8, _y:240});
    mc._lockroot = true;
    The movie clip I load does not have a stop action in frame 1,
    but comes up playing (audio and images). I am not using video. It
    is a series of still images synced to the audio.
    I would like to be able to load the movie clip, stop it from
    playing, and by clicking buttons, get it to play, pause, etc like
    the buttons and skin on the FLVPlayer.
    Any tips on how to do this?
    Thanks,
    eholz1

    Many thanks ClBeech!!!
    I've tried the code you suggested but it doesn't seem to work
    :0(
    I'm working on a Mac using Flash Pro 8 which only has the
    option to publish as 'actionscript 1.0 or 2.0' is the script you
    supplied an actionscript 3.0?
    Below is the script with the amendments, I've changed my
    button instance names to match the script you supplied (left_btn /
    right_btn)
    stop();
    import mx.transitions.Tween;
    import mx.transitions.easing.Strong;
    var rposX = 369;
    //the ending x of the right position
    var rposY = 84;
    //the ending y of the right position
    var lposX = 116;
    //the ending x of the left position
    var lposY = 154;
    //the ending y of the left position
    right_btn.onPress = function() {
    new Tween(content1, '_x', Strong.easeOut, content1._x,
    rposX, time, false);
    new Tween(content1, '_y', Strong.easeOut, content1._y,
    rposY, time, false);
    left_btn.onPress = function() {
    new Tween(content1, '_x', Strong.easeOut, content1._x,
    lposX, time, false);
    new Tween(content1, '_y', Strong.easeOut, content1._y,
    lposY, time, false);

  • Accessing a Movie Clip in a parent Scene.

    Setup:
    *Scene 1:
      - MovieClip1
      *Inside MovieClip1:
       - Actions:
         stop();
         next_btn.addEventListener(MouseEvent.CLICK, onNextButtonClicked);
         previous_btn.addEventListener(MouseEvent.CLICK, onPreviousButtonClicked);
         function onNextButtonClicked(e:MouseEvent):void {
         if (currentFrame == totalFrames) {
         gotoAndStop(1);
         } else {
         nextFrame();
         function onPreviousButtonClicked(e:MouseEvent):void {
         if (currentFrame == 1) {
         gotoAndStop(totalFrames);
         } else {
         prevFrame();
        (THIS CODE IS FOR MY NEXT AND PREV BUTTON TO CYCLE THROUGH MY PIECES OF WORK)
       Then I have...
      - Pieces of work Layer:
        This includes each piece on a single frame, with a label name. (5 total frames on this layer)
        Then I have....
        - Next and Prev buttons on a layer
        And Finally....
       - The last layer in this scene has a background frame.
    ***** Now inside each frame containing each piece of work there is:
           1st Layer = Actions
           Containing this code: stop();
           2nd Layer = This is the movie Clip that Fades my pieces of work in.
       ****** Inside this movie Clip of the piece of work fading in will contain:
               1st Layer = Actions
               Containing this code:
    stop();
    function openLabel(event:MouseEvent):void {
    switch (event.currentTarget) {
    case identity_cplogo_btn :
    gotoAndPlay("cplogo_lv");
    break;
    identity_cplogo_btn.addEventListener(MouseEvent.CLICK, openLabel);
    2nd Layer = 1st frame blank, then frame 2-10 contains a movieclip with a label of cplogo_lv. This movie clip is the clip that has a large view of the image popup and darken the background. (Like a lightbox effect)
    3rd layer = the logo which is a BUTTON. THis is located on the first frame and is called "identity_cplogo_btn." So when this is clicked it opens the large view.
    *****Now....
    When I click inside the movieclip that is the lightbox effect and go inside of it there is.....
    1st Layer = Actions with the code of:
    stop();
    function openLabel(event:MouseEvent):void {
    switch (event.currentTarget) {
    case lv_close_btn :
    gotoAndPlay("return");
    lv_close_btn.addEventListener(MouseEvent.CLICK, openLabel);
    ****After the actions keyframe, which is locate on frame 10, there is a label called "return" from frame 11-24. It is a blank label meaning there is nothing on it but the label name.
    2nd Layer = the "Close" button which appears when the large view is opened and is located on frame 10 right underneath the action code.
    3rd Layer = This contains the Large view of the logo, which I have made a movie clip for making it fade in then I paste reverse frames after right underneath the "return" label making it fade out.
    4th Layer = Contains the Dark background that pops up which also fades in then underneath the "return" label it has its' reverse frames which are making it fade out.
    SO... I have the code making it so that when the "Close" button is clicked it is going to the "return" label which is making everything fade out.
    ***************************** NOW WHAT I NEED TO FIGURE OUT *************************************
    I need to know the code to be in the last movie clip I just explained and when I click the close button and it plays everything underneath the "return" label, THEN i need it to access the movie clip with the logo fading in so that it appears to go back to BEFORE clicking on the logo and expanding the view.
    I understand that this code will be places right after the "return" label so that when the return phase plays it will then play the code making it go to this movie clip then it will stop.
    I have tried
    MovieClip(parent.parent).gotoAndPlay("return_2");
    stop();
    And giving the movieclip that has the logo fading in the "return_2" label name. THis allows it to go to that movie clip, however, it doesnt play it is just blank on the screen.
    I also have tried accessing the movie clip after giving it an instance name, but it was doing the same thing.
    Help PLEASE!

    I actually tried a post earlier that was simplified, but I think the setup of scenes might be important....anyways, here it is.
    Setup:
    Scene 1 > MovieClip1 > MovieClip2 > MovieClip3 > MovieClip4
    Explanation:
    I am in MovieClip4, in which I have a "Close_btn" that when clicked, it takes you to label "return" (still inside MovieClip4), which then plays the movie clips in the layers below label "return." What I want it to do is....Once label "return" plays, I need the code to make it go into "MovieClip2" and play a movie clip with the "Instance" Name of "Logo_1."
    I have tried this by setting a label name above the movie clip and referencing the label, however, it does access that movie clip, but it doesnt play it...It is just blank.
    Hope this is understandable.

  • How do I transfer movie clips from iPhoto to iPad?

    How do I transfer movie clips from iphoto on my iMac, to my iPad?

    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import.
     Cheers, Tom

  • How do I recerence Movie Clips on the Main Timeline from inside a class?

    Hey everyone, this might be a stupid question but I thought
    I'd ask cause it's making me nuts. I'm all of 2 days into AS3
    (coming from not using Flash at all in YEARS) so feel free to
    consider me ignorant. I do have plenty of application development
    experience in other areas though.
    I can't seem to create a class that can reference an instance
    of a movie clip on my main timeline. I'd post code of what I've
    tried but I've gone through so many desperate edits & wild
    guesses that it was just garbled junk before I deleted it all.
    Basically here's how I figured Flash could work, though maybe
    it doesn't work this way at all.
    I'm assuming that with AS 3 being so big on being a true
    object oriented environment, I wouldn't need to mix my code and
    interface together. Preferably I'd be using the Flash authoring
    tools just to design my interface. Create a button... place it
    somewhere... give it an instance name. Roughly the equivilant of
    Apple's InterfaceBuilder for those of you that might be familiar
    with Cocoa development. I can see maybe having to put a few lines
    of ActionScript onto frame 1 (though really I'm hoping Flash would
    have a better method of kicking off the application at this point
    that using code tied to frames) to load my classes & such, but
    after that I'd like all of my code to be held in external class
    files.
    So maybe I've got:
    Interface.fla - My interface
    Button_1
    Button_2
    TextField_1
    Main.as - My main controller class using to handle all of my
    applications behavior
    SomeClass.as - Some helper Class
    SomeOtherClass.as - Some helper Class
    Main.as would have instructions in its initialization method
    to go ahead & attach events to buttons & initialize
    anything else that needs to happen when the application starts.
    From there on it would all be objects communicating back &
    forth. Button_1 would get clicked with would fire
    Main.someMethod(). Main.someMethod() would then do it's thing and
    set the value of TextField_1. All very clean & code is very
    separated from interface.
    Unfortunately I can't for the life of me figure out how AS3
    classes reference each other like that. There doesn't seem to be
    any kind of a global 'root' or '_root' I can use to locate any
    movie clips on the stage. I've searched the help & the web for
    any kind of simple tutorial but to no avail. My job has tasked me
    with building a flash app for a project but I'd really rather not
    have a tone of ActionScript just shoved into frame 1. That just
    seems... ugh! (::shudder::)
    Can someone maybe point me in the right direction here? I'm
    really willing to do my homework but I can't seem to locate the
    info I need to get started. Also, is there an ActionScript IRC
    channel or something maybe?
    Thanks,
    Cliff

    I worked with the problem last night and the solution I
    started coming to involved creating my own custom document class
    based off which extends MovieClip. My thought is that way I have
    access to the initialization routine of the timeline itself and
    that all of the elements on the main timeline should be
    "properties" of my custom class.
    Is this correct? Is there a down side to doing this & if
    so what is it & why?
    Also, just for my reference, the last time I did anything
    with ActionScript I think I was using '_root' to target the main
    timeline. WHat are the global variable names in AS 3? Is it just
    'root' & 'stage' or 'Root' & 'Stage' or what?

  • How do I backup movies/clips to use in future projects?

    After burning my first DVD & deleting the iMovie file, I was sad to discover that I could not just pop the DVD into my drive & access the material to use in future projects. (Is there a way to do do this that I don't know about?)
    I'm guessing I need to burn the archived iMovie file onto multiple regular CDs (I have not burned anything that spans several CDs before). This is confusing me because the zipped file is hardly smaller than the original (Is there a better zip program than the one that comes with this system?) I threw away the wrapper for my blank CDs so I don't know how much they hold but I think it is something ridiculously small like 670MB and the iMovie file is 7GB. Is this the only way to save my movie/clips so that I can bring clips into a future movie?
    1.8 GHz Power PC G5   Mac OS X (10.3.9)   256 MB DDR SDRAM

    welcome Novice to the  board ....
    hmm, multidimensional question ...
    DVD is end-of-the-road, not meant for further processing; there are tools, allowing to import DVD to iM, but that is a time-consuming and lossy (=losing pic quality) process, due to the deliver-format nature of DVDs.... search forum for "DVD import"
    iM is by concept not meant to handle a clip in many projects (that can easily been accomplished with pro tools as FC(E), which offer "bins" for imports, offering the content to many sequences/projects).
    there are workarounds, dragging clips from the internal files of an iM project to another... but, as said: you "fumble" the concept: import tape, edit, burn - done.
    a video contains ~13GB of data per hour... and, video is allready highly compressed, no zipper can reduce that dramatically... and, you risk damage of files... yepp, a cd-r fits ~700MB = 3.5min of video......
    recommended workflow:
    * don't store iM projects on -r media (cd/dvd), but firewire connected harddrives..
    * keep the tapes; import clips from tape into project; you can export single clips out of iM/import into another project, I wouldn't do that with "lots" of clips, importing the tape is... more convenient..

  • How to Remove a Movie Clip

    Hi,
    On the main timeline, I have the following code:
    external_btn.addEventListener(MouseEvent.CLICK, showMenu);
    function showMenu(e:MouseEvent):void
    var myMovieClip:MovieClip = new Member();
    addChild(myMovieClip);
    myMovieClip.x = 597.95;
    myMovieClip.y =359.15;
    in the internal movie clip, that I linked it to Member:
    In the member movie clip, I have the following code to remove the movie clip that was created in the main timeline of the root movie clip.
    release1_btn.addEventListener(MouseEvent.CLICK, goBack1);
    function goBack1(e:MouseEvent):void
    MovieClip(root).removeChild(myMovieClip);
    I received the following compiler error:
    1120: Access of undefined property myMovieClip.
    Please help me know how to resolve this error message.
    Thanks,
    Robert.

    that's (coding on more than one timeline) not good coding style, but this will correct your error and the prevent a few more:
    release1_btn.addEventListener(MouseEvent.CLICK, goBack1);
    function goBack1(e:MouseEvent):void
    MovieClip(this.parent).removeChild(this);

  • How to change the movie clip a button links to???

    I am working on a website in Flash that had already been
    designed by someone else. There are a number of buttons across the
    website that are linked to the same symbol. Those buttons link to
    movie clips, in the button's actions, that pop up as small windows
    providing more information in regards to the button clicked. The
    problem is that I cannot figure out how to properly change the link
    association between button and movie clip.
    Here is the action script for one of the buttons:
    on (release) {
    _root.scrHEIGHT=100
    _root.scroller.scroller.gotoAndStop(2);
    _root.scroller._x = 100;
    _root.scroller._y = 150.7;
    _root.TM_title = "About Chris Smith";
    _root.READ = 3;
    When I change the number after "root.READ =" it will change
    it to another movie clip but I how do I know what that association
    is based on? For instance if I make a duplicate movie clip how can
    I make the above script link to it? Also, what exactly does that
    last line in the above script mean? When I tested various numbers,
    like 3 and 6, they would link to the same movie clip.
    Please help! This is driving me crazy!
    Thanks!!!

    Hi,
    buttons can be defined with static icon/text, or dynamically via a variable (containing @08\Qtooltip@text for example). You choose the pushbutton type when you define your button using the screen painter. For the dynamic definition, you must tick the "output only" checkbox, enter a global variable name, that you'll fill in your program, preferably using ICON_CREATE function module.
    BR
    Sandra

  • Sizing dynamic movie clips

    I have a project I am working on that has a scroll window on
    the main page and the movie clip displayed in it changes. All of
    the movie clips that get displayed in the scroll window are all
    dynamically made through actionscript loading all of the info from
    PERL scripts usingLoadVars().
    For some reason I cannot figure out yet there is like a full
    page worth of empty space at the bottom of each movie clip so as
    you scroll down once you hit the end of the content it will still
    scroll down atleast another page worth. Any ideas how I can stop
    that so the scrolling will stop when the content ends?

    Thats what I was thinking as well, Any ideas what I would
    look for to find what is causing the problem? as far as I can tell
    everything is just blank, and if I manually set the height value
    for the movie clip it does squish everything and still include the
    blank space so it looks like flash thinks something is there.
    Or is there a way I can set the height of the movie clip
    forcing it to cut off anything below? adjusting the height value
    just forces the entire movie to display into that size, cutting it
    off at that height value would resolve my problem as well.

  • How to keep a Movie Clip on the screen for 5 secs.

    I am having trouble with keeping a movie clip on the screen.
    I am setting it up to play a movie using the .onPress function. It
    is calling the movie but only shows it for a split second. How can
    I make the movie stay on the stage for 5 seconds? Here is how I
    have it coded:
    rc1MC.onPress = function() {
    if (rc1MC.hitTest(_xmouse, _ymouse, false)){
    _global.correct++;
    updateStats();
    var c1:MovieClip = this.attachMovie ("correct1_mc",
    "correct1",4300);
    var ymov = this._y;
    var gravity = 20;
    c1.onEnterFrame = function() {
    ymov += gravity;
    xmov *= 0.5;
    c1._rotation += 5;
    c1._x += xSpeed;
    c1._y = ymov;
    if (c1._y>stageHeight) {
    c1.removeMovieClip();
    delete this.onPress;
    Thanks Brandon

    Got my answer...
    http://forums.verizon.com/t5/FiOS-TV-Technical-Assistance/For-Those-of-You-Who-Want-to-View-Subscrib...

  • How to email a Movie Clip in Flash

    Hi everyone.
    I am creating a painting / drawing application in flash.
    I want to add a functionality, which allows the user to send his/her painting to his/her email address.
    How can this be done?
    Please note that the painting / drawing would be a movie clip
    Help on an urgent basis would be greatly appreciated
    Thanks

    Hi,
    I did something similar for AS2:basically there was a "designer" swf where one could interact to create a design,
    and a "viewing" swf that contained all the bits and pieces used (e.g. a blank t-shirt).
    The designer swf would send data (placement of objects, coordinates of strokes) to the server, and the server would amend the blank viewer swf by compiling the data object and adding it as another code block. The code of the viewing swf would handle constructing the desired image, by placing objects, adding strokes, etc.
    With the simple structure of AS2 code, php could do that.
    I sort of believe that something similar could be done for AS3 if the server is able to run java (the flex sdk programs). Addition: PHP by itself should be able to replace an embedded text file ... such as an xml description of the artwork

  • Dreamweaver CS4 How to play a movie clip by clicking an image

    Hi
    Can anyone recommend a DW Behaviour, Widget or simple piece of Javascript coding that would allow me to start (or start and stop) a movie clip by clicking an image.
    I have a web page created in DW CS4 which has 4 FLV video clips and I would like visitors to be able to start their clip of choice by clicking a small still from each movie stacked at the right side of the page.
    I've seen this done on many sites but don't know how complex it would be.
    Any help / advice much appreciated.
    Thanks
    George

    Hi Ned, thanks for the response;
    1.Yes I named the instance.
    2.I  don't beleive so. I started from the library creating a new symbol, added the graphics, added the key frames, then created the tween. Then I dragged the symbol onto the main stage and named the instance. So I don't think there is a movie clip inside an mc.
    Here is the main timline:
    Here is the mc timeline:
    Here is what I'm trying to do:
    stop();
    blk1._visible = false;
    blk2._visible = false;
    blk3._visible = false;
    ppk1._visible = false;
    ppk2._visible = false;
    ppk3._visible = false;
    storeCartons = new Array();
    storeCartons = [blk1, blk2, blk3, ppk1, ppk2, ppk3];
    startButton.onRelease = function() {
        myNumber = Math.floor(Math.random()*storeCartons.length);
        trace("myNumber "+myNumber);
        activeCarton = storeCartons[myNumber];
        activeCarton._visible = true;
              activeCarton.play();

  • How to flip a movie clip using actionscript

    I have a movie clip on the stage facing one way (--->) how
    can I make it face the other way (<---) by flipping it over (not
    rotating it) using action script 3?

    var flipTween:Tween = new Tween(mc, "scaleX", Regular.easeIn,
    mc.scaleX, mc.scaleX*(-1), 1, true);
    should do it I think.

  • How to print a Movie clip inside uiLoader?

    Hi,
    I;m making a flash application in AS3, and I've got a little problem.
    Which is here...
    Here is my code....
    /* Print Button Function Here.....*/
    print_btn.addEventListener(MouseEvent.CLICK,printPage);
    function printPage(evt:MouseEvent) {
        var printJob:PrintJob = new PrintJob();
        if (printJob.start()) {
            if (uiLoader.source.width>printJob.pageWidth) {
                uiLoader.source.width=printJob.pageWidth;
                uiLoader.source.scaleY=uiLoader.source.scaleX;
            printJob.addPage(uiLoader.source);    <------------ Error shows Here
            printJob.send();
    Actually I have a movie clip which contains a Print Button and a uiloader.
    uiloader loads differnt external movies.
    I applied a code to Print button to print those movies.
    But FlashProgram shows an error.
    which is Here....
    Scene 1, Layer 'Actions', Frame 2, Line 174
    1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:Sprite.
    Please tell me how to fix it.
    thank you...

    Thank you very much it's been really helpfull.
    Now it's working but there are two more issues which i want to dicuss now.
    1st issue is, it print the both movies (main movie & external both) but i only want to print that one which inside the uiloader only.
    2nd issue is, actually this application which I'm making is for users to apply various paints on roofs and walls to check how they looks.
    The issue is it only print the actual movie colors not those colors which have been currently applied. Or what i'm trying to say is that, " how can I print uiloader source movie with it's current colors settings?"
    thank you.

  • How to freeze a movie clip?

    Hi,
    I am new to flash, and I've never done animation before, so I'm a little confused on how to make a symbol movie clip, freeze and then keep moving.
    Do I need to do it frame by frame?
    I made a character walk from off the stage to the center by using a motion tween and it appears to be moving because I edited the symbol to make the legs move. But now I don't know how to make the legs stop when the character reaches the end of the motion tween. Is it even possible?
    I hope I explained myself clearly...All help is appreciated.
    Thanks

    the moving legs should be a movieclip.  that movieclip will be a child of the character movieclip.  the legs movieclip should have an instance name on the character timeline (eg, legs_mc).
    then if your character is added to the main timeline, assign an instance name (eg, character_mc) and when character_mc stops moving, use:
    character_mc.legs_mc.stop();

Maybe you are looking for

  • Changing default outgoing email address

    So, my AppleID is an @me.com address.  I created when I was still in college and put my birth year into the ID out of frustration that [email protected] had already been taken; for the purpose of this we'll call it [email protected] I've since recogn

  • Vendor creation using LSMW

    Hi All, I m  trying to do vendor creation in LSMW method using RFBIKR00 program,please any one guide me I strucked in 2 Maintain Source Structures after this cursor not moving to next radio button even though I done for next steps final it is not rea

  • Webpages doesn't display

    Hello, I cannot visit one of my friend's website from my PC (IE/Chrome).However, I can visit from other PC or Smartphones. A message displays that "This webpages cannot display" However, I can visit other websites, I only cannot visit this website.Th

  • Extract purchasing info records

    Hi experts, Please could you tell me the process to extract purchasing info records for a plant. they need to do a mass update. Thanks in advance.

  • Installing XI without importing ABAP

    Hi Presently I am working on ECC6.0 and Netweaver 7.1. I am trying to install XI. While installing XI, it is asking to use an existing instance or create new instance. For both the options entire ABAP is importing. My requirement is to install XI on