Main external control through swf SWF...

OK, it's a difficult question for me...

Ive understood timeline transitions and timeline based preloaders... so now I have a problem...

I have my swf file in HAND I load all my pages externally (swf files) external...

When I click on a button (for example) my button "about us" - the transition begins...

I have a keyframe with the following code on the frame 40 (inside a clip named 'pages' in my main SWF where are all the buttons/transitions):

var Xpos:Number = 0;

var Ypos:Number = 0;

var swf:MovieClip;

var bgloader:Loader = new Loader();

var bgURL

{if(page==1)}

bgURL = new URLRequest("pages/home.swf");

}

{if(page==2)}

bgURL = new URLRequest("pages/about.swf");

}

{if(page==3)}

bgURL = new URLRequest("pages/updates.swf");

}

{if(page==4)}

bgURL = new URLRequest("pages/contact.swf");

}

bgloader. Load (bgURL);

bgloader.x = XPos;

bgloader.y = YPos;

bg.addChild (bgloader);

Stop();

now, as you can see, at the end he stops... and that's because my external swf files have timeline preload in them...

now on 41 of my main swf frame, I created a label called 'start', I need to focus my external pages...

////////////////////////////////////////////

all my external swf I have this code on the frame 2 (and this is where I'm having the problem):

{if(framesLoaded==80)}

MovieClip (parent) .gotoAndPlay ("start");

}

of other if(framesLoaded<80) {}

gotoAndPlay (1);

}

now, where I have a MovieClip (parent) .gotoAndPlay ("start"); -I'm trying to target my SWFs MAIN timeline (which is within a clip on the main timeline, called 'pages').

However, it does not work... I can't get my external swf to communicate correctly for some reason any...

How to encode my external swf files to find out that, once loaded behind 80 on them, he needs to run my MAIN gotoAndPlay ("start") swf file?

im hoping someone can help here...

You won't have everything what you try to accomplish if you expect just the swf file to load before you order the main timeline to move along.  If you assign a listener to the loader, you can determine when the file is loaded and ready to run without having the file itself understand this and tell you about it.  Just add an INIT listener for your charger...

bgloader.contentLoaderInfo.addEventListener (Event.INIT, eventHandler);

This line of code will be your main timeline expected to call this function of eventHandler until the content of the loader (your swf) indicates that it is loaded and ready for action.

So, everything that you could possibly need is (which means no code is necessary in your loaded swf)...

Stop();

var Xpos:Number = 0;

var Ypos:Number = 0;

var swf:MovieClip;

var bgloader:Loader = new Loader();

var bgURL;

{if(page==1)}

bgURL = new URLRequest("pages/home.swf");

}

{if(page==2)}

bgURL = new URLRequest("pages/about.swf");

}

{if(page==3)}

bgURL = new URLRequest("pages/updates.swf");

}

{if(page==4)}

bgURL = new URLRequest("pages/contact.swf");

}

bgloader.contentLoaderInfo.addEventListener (Event.INIT, initHandler);

bgloader. Load (bgURL);

bgloader.x = XPos;

bgloader.y = YPos;

bg.addChild (bgloader);

function initHandler(event:Event):void {}

gotoAndPlay (41);

}

Taking a step toward what you tried, just so that the intentions of this solution are not wasted... the missing link in your attempt failed add a listener for the completion of the load that would have called the function loaderCompleteHandler...

bgloader.contentLoaderInfo.addEventListener (Event.COMPLETE, loaderCompleteHandler);

Tags: Adobe Animate

