RemoveChild in parent.swf from child.swf (AS3)

Hi! How do I remove a child from a parent timeline with an externally-loaded swf? Specifically, I have a main.swf that loads movie_1.swf and movie_2.swf. In the movie_1.swf, I have a button to remove movie_2.swf from main.swf.
//--------- main.swf code:
var loader1:Loader = new Loader();
var loader2:Loader = new Loader();
loader1.load(new URLRequest("movie_1.swf"));
loader2.load(new URLRequest("movie_2.swf"));
addChild(loader1);
addChild(loader2);
//------------- movie_1.swf code:
removeMovie2_btn.addEventListener(MouseEvent.CLICK , removeMovie2);
function removeMovie2(event:MouseEvent):void
this.parent.parent.removeChild(this.loader2); // this does not work (get error code 2007, "Parameter child must be non-null")
// Thank you!

Here's how your code will change:
//--------- main.swf code:
var loader1:Loader = new Loader();
var loader2:Loader = new Loader();
loader1.contentLoaderInfo.addEventListener(Event.COMPLETE, assignMovie1Listener);
loader1.load(new URLRequest("movie_1.swf"));
loader2.load(new URLRequest("movie_2.swf"));
addChild(loader1);
addChild(loader2);
function assignMovie1Listener(evt:Event):void {
      MovieClip(evt.currentTarget.content).addEventListener("eventTriggered", removeLoader2);
function removeLoader2(evt:Event):void {
      loader2.unloadAndStop();
      removeChild(loader2);
//------------- movie_1.swf code:
removeMovie2_btn.addEventListener(MouseEvent.CLICK , removeMovie2);
function removeMovie2(event:MouseEvent):void
      dispatchEvent(new Event("eventTriggered"));

Similar Messages

  • How to unload swf from anather swf

    I am calling 3 different swf in to test.swf.
    now i want to unload only 1 swf from test.swf
    can any 1 tell me how it is possible i am trying
    with removeMoviClip() and unloadMovie()
    but its of no use.
    regards
    Justbipin

    Maybe that's not really what you're doing?
    I would guess you rather have
    loadMovieNum("myFiLe.swf",99);
    This would be unloaded with
    unloadMovieNum(99);
    Good luck
    Wolf
    PS Or do you have a container movieClip called "99" to fool
    us all? :-)
    PPS watch your capitalization. If you call a file "myFiLe"
    (and mis-spell it somewhere) it might work on Windows, but not on
    Unix-derivatives. A potential source of "Why did it work when I
    tested it but not when I uploaded it?"

  • Calling a parent function when child .swf closes

    I am adding a child .swf from the parent with a simple button. If this button is then clicked multiple times, the child is added multiple times. So I added the ".visible = false"  to the button when clicked so the button cannot be clicked while the child is open.
    Now, there is "Close" button on the child .swf that uses "this.parent.parent.removeChild(this.parent);" and would now need to set the parent button back to ".visible = true".
    I have tried MovieClip.parent.parent.resetButton();  and  parent as MovieClip.resetButton(); and many variations of the code. I get no errors but the code doesn't work either.
    Any ideas?
    Thank you.

    Figured this out on my own (don't believe it) without the child/parent communication.
    When the parent's button is clicked, I'm checking to see if the child already exists. If so, it won't create the child again.
    I'd still like to know how to perform the communication between child and parent.

  • Parent SWF controlling Child SWF variables

    1) The code below works but the browser sends an annoying
    alert message
    “Received Parent Message” and you are obliged to
    click OK before the program can run. How can it be fixed ?
    2) Why this code needs to use the
    ExternalInterface class if the Child SWF gets loaded and
    becomes incorporated in the Parent SWF ?
    3) Is there a
    simpler and more straightforward way for a Parent SWF to
    communicate with a Child SWF ?
    package
    import flash.external.ExternalInterface;
    import flash.display.Sprite;
    import flash.text.*;
    public class ChildMovie extends Sprite
    public function ChildMovie():void
    public function alert(msg:String):void
    ExternalInterface.call('alert', msg);
    txt.text = msg;
    package
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.display.LoaderInfo;
    import flash.display.Sprite;
    public class ParentMovie extends Sprite
    public function ParentMovie():void
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    onLoadComplete);
    loader.load(new URLRequest('ChildMovie.swf'));
    private function onLoadComplete(e:Event):void
    var loaderInfo:LoaderInfo = e.target as LoaderInfo;
    addChild(e.target.content);
    var swf:Object = loaderInfo.content;
    swf.x = 75;
    swf.y = 50;
    swf.alert('Received Parent Message');

    Hi,
    You can launch the SWF in new window with navigateToURL() available in flash.net package by passing the path of SWF as parameter to function as
    navigateToURL(new URLRequest(domainPath + "/appmanager/login.swf"));

  • Load preloader from child swf

    The following preloader and code to laod the first swf is in the fiest frame of the main movie.
    stop();
    // this function runs the preloader
    // it is to be used with the onEnterFrame
    // of the preloader animation
    function preloadContainer(){
        // get bytes loaded and total from movieHolder
        var bytes_loaded = movieHolder.getBytesLoaded();
        var bytes_total = movieHolder.getBytesTotal();
        // stop and hide the movie so it wont play or
        // be seen while progressively downloading
        // (keep trying if it exists or not just to be sure)
        movieHolder.stop();
        movieHolder._visible = false;
        // if bytes_total is a valid number and greater than 0
        if (bytes_total > 0){
            // get percent loaded
            var percent_loaded = bytes_loaded/bytes_total;
            // update the value in the preloader
            preloader_mc.value = percent_loaded;
            // check if preloading is complete
            if (percent_loaded == 1){
                // play and show the container clip
                movieHolder.play();
                movieHolder._visible = true;
                // remove the preloader movie clip
                preloader_mc.removeMovieClip();
                // delete the onEnterFrame event handler running this function
                delete onEnterFrame;
    stop();
    // movie 1 loads the swf using startPreload
    startPreload("ShopOutsideAnim01.swf");
    // this function begins preloading a swf url
    function startPreload(url){
        // use loadMovie to load the swf url into container_mc
        movieHolder.loadMovie(url);
        // attach the preloader animation
        // this will be removed when preloading is complete
        attachMovie("preloader anim", "preloader_mc", 500, {_x:275, _y:165});
        // set the onEnterFrame event to call preloadContainer
        onEnterFrame = preloadContainer;
    Once the swf  loads a button can be pushed in the loaded swf which goes to the last frame where the below code is. I want at this point to preload another swf into the same location. It does not work. It does attach the preloader anim movie and load the swf, but it does not run the preloader function.
    stop();
    // movie 1 loads the swf using startPreload
    LoadIt("ToolShopAnim01.swf"); 
    // this function begins preloading a swf url 
    function LoadIt(url){ 
        // use loadMovie to load the swf url into container_mc 
        _parent.movieHolder.loadMovie(url); 
        // attach the preloader animation 
        // this will be removed when preloading is complete 
        _parent.attachMovie("preloader anim", "preloader_mc", 500, {_x:275, _y:165}); 
        _parent.preloadContainer; 

    In the child swf I should put this code:
    _parent.startPreload("ShopOutsideAnim01.swf");
    I was trying to create a new function in the child swf. I dunno this stuff drives me nuts. But I'm happy I figured something out!

  • Having problem controling resizing of a swf from another swf

    I'm trying to build a site where all the pages are full browser and maintain aspect ratio. I would like to control the resizing from the menu page.  The resizing works fine from the page that's being resized but when I try to let the parent swf do that it has issues.
    Here's what the home page looks like with the controls built in  http://www.mespinach/example1/
    This example is the site it has a menu page that I open the others from I remove the resizing code from the home page and try to resize from menu.swf.
    here's the code from menu.swf
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    var holder:btnHolder = new btnHolder();
    addChild(holder);
    stage.addEventListener(Event.RESIZE, moveHolder);
    moveHolder();
    function moveHolder(e:Event = null):void {
        holder.x = stage.stageWidth - (holder.width +25);
        holder.y = 50;
    holder.mcHome.buttonMode = true;
    holder.mcAbout.buttonMode = true;
    holder.mcMovies.buttonMode = true;
    //holder.mcLocation.buttonMode = true;
    holder.mcStore.buttonMode = true;
    //var objFileToLoad:URLRequest = new URLRequest();
    var swfLoader:Loader;
    addListeners();
    function addListeners():void {
        holder.mcHome.addEventListener(MouseEvent.CLICK, homePage);
        holder.mcAbout.addEventListener(MouseEvent.CLICK, aboutPage);
        holder.mcMovies.addEventListener(MouseEvent.CLICK, moviesPage);
        // holder.mcLocation.addEventListener(MouseEvent.CLICK, locationPage);
        holder.mcStore.addEventListener(MouseEvent.CLICK, storePage);
    var currentPage:*;
    var xImage:Sprite = new Sprite();
    homePage();
    function homePage(event:MouseEvent = null):void {
        SoundMixer.stopAll();
        addListeners();
        if(swfLoader){this.removeChildAt(0);}
        holder.mcHome.removeEventListener(MouseEvent.CLICK, homePage);
        var loadRequest:URLRequest = new URLRequest("home.swf");
        swfLoader = new Loader();
        swfLoader.contentLoaderInfo.addEventListener(Event.INIT, positionContent);
        swfLoader.load(loadRequest);
        this.addChildAt(swfLoader, 0);
        function positionContent(e:Event):void {
            currentPage = swfLoader.content;
            var loadedImage = currentPage.onStage;
            xImage = loadedImage;
    //        loadedImage.x= 0;
    //        loadedImage.y= 0;
            fillBG();
    function aboutPage(event:MouseEvent):void {
        SoundMixer.stopAll();
        var objFileToLoad:URLRequest = new URLRequest("about.swf");
        loader.contentLoaderInfo.addEventListener(Event.INIT,positionContent);
        loader.load(objFileToLoad);
        this.addChildAt(loader, 0);
        function positionContent(e:Event):void{
           loader.x= 0;
           loader.y= 0;
    function moviesPage(event:MouseEvent):void {
        addListeners();
        holder.mcMovies.removeEventListener(MouseEvent.CLICK, moviesPage);
        SoundMixer.stopAll();
        if(swfLoader){this.removeChildAt(0);}
        var objFileToLoad:URLRequest = new URLRequest("Movies.swf");
        swfLoader.contentLoaderInfo.addEventListener(Event.INIT,loadedHandler);
        swfLoader.load(objFileToLoad);
        this.addChildAt(swfLoader, 0);
        function loadedHandler(e:Event):void {
            currentPage = swfLoader.content;
            xImage = currentPage;
    function locationPage(event:MouseEvent):void {
        SoundMixer.stopAll();
        var objFileToLoad:URLRequest = new URLRequest("location.swf");
        loader.load(objFileToLoad);
         this.addChildAt(loader, 0);
    function storePage(event:MouseEvent):void {
        SoundMixer.stopAll();
        var objFileToLoad:URLRequest = new URLRequest("store.swf");
        loader.load(objFileToLoad);
         this.addChildAt(loader, 0);
    holder.addEventListener(MouseEvent.MOUSE_OVER, over);
    holder.addEventListener(MouseEvent.MOUSE_OUT, out);
    holder.addEventListener(MouseEvent.MOUSE_DOWN, down);
    holder.addEventListener(MouseEvent.MOUSE_UP, up);
    holder.mcAbout.buttonMode = true;
    holder.mcHome.buttonMode = true;
    holder.mcMovies.buttonMode = true;
    holder.mcStore.buttonMode = true;
    //holder.mcLocation.buttonMode = true;
    var myColor:ColorTransform = transform.colorTransform;
    function over(e:MouseEvent):void {
        myColor.alphaMultiplier = 3;
        e.target.transform.colorTransform = myColor;
    function out(e:MouseEvent):void {
        myColor.alphaMultiplier = 1;
        e.target.transform.colorTransform = myColor;
    function down(e:MouseEvent):void {
        myColor.alphaMultiplier = 5;
        e.target.transform.colorTransform = myColor;
    function up(e:MouseEvent):void {
        myColor.alphaMultiplier = 1;
        e.target.transform.colorTransform = myColor;
    //var cpc = this.child.child.getChildByName("onStage");
    //trace(cpc);
    var ratio:Number;
    var rRatio:Number;
    ratio = xImage.height/xImage.width;
    rRatio = xImage.width/xImage.height;
    var newRatio:Number;
    function fillBG(evt:Event = null):void {
        trace("width: " + xImage.width);
        trace("height: " + xImage.height);
        trace("ratio: " + ratio.toString());
        trace("rRatio: " + rRatio.toString());
        trace("newRatio: " + newRatio.toString());
        newRatio = stage.stageHeight/stage.stageWidth;
        holder.x = stage.stageWidth - (holder.width +25);
        holder.y = 50;
        if (newRatio > ratio) {
            trace("newRatio > ratio: ");
            xImage.height = stage.stageHeight;
            xImage.width = stage.stageHeight * rRatio;
        } else {
            trace("else");
            xImage.width = stage.stageWidth;
            xImage.height = stage.stageWidth * ratio;
        stage.addEventListener(Event.RESIZE, fillBG);
    messages from trace statements here:
    width: 939
    height: 704
    ratio: NaN
    rRatio: NaN
    newRatio: NaN
    else
    width: 561
    height: 704
    ratio: NaN
    rRatio: NaN
    newRatio: 0.49376114081996436
    else
    The height never changes
    retio and rRatio are NaN even though they are the Quotient of numbers.

    First, it is too much code to go through so I don't think I will give a complete answer. I assume this is a timeline code.
    Here is what I was able to notice:
    1. You declare the variables outside the scopes of the functions:
    var ratio:Number;
    var rRatio:Number;
    ratio = xImage.height/xImage.width;
    rRatio = xImage.width/xImage.height;
    var newRatio:Number;
    Naturally, they are NaN because neither xImage.height nor xImage.width are available at this point.
    I suspect that you anticipate that when code hits these lines - swf is already loaded but IT IS NOT. Flash executes ALL THE CODE to the end NOT WAITING for swf to load - this is one of the premises of asynchronous event model.
    To remedy this you need to place value assignments into the event handler:
    Version One:
    Declare variable at the top of the code before you start loading:
    var ratio:Number;
    var rRatio:Number;
    var newRatio:Number;
    Calculate values in event handler:
    function positionContent(e:Event):void {
            ccurrentPage = swfLoader.content;
            var loadedImage = currentPage.onStage;
            xImage = loadedImage;
            ratio = xImage.height/xImage.width;
            rRatio = xImage.width/xImage.height;
            fillBG();
    Or do it inside  fillBG(); method (version two)
    2. Nested functions are evil and I would like to suggest you reconsider using them and bring them outside of other methods' scopes. I am talking about positionContent handlers you use.

  • Rendering of SWF Loader child SWFs

    I am using the swf loader with an Xcelsius OpenDoc link (http://<server>:8080/Xcelsius/opendoc/documentDownload?sIDType=CUID&iDocID=<CUID>&sKind=Flash&CELogonToken=<CELogonToken>)  and it works beautifully so long as the parent swf is also opened using and OpenDoc link.  However, if the parent swf is opened via InfoView, the child swf does not render properly (either way too large or too small).  Has anyone else come across this or have any ideas for resolution?
    Regards,
    Alison

    "whomba" <[email protected]> wrote in
    message
    news:glq6j0$b20$[email protected]..
    > Hello all,
    > I have a Flex app that loads in a swf using 'SWFLoader'
    tag. the SWFloader
    > and
    > the swf being loaded in are the same height and width
    (see attached code)
    > Now,
    > the SWF getting loaded in is also 468 X 351 however the
    designers that
    > made it
    > have crazy amount of random Movie Clips EVERYWHERE that
    isn't on the
    > stage. My
    > guess is that the actual height and width of the SWF is
    close to 1000 X
    > 1000.
    > When I load this SWF in to my SWFLoader it scales
    everything down so all
    > of the
    > MovieClips are inside of this SWFLoader rather than just
    the SWF's Stage.
    > Any
    > Suggestions?
    >
    > <mx:SWFLoader id="mainMovieSWF" height="351"
    width="468"
    > source="{mainMovieSrc}" scaleContent="false"/>
    Try wrapping it as a component with the Flex component kit.
    That way you
    get to specify the bounding box.
    HTH;
    Amy

  • Control swf from separate swf in main file

    Im loading 2 swfs into my main swf. So I have a top swf and a
    bottom swf being loaded in externally into my main swf that makes 3
    swfs, 1MAIN swf loading TOP swf & BOTTOM swf.
    Is there a way to have the bottom swf control or command the
    top swf? I need a button on in the bottom swf to tell the top swf
    to load a movie.

    in AS2 you can point directly from one to the other with the
    correct pathing.
    IE:
    _level0.TopSwfLoader.content.FunctionToCall();
    or
    _level0.TopSwfLoader.content.Property = NewPropertyValue;
    _level0 takes you to the main swf (_root, but this works
    around if lockroot is set)
    TopSwfLoader.content is the content of the Loader component
    that has your Top.swf loaded into it. If you are not using a Loader
    component, then you can change this to the instance name of the
    Movie Clip that has the swf loaded into it.
    FunctionToCall()/Property is what you want to control. Either
    a function call or a property.
    In AS3 this works a bit differently. I would dispatch a
    custom event from the Bottom swf. Then the main swf would catch
    that event, and call the appropriate function/property in the top
    swf. I can elaborate more on this if you need.

  • Error when opening swf from another swf

    Hi all,
    I'll try to explain this as good as possible.... I made a maze game that works perfectly when I run it by clicking on it's own .swf file, but when I try to access it from another .swf file which is a menu for the games I created, it does not work.
    I have absolutely no idea where to look for the error, so my question is: can it be that the main.swf (which is the menu for games) could be the problem, or the problem must be in the maze.swf?
    Thanx in advance!

    no, all code is in the first frame of actions layer:
    stop();
        var rightArrow:Boolean = false;   
        var leftArrow:Boolean = false;
        var upArrow:Boolean = false;
        var downArrow:Boolean = false;
        var speed:int = 5;
        stage.addEventListener(KeyboardEvent.KEY_DOWN, stage_onKeyDown);
        stage.addEventListener(KeyboardEvent.KEY_UP, stage_onKeyUp);
        stage.addEventListener(Event.ENTER_FRAME, stage_onEnterFrame);
        function stage_onKeyDown(event:KeyboardEvent):void {
            if(event.keyCode == Keyboard.RIGHT) rightArrow = true;
            if(event.keyCode == Keyboard.LEFT) leftArrow = true;
            if(event.keyCode == Keyboard.UP) upArrow = true;
            if(event.keyCode == Keyboard.DOWN) downArrow = true;
        function stage_onKeyUp(event:KeyboardEvent):void {
            if(event.keyCode == Keyboard.RIGHT) rightArrow = false;
            if(event.keyCode == Keyboard.LEFT) leftArrow = false;
            if(event.keyCode == Keyboard.UP) upArrow = false;
            if(event.keyCode == Keyboard.DOWN) downArrow = false;
        function stage_onEnterFrame(event:Event):void {
            var rect:Rectangle = player.getBounds(this);
            var i:int = 0;
            var xBump:int = 0;
            var yBump:int = 0;
            if(rightArrow) {
                xBump = speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(rect.right + i, player.y, true)) {
                        xBump = i - 1;
                        break;
            if(leftArrow) {
                xBump = -speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(rect.left - i, player.y, true)) {
                        xBump = -i + 1;
                        break;
            if(upArrow) {
                yBump = -speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(player.x, rect.top - i, true)) {
                        yBump = -i + 1;
                        break;
            if(downArrow) {
                yBump = speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(player.x, rect.bottom + i, true)) {
                        yBump = i - 1;
                        break;
            player.x += xBump;
            player.y += yBump;
            if(rightArrow) {
                xBump = speed;
                for(i = 0; i < speed; i++) {
                    if(cilj.hitTestPoint(rect.right + i, player.y, true)) {
                        xBump = i - 1;
                        nextScene();

  • How to obtain parent record from child record in relationship using API

    Hi,
    I have a record in the main table that is the child in a parent/child relationship to another main table record.  Using the Java API, how would I obtain the parent record in the relationship where I am starting with the child record?  In the API there seems to just be calls for getChildren, but not a getParent type call.
    Appreciate any immediate help that can be provided.
    Thanks,
    Eddie

    Hi Eddie,
    Please follow the below steps to retrieve only parents of a child Record.
    1. Create RetrieveRelationshipsCommand.
    2. Set the parameter RelationshipId.
    3. Set the parameter Anchor Record and Anchor Record Id. In this case the child record for which parents records to be retrieved.
    4. Set the parameter setGetChildren as false . This retrieves only the parent records for the specified child reocrd.
    5. Execute the RetrieveRelationshipsCommand.
    6. Retrieve member records from above step.
    Hope it helps
    Regards,
    Neeharika

  • Trigger swf from main swf

    Alright so i'm fairly new to AS3 and flash in gernal, have done a bit of work in flash but nothing this major and need some help. I have a longtail flash player setup to a rtmp server to stream live events using adobe flash encoder 3. In gerneral it works fine now the problem is content i have a second swf file within the same page that was a powerpoint presentation that is now converted to a swf.
    What i need to do is somehow send a command from the longtail video player to the slide show to trigger a slide push. So lets say we are live and streaming away i would need to send some sort of command that will tell the second swf to change slides so that everything is in sync.
    Currenty we are using Windows media enncoder and we just send out a command to a iframe within the encoder which changes the slide, the slides are JPG so its easy to do. In the testing stage we have a standalone slide controller that is linked to the iframe and we can push a slide from the contoller which push the slide on the iframe. This method works if i remove wmp and put in a flash place since it not going through a video stream, but i need it to go through the video stream and then tell either a swf to change a slide or an ifreame to change a slide.
    Reason it has to go through the video stream is so we can record the video and the commands so they can be setup as archive, so video and slide will cue at the right areas. Just like how you can send out commands from within windows media encoder and archive them and they auto trigger once he video plays.
    Well i just need a way that will sync video with slides i don't really care how its done just that its done. There has to be a way to record the slide push commands so they can be used again to play the video and so it advances the slides.
    PS this is related to my Job

    If you want to inject metadata into a life stream, you, perhaps, need to look into Flash Interactive Server. This forum is not a server forum tough. Managing FMS is a special skill/knowledge set. There is FMS forum.

  • GotoAndPlay specific frame in external swf from main swf

    I have a main swf that loads 2 external swfs.
    I click on button to see content of external swf #1 and see stuff. I do something that causes external swf to show other stuff (i.e. not at beginning state)
    In the main swf I click on button to see content of external swf #2. External swf #1 content is made invisible and I see content of external swf stuff.
    NOW, if I click on button to take me back to see external swf #1, I see it's content in current state. I want to force it to start over again at frame #1 which will reset content.
    However, no matter what I try, I can't seem to control which frame to go to in external swf using gotoAndplay.
    Here is code in frame #1 of main swf to load external swfs:
    //load academic movie
    var swfLoader1:Loader = new Loader();
    container1.addChild(swfLoader1);
    var url1:URLRequest = new URLRequest("academic.swf");
    swfLoader1.load(url1);
    //load wisdom movie
    var swfLoader3:Loader = new Loader();
    container3.addChild(swfLoader3);
    var url3:URLRequest = new URLRequest("wisdom.swf");
    swfLoader3.load(url3);
    Here is code in frame 2 of main swf that checks button to see where to go in external swf:
    //academic button clicked
    function academicClick(event:MouseEvent){
       container3.alpha = 0;
       container3.visible = false;
       container1.visible = true;
       container1.gotoAndPlay(1); //this is where I am trying to force it to start at frame 1
       container1.alpha = 1;
    I don't want to reload the external movie to force it to start over.
    Any help would be much appreciated.

    You can easily control this by making the external swf to load with your movieclip, The below is the code snippet that clear on accessing the specific frame on external swf.
    //Loading clips content
    var ldr:Loader;
    var mcExt:MovieClip;
    //Loading
    loadswf("external.swf");
    function loadswf(tmp:String):void{
        unloadSwf();
        ldr= new Loader();
        ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
        ldr.load(new URLRequest(tmp));
        function progressListener (e:ProgressEvent):void{
            ploader.visible=true;
        function swfLoaded(e:Event):void {
            mcExt = e.target.content as MovieClip;
            ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
            mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
            ploader.visible=false;
            addChild(mcExt);
    //UnLoading
    function unloadSwf():void{
        if (ldr!=null){
            ldr.unloadAndStop();
            removeChild(mcExt);
            mcExt=null;
    //Intervals (The part you work on the specific frame within the external swf
    function onEnterfn(e:Event):void{
        var num:int=mcExt.currentFrame;
        if (num==1) mcExt.play();
        if (num==9) {
                mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
                function skipfn(e:MouseEvent):void{
                    mcExt.stop();
                    mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                    gotoAndStop("help");
        if (num==mcExt.totalFrames){
            mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
            gotoAndStop("help");
    hope it solve

  • Manage client in parent domain from child domain

    My site has a root domain (mydomain.net) and a parent domain (ent.mydomain.net).
    My primary SCCM site is installed in ent.mydomain.net and is managing all my clients.
    I have 4 DC's installed in mydomain.net that I would like to manage from my child domain (ent.mydomain.net).
    It is my understanding that if the schema has been extended in the parent domain, and I manually install the client on the DC, it should be able to be managed from the child domain.  
    I have installed the client in the parent, but it cannot find the site in the child (I have not extended the schema yet).  i know that the client will not be able to find the site until the system management container has been created and populated
    (does not currently exist).  I know that I can create the container, but how would it get populated with the correct site information.  
    If anyone has any experience with this kind of configuration, the help would be appreciated.
    Thanks

     i know that the client will not be able to find the site until the system management container has been created and populated (does not currently exist).  I know that I can create the container, but how would it get populated with the
    correct site information.  
    You could enable AD publishing to that domain, but site assignment is also a matter of site assignment boundary groups. You can also assign a client to a site manually though.
    Torsten Meringer | http://www.mssccmfaq.de

  • Record or output SWF from dynamic SWF

    Hello everyone
    I have a SWF that pulls images from a database and dynamically creates a slideshow.  Each time the URL is loaded with different parameters, a new slideshow is shown.
    I was wondering if it is possible to record or output a SWF - for each dynamically generated slideshow?
    Meaning: The original slideshow is dynamically generated and at the same time, a copy of that slideshow is recorded and or an output of a second SWF is performed....
    Is that possible??
    Thank you for your time and attention

    1. You can't bind in the table name. You would have to use string concatenation for the table_name. But should still use binds for the variable.
    2. The syntax for execute immediate is not
    execute immediate 'select into ...'but
    execute immediate 'select ....' into variable.extending your example to include the table_name, you would end up with something like this:
    set serveroutput on;
    declare
    myvar varchar2(200);
    mytablename varchar2(30) := 'DUAL';
    secondvar number;
    begin
    EXECUTE IMMEDIATE 'select 1 from '|| mytablename ||' where rownum = 1' into secondvar;  --using 'using' if binding in the variable for a predicate
    dbms_output.put_line(secondvar);
    end;Edited by: dombrooks on Sep 23, 2009 4:17 PM

  • Controlling swfs from other swfs.

    hi there. the site i've designed has a background layer, a
    navigation panel layer(menu) and the content is loaded as separate
    swf files on levels behind the navigation panel. to allow for
    seamless unload of the content i want to control the transition
    from the navigation panel layer.
    eg. When the user clicks on "Story" button, the navi panel
    layer communicates with the content layer (eg. Welcome page), tells
    it to play from frames 50-60 and then unload. After this, the
    desired content layer (in this case "Story") is loaded into, say
    layer 5.
    how do i go about coding this in actionscript? i'm slightly
    bamboozled by the actual script for it and i'd really appreciate
    some direction.

    If you load your movieClips into levels, you simply use those
    levels to direct them, e.g. _level5.gotoAndPlay(50)
    You can't tell a movieClip to play from frame 50 to 60 and
    then stop. I mean you could, but judging from the question you ask
    I guess you don't want to get into so much complexity.
    You tell the clip to play, and the clip should know itself
    when to stop. If you want to be a bit more flexible, you can set a
    variable in the clip and check it at certain keyframes via
    actionscript:
    in the controlling clip:
    _level5.stopFrame = 60;
    _level5.gotoAndPlay(50);
    And in the controlled clip in possible stop frames:
    if(stopFrame == _currentframe) { stop(); }
    You could enable this for every frame via an onEnterFrame
    event handler.
    Of course you need to tell the controlling clip to continue
    in some way, e.g. by sending it to another frame....
    This of course is very linear and old style programming, not
    object oriented.
    It would be better not to load into levels, but into named
    movieClips at certain depths. This allows you to use the
    movieClipLoader class, and program all that event-driven.

Maybe you are looking for