Similar Questions

  • external control with SWF MC?

    Hi all

    OK, let's say I have two SWF files.

    In 'SWF 1,' I have a clip.

    The music video for 'SWF 1' load externally "2" SWF file.

    Is it possible for me to have something (like a button) inside of the "SWF external 2" with the ability to control something (like a music video) in "SWF 1?

    If yes what would like the path to that mc look?

    Thank you

    If both are as2 SWF files, you can reference the movieclip target load in swf1 (loading swf) on the main timeline of swf2 (the loaded swf file) to:

    This.

    so, if this target load lies on the main timeline of swf1, you can reference the main scenario for swf1 using:

    This ._parent.

    and if there is a movieclip on the main timeline of swf1 mc, you can reference it using the:

    This._parent. MC1.

    etc.

  • Control loaded swf on the main timeline

    Hello

    I'm working on loading external swf files for ios. I am able to load swf files and assembled visible or invisible in different settings. I have trouble controlling the swf files loaded on the main timeline. Specifically, I would like to have a button on the main timeline, that when you click on will move a swf loaded to frame 1.

    Here is a code that loads a swf file:

    var myLoader1:Loader;

    var loaderContext1:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    if(myLoader1 == null)

    {

    myLoader1 = new Loader();

    addChild (myLoader1);

    }

    myLoader1.load (new URLRequest("folder/file1.swf"), loaderContext1);

    myLoader1.visible = true;

    backbutton.addEventListener (MouseEvent.MOUSE_DOWN, backbutton1);

    function backbutton1(myEvent:MouseEvent):void {? myLoader1.gotoAndStop (1) ;}}  (this line does not work)

    (Once I load file1.swf, in the file1.swf I click a next button to move on to different periods.) My question is: hHow do I code the "backbutton" on the main timeline so that it causes the file1.swf to go to frame 1?)

    Thank you for your help.

    After loading is complete (and assuming that you load an as3 swf), you can use:

    MovieClip (myLoader1.content) .gotoAndStop (1);

  • Access the main object of a SWF file in memory

    Hey.

    I'm trying to access the main object of a SWF file in memory. Consider the following code:

    package test {}
    import flash.display.Sprite;
    import flash.utils.ByteArray;

    SerializableAttribute public class Main extends Sprite {}
    public void Main (): void {}
    var b:ByteArray = new ByteArray();
    b.writeObject (this); This main object is what I'm trying to access
    }
    }
    }

    However, when I do a trace (b.length), the value I get does not match the length of the actual SWF file, then perhaps that there is another way.

    I am trying to achieve the same type of content that you would get if you load an external SWF using loadBytes, unless I want to access the principal object of SWF (running in memory) in this way.

    I have this even possible?

    Thank you.

    Hey.

    Well, I never knew a solution to it (if it is still possible to what I asked). However, I believe that I've implemented a workaround solution that should be enough for my needs. Perhaps it may help someone else too:

    Although I can not (seem to) get the SWF running access itself to memory, I can load another copy of itself. When I tested the copy loaded (in memory) and compared with the content of the file on the disk, using a hex editor, content match!

    This allows me to do things like control totals and which do not. An implementation is to use this technique to guard against the 'cache-hacking' of sovereign wealth funds.

  • Control a SWF from Flex file?

    I have a flex application with a stack of view which has some of his children SWFLoaders.

    For example, "page 2" the view stack is an interactive SWF of flash cs3. It loads and works perfectly, but how to stop and reset it to Flex, as when the user changes discovered battery views?

    Fortunately, the SWF file is playing, but the user goes back to 'page 1' from VS, the SWF on the page 2 always plays its audio.

    How can I control the SWF file?

    I found an old post which enabled, with a simple change. In the interest of helping others who find this thread, here's what worked for me:

    In my element 'page 2 ':

    Import mx.controls.SWFLoader;

    private var movie_clip:MovieClip;
    private var myLoader:SWFLoader = new SWFLoader();

    private function init (): void {}
    myLoader.addEventListener (Event.INIT, loadHandler);
    myLoader.load ("equipment.swf");
    this.addChildAt(myLoader,0);
    }

    private void loadHandler(e:Event):void {}
    movie_clip = e.target.content;
    }

    public function pp (): void {}
    movie_clip.remotePause ();
    }

    ]]>

    And then, in the main application:





  • AAA authentication for external router through PIX 515

    I have been in vain, to get the authentication AAA works to my external router, through the PIX.

    When I connect the router directly within that network (bypassing the PIX) AAA works fine, so I know the configuration of the AAA works between the router and the ACS server.

    Initially, I got the PIX configured with a static map between a global external address 192.x.x.12 and a 10.200.1.187 for the ACS server local address, but that didn't work either. So, currently I am using NAT exemption for the ACS server, but it does not work either.

    If I activate the debug on the PIX package, I see the ACS authentication request and response between the router and GBA when I try to connect to the router, but it is not successful. After the three way TCP handshake, the router repeats it is last receipt, and then the ACS asked an RST.

    The attached diagram shows the simple connection that I'm trying to create.

    The configuration of the PIX is also attached. (too large messages size):

    Thanks in advance for your help. I tried EAC for two days and have not found solutions that look like this.

    Ron Buchalski

    What to do is:

    1 PIX:

    -static map the ACS/GANYMEDE to a public IP address

    static (inside, outside) x.x.x.10 10.1.1.25 netmask 255.255.255.255

    -otherwise, if you have enough public IP, use the port forwarding for card IP ACS to PIX outside IP of the interface, IE x.x.x.2, via a specific TCP 49:

    public static tcp (indoor, outdoor) interface 49 10.1.1.25 49 netmask 255.255.255.255

    * allow ACS talk to external router via public IP

    Create/add entry for ACL applied to the outside interface to allow the GANYMEDE Protocol + switch router external to the ACS:

    access outside permit tcp host XXX1 host x.x.x.10 eq 49 list (Ganymede + use tcp 49)

    outside access-group in external interface

    * x.x.x.1 = outside the router

    2 ACS

    -Add the outside router IP (FastEthernet face PIX outside interface) interface as a client of the AAA

    -Making of course secret key is identical at ACS and router

    3. the outside router

    -Add the ACS as radius-server using its IP public, as mapped in PIX which is x.x.x.10.

    -check the key AAA statement is accurate.

    The test without saving the config is outside the router. Save ok once confirmed.

    I have similar facility before, and it worked very well.

    Pls note all useful message (s)

    AK

  • The main module controls develop disappeared from the window to develop.  How can I get back them?

    The main module controls develop disappeared from the window to develop.  How can I get back them?  I work with Lightroom 5.3.  The missing controls are the sliders for exposure, clarity, contrast, etc.  I must have inadvertently clicked on something that made them disappear, but nothing I tried back them.  I've never had this experience over the years that I've been using Lightroom (since version 1.1).

    Right-click on any other element curve tone e.g., and tick on 'Basic' if that is what you are missing.

    If you miss the right click the full module to develop any other point Library for ex and put a check mark on develop

  • ActionScript 3.0 Scrollpane external linkage. SWF

    I'm working on a site in flash with actionscript 3.0. I use a scrolling pane to display an external swf file that has buttons that move forward and back through the SWF. My problem is that when the naviagtion buttons you click on the Exchange page but is at the bottom of the pane scrolling. I want the verticalPostion = 0 then it starts at the top of the next page, but don't know how to do this. can someone help me?

    This is the code for my scrollpane

    ////////
    Import fl.events.ScrollEvent;

    aSp.setSize (600, 350);

    function scrollListener(event:ScrollEvent):void {}
    trace ("horizontalScPosition:" + aSp.horizontalScrollPosition +)
    ", verticalScrollPosition ="+ aSp.verticalScrollPosition); "
    };
    aSp.addEventListener (ScrollEvent.SCROLL, scrollListener);

    function completeListener(event:Event):void {}
    trace (event.target.source + "has completed loading.");
    };
    Add the listener.
    aSp.addEventListener (Event.COMPLETE, completeListener);

    aSp.source = "menu7.swf";

    /////////

    This is the code for the buttons used in the swf file, that I insert into the scrollpane.

    /////////

    Stop();

    function gonext(e:MouseEvent):void {}
    gotoAndStop ("menu2");
    }
    next.addEventListener (MouseEvent.CLICK, gomenu2);

    ///

    function gonext2(e:MouseEvent):void {}
    gotoAndStop ("menu3");
    }
    Next2.addEventListener (MouseEvent.CLICK, gomenu3);

    function goback1(e:MouseEvent):void {}
    gotoAndStop ("menu1");
    }
    back1.addEventListener (MouseEvent.CLICK, gomenu1);

    ///

    is it possible to set the vertical position '0' when a buttons are pressed.

    This line:

    aSp.addEventListener ("main swf", scrollResetListener);

    must be:

    aSp.addEventListener ("iwannaresetscrolling", scrollResetListener);

    Also, note that the "iwannaresetscrolling" string can be anything you choose, as long as the sender and the receiver use the same value.

    If you see [event type = "iwannaresetscrolling" bubbles = true cancelable = false eventPhase = 2] in the output window, you should be following the event somewhere-, but it would be a correct output

  • incorporation of external resources in SWF

    Here what I attach to. I have a SWF files exported from Indesign CS5 with animation and some videos/sounds. There is no options in InDesign to automatically integrate theses resources when creating the SFW. So when I import the SWF file in the catalyst and play as SWF or AIR all the video is missing and the sound also. I read a FAQ ( http://bit.ly/a7Sk8H ) in the forum, but the solutions is outdated (was written for the beta version in 2009) and does not work.

    So, how can we make CF to recognize external resources and be able to read when exporting in format SWF or AIR?

    Thank you

    Jean-Claude

    Hi Jean-Claude.

    You must copy the assets for your SWF file in your project of catalyst published like that...

    .. then they are next to "Main.swf" (instead of being beside "movie.swf", which is what you would expect).

    Best regards

    Ian

  • Control a swf AS3 Captivate in Flex - quiz set preferences

    Hi all

    I am able to use the SWFLoader for loading a Captivate.swf, and play using the nextSlide, previousSlide etc..  However I am stuck by the quiz.

    I have access to all the symbols rd * and cp *.   I would like to navigate through all the slides, but if I have a quiz, I'm stuck in 'rdcmndGotoSlide' 'rdcmndNextSlide' or parameter passed the quiz.  Does anyone know if this is possible?  Help, please!

    In fact, in AS3 you cannot overload a function if the class was sealed. The AS3 performance gain was realized by using the object related to store variables. Unfortunately, the subject of character is not accessible, so we cannot dynamically overload functions more.

    However, if the class is dynamic and the feature has been added dynamically to the performance, you can overload the it.

    To make it simpler:

    • If the class is sealed: you can't do it.
    • If the method is encoded in an external class: you can not do.
    • If the class contains the dynamic keyword and that the function has been added to the run time: you can!

    I hope that's not too complicated and it helps!

    Yves

    PS most of this knowledge came to try to overload the functions used in the classes of Captivate ;-)

  • 3rd external loading part .swf?

    Hello

    I want to create a loader .swf for some 3rd party swf applications which I have no control over the code. Basically, it would be a charger that can control the parameters of volume and full screen. As the HTML and Javascript can not control it. Ive been using the functions of the loader in AS3 with some success. I am able to load some .swf, but others do not load (perhaps due to problems in 3rd party applications). I don't know if this is even possible (perhaps too ambitious ). Ive read that Flex has more control over this, but I'm not sure. Hope someone can guide me in the right direction.

    Thank you

    Dcrui3

    If you have no control of what is in the files, there are maybe not you can do.  There may be several reasons why a file loaded doesn't load/play as expected.  The file may rely on other files being loaded which are absent in your scenario, for example data, video, or other visual files.  The file may be an AS1/AS2 file, which has references to _root, that may not work correctly in a loaded file.

  • External loading. SWF in Flash

    OK, so I asked this question earlier:

    http://forums.Adobe.com/message/5135410#5135410

    I does not go into details. My first question is: did you Ishkur somehow a transparent background for its external .swfs, or he made a regular and used some sort of code or setting to do so it appears down right? And my second question is, where should I apply this code / where does go? He get couple with buttons which translate the flash to load the external .swfs? I sincerely apologize for my nonstop customer support. _.

    myMovieClipInstance.loadMovie ("myExternalMovie.swf");  Here, only the file name is given, indicating that the SWF file is in the same folder as the parent swf file

    You don't have to do anything to get a transparent background.  When you load a swf into another swf, the loaded file has no bottom, does only the primary file.

    You place the code based on what you intend to start loading.  If it is a button that will trigger loading, then you place the code in the button code.  If it happens when you enter a specific frame, then you put the code in this framework.

  • Parent timeline control child swf

    Hello

    I need help and tried trolling the forums and web site for hours, without result, where my post here.

    Here's my situation:

    I have a captivate file that is essentially like a skin, containing headings, buttons and explanatory text, which is the parent swf file.

    I then save a software simulation in another captivate file which is the child swf file. I then publish this as a swf file. This swf is then imported into the original file from captivate with text instructions for software simulation.

    Is it possible that when a button is pressed inside the software simulation, that the text of statement in the parent file may change? Ideally by scrolling the text upwards, or by an order of hide/show, where display instructions will be linked to the next step and automatically indicates the next step they press a button in the child swf file.

    I hope that makes sense. If that sounds confusing, I will try to explain the parts that don't make sense.

    I hope that someone out there will have an answer for me, because I'm having no luck try for me right now.

    Thank you all

    See you soon

    Scott.

    Hello

    Totally agree with rod on inclusion not the SWF file created by CP in a CP - file.If you want to have the sims in your CP file to a smaller size, it is also possible in this way:

    • create each sim to a different file at the resolution they have desired
    • resize the file to the final resolution of the main file; You can use a master slide, possibly with additional information like logo... maybe my blog post about slide masters Knockout can be useful: create and use a master Knockout slide
    • Copy / paste the sim back in the main file

    Lilybiri

  • access the property of the main class in loaded swf.

    Hello

    I have a main.fla, its document class is main.as. the code in main.as is

    package

    {

    import flash.display.MovieClip;

    SerializableAttribute public class Main extends MovieClip

    {

    private var loading: loading;

    public var trovami:Number = 10;

    public void Main()

    {

    stage.frameRate = 31;

    loadSWF();

    }

    private function loadSWF (): void

    {

    loading = new Loading (this);

    }

    }

    }

    LOADIND. ACE is another class where I load another swf name is my_swf.

    class loading code is:

    package

    {

    import flash.display.MovieClip;

    to import flash.display.SimpleButton;

    import flash.text.TextField;

    import flash.display.Loader;

    import flash.events. *;

    import flash.net.URLRequest;

    SerializableAttribute public class loading extends MovieClip

    {

    private var _fla:MovieClip;

    private var url: String;

    public var val: String;

    private var loader: Loader;

    public void Loading(fla:MovieClip)

    {

    _fla = fla.

    init();

    }

    private function init (): void

    {

    URL = 'my_swf.swf';

    var request: URLRequest = new URLRequest (url);

    loader = new Loader();

    initListeners (loader.contentLoaderInfo);

    Loader.Load (request);

    }

    private void initListeners(dispatcher:IEventDispatcher):void

    {

    dispatcher.addEventListener (Event.COMPLETE, complete);

    }

    private void completato(event:Event):void

    {

    _fla. AddChild (Loader);

    Loader.y = 10;

    Val = "Hello".

    }

    }

    }

    and the class of the loaded swf document is Main2. in my_swf.fla, there is a text, that his name is:

    a_txt.

    I so use class in Main2 for loading text property.

    Code of Main.as is

    package

    {

    import flash.display.MovieClip;

    import flash.text. *;

    Main2/public class extends MovieClip

    {

    public void Main2()

    {

    a_txt.text = val;

    }

    }

    }

    where val is the property of class loading.

    so, how do I access.

    You have a reference to your movie loaded into your class loader - instead of simply set val to string - add a method in your class Main2 - and call it loading - passing the string which him. Push not pull...

    Hand 2 becomes:

    public void Main2() {}
    a_txt. Text = Val;

    }

    public void setText(val:String):void {}
    a_txt. Text = val;

    }

    And then in your class loader - when you have finished loading only call setText:

    private void completato(e:Event):void

    {
    addChild (loader);
    Loader.y = 10;
    MovieClip (loader.content) .setText ("hello");
    Val = "Hello";
    }

  • Place the rollover image button on the external top of swf

    I have a menu when you click on a button, an external swf is called. However, I would like for the buttons and more and the low State to show an image on the top of the external swf with a description of what the video is of about (essentially when they overthrow the button).

    The problem is that the image shows behind the external swf. I can't see on the top of the external swf. I tried to put the layer of buttons on the top of the layer of actions, but it does not work.

    I have not used Flash for a long time, but I need to know if there is ActionScipt who can solve my problem or any other way to solve this problem. Help, please. Thank you.

    delete:

     loader.name = event.target.name;
    

Maybe you are looking for