Load internal SWF and control other SWF

I have 96 questions with radio button responses that control
movie clips. They are all in the same swf but I want to separate
the questions and put them in a draggable, scalable movie clip so
that the user could move the question box as convenient. Most of
the ActionScript is associated with the MCs, responding to a radio
button listener object. The two SWFs must advance from frame to
frame synchronously.
Here is what I did:
1. Split the original FLA into 2 pieces, a MC FLA and a
Question FLA
2. Renamed rbListener as _global variable in MC FLA
3. Used this code in the MC FLA:
this.createEmptyMovieClip("loadQuestions_mc",
this.getNextHighestDepth());
loadQuestions_mc._height = 400;
loadQuestions_mc._width = 600;
loadQuestions_mc.onPress = function():Void {
this.startDrag();
loadQuestions_mc.onRelease = function():Void {
this.stopDrag();
loadQuestions_mc.createEmptyMovieClip("containQuestions_mc",
this.getNextHighestDepth());
loadMovie("mccolor4_SplitBottom.swf", containQuestions_mc);
4. Used this code in the first frame of Questions FLA:
function specifyListeningTargets () {
i = cellNumber;
eval("QA" + i).addEventListener("click", rbListener);
eval("QB" + i).addEventListener("click", rbListener);
eval("QC" + i).addEventListener("click", rbListener);
// Button pops up at x:400, y:600, What is 10? Depth?;
clicking button advances to next frame.
function popupNav () {
i = cellNumber
if (((eval("QA" + i).selection.data) > 0),
((eval("QB" + i).selection.data) > 0),
((eval("QC" + i).selection.data) > 0)) {
this.createClassObject(mx.controls.Button, "popupNext_btn",
10, {label:"Go To Next Questions"});
popupNext_btn._width = 20;
popupNext_btn.move(250, 375);
function popupClicked() {
this.nextFrame();
_parent.nextFrame();
popupNext_btn.addEventListener("click", popupClicked);
5. Used this code in each frame of the Questions Fla:
stop();
cellNumber = 1;
popupNext_btn._visible = false;
popupNav ();
specifyListeningTargets();
Text

yes and yes: wait until loading is complete and then
reference the target movieclip or _level of your loadMovie(),
loadMovieNum() or loadClip() method.

Similar Messages

  • Load an SWF and control

    Hi,
    I want to know if you can load an SWF into another SWF and
    control it for example:
    load SWF b into SWF a and control SWF b from SWF a
    is this possible because I want to be able to trigger a
    particular mc or frame in SWF b but do it from SWF a?
    Cheers
    Scott
    Text
    Text

    yes and yes: wait until loading is complete and then
    reference the target movieclip or _level of your loadMovie(),
    loadMovieNum() or loadClip() method.

  • Fire fox loads some websites and not others. Clearing cache and history doesn't help.

    Fire fox loads some websites and not others. Pages that don't load in Firefox do load in other browsers. Clearing cache and history doesn't help.
    One of the websites that doesn't load is google.com! It loads some of the page, just some menu items at the top of the page. Then, it hangs and remains in the Loading state (with the spinning wheel and "Loading" in the tab) indefinitely.
    The problem started after 3.6.11 was installed. I'm on Mac OS 10.6.4.
    I would be happy if you just showed me where I can download 3.6.10. Also, is there anything special I have to do if installing an older version?

    I ended up going into the clear history settings and setting it to clear history when Firefox closes and chosing it to clear history and cooking and browsing history when Firefox closes. Now the links work fine and the last page I was looking at before I closed Firefox is no longer there when it opens again. Problem solved!

  • Difference between published Captivate 5.5 swf and Captivate 7 swf?

    I have a custom SCORM framework built in Flash that handles all of the calls to an LMS, and I simply insert published SWFs from Captivate; everything has been working great for a few years now.  The problem I am experiencing now is that content that I have published from Captivate 5.5 shows up just fine, but I upgraded to Captivate 7 and now the SWF files hang during loading, or simply show a black screen.   My client uses SumTotal LMS, so I first thought it might be an issue with the LMS, but this is the case in every single LMS I have tested in, so it is definitely some anomaly in the different versions of the published files.
    So I guess I am trying to figure out what is different between the two SWFs published in different versions?

    I don't think so that it is the soulotion for this problem , but you in publish setting/ start and end part (something like this, I don't remember the name completely ) /  you can turn off the preloader and fade in at start checkbox and turn on the autoplay.
    this can solve the problem temporary till adobe find better way for it .

  • Start up pause/hang before loading A-Dock and Control Strip

    Ok, I know, running a sooped up 7200 PowerMac is not worth the time or money, but...I've got this hang that's become more pronounced lately.
    Everything seems to load fine. After about 3-5 minutes A-Dock and Control Strip come one. Already tried disabling both, no luck. That's why I think the mouse is the problem. Logitech Wheel mouse works but not to full functionality (gonna try USB Overdrive); Mouseware 4.0.6 now installed but seems flaky (RH and wheel button work intermittantly, usually after replugging in the USB), and can't seem to locate the install CD which had an earlier version. May also try the serial mouse again too.
    Mouse also hangs in some browsers and seems to cause crashes.
    I've got a SCSI external drive (IDE 6) and terminated.
    I'll do more testing, but would appreciate any obvious fixes
    Thanks in advance

    Do you have the problem if you start up with Extensions Off?
    A problem on the SCSI bus can cause your problem. Disconnect all external devices except kbd, mouse & monitor and see if you have the same problem.
    Not sure it will help, but won't hurt to zap PRAM also.
    Cheers, Tom

  • Loading external swfs and controlling their actionscript

    I'm in need of some tutorials/examples for loading external
    swfs placed in empty movie clips using loadmovie into the main
    movie.
    I have actionscript and alot of interactive features within
    these loaded swf files and I'm having a heck of a time figuring out
    how to code and path the AS from them to work in the main timeline.
    I'm also open to using loadMovieNum and working with levels
    if it might be easier, however I'd like to keep this as simple as
    possible.
    PLEASE ANY HELP!!!????

    I am by no means an expert however it is my understanding
    that if you have a loaded swf within your main application and you
    wish to control features on the main timeline you need to use the
    _root function.
    Without knowing exactly what type of controlling you need
    it's hard to explain in great detail.

  • Loading internal video via strobe video swf loaded in htmlLoader in air

    I'm trying to load some local video (app:/content/video/filename.flv) via the strobe video player loaded in an htmlLoader container. It seems that the file path is never found, I've tried loading it from the local server and it works, but I need it to load local video really, and I can't seem to get it to load passing it an app:/ in the flash vars reference.
    i've added
    html.runtimeApplicationDomain = ApplicationDomain.currentDomain;
    but doesnt seem to do anything..
    I read it may be possible in an I frame can anyone advise?
    cheers
    bob

    Ok sorted it doing it in an iframe you can change the sandbox root and doc root to get the file from app:/
    <iframe src="the_embed.html" class="strobemediaplayback-video-player" sandboxRoot="http://localhost/air/" documentRoot="app:/"type="text/html" width="500" height="350">
            </iframe>
    then in the_embed
    <object width="470" height="320"> <param name="movie" value="StrobeMediaPlayback.swf"><param name="flashvars"value="src=video.f4v&poster=poster.png"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed "video/StrobeMediaPlayback.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true"width="470" height="320" flashvars="src=cideo.f4v&poster=poster.png&audioPan=1"></object>
    however the posters are not working from the sandboxed domain...seems odd?

  • Main SWF that calls other SWFs convert to .mov, .avi, or .wmv

    I have a SWF demo that calls multiple SWF files & 3 FLV files. I want to upload this to Facebook as one file - .mov, .avi, .wmv - whatever works.
    Does anyone know how I can do this?
    Thanks in advance.

    I don't know if facebook supports all those files as they are right now, because making them all one mov is very hard. You will have to import all of them in one flash file and place everything on the main timeline (to export as video file from flash) you need every animation placed on the main timeline. And that will be very hard to import all of them and then rebuilding all together so they work properly.
    One other solution would be to open your demo, use a video recording software as Camtasia (maybe you can find a free one) to record all of that content then mask the unwanted parts and exporting all as one video file.

  • Exporting to one .swf when including other swf animations

    Hi
    When exporting my project to flash, three files are created.
    I am not using any skins etc, I am just trying to incorporate two
    animations (one per slide) and finish with one overall .swf file.
    I have managed to do this in two other slides, though! Which
    is most frustrating!
    So just to reiterate:
    When I publish the file, the two animations I am using are
    exported again along with the rest of the publication. So I have
    the main swf, which calls in the other two .swf animations when
    required. I need to have just one file as a result.
    Please help!!

    Welcome to our community, t1mmie
    Are you referring to the supplied animations? (Arrows,
    Highlights, etc)
    If so, there are a few that refuse to embed. For those, you
    need to edit the source files in Flash and export from Flash as
    Flash 6 format. Once you get them in Flash 6 format, add them again
    and they should embed.
    You may download the source files for animations that don't
    have the source from the Captivate Exchange.
    Click here to
    visit the Captivate Exchange.
    Cheers... Rick

  • Video doesn't load properly or finish its loading on youtube and any other site even with flash plug ins

    everytime i try to watch a video on youtube or other movie site. the video doesn't finish its loading. it loads but just half.
    == This happened ==
    Every time Firefox opened
    == i updated my flash player

    Probably not related to your question, but your plugins list shows outdated plugin(s) with known security and stability risks.
    #Java Plug-in 1.6.0_06 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    See http://java.sun.com/javase/downloads/index.jsp#jdk (you need JRE)
    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • How do i open and control other programs using labview?

    I'm presently trying to use labview to try to open and operate another program,but having much difficulty.The external program i'm using is called the Foundation program.
    This Foundation program will use VHDL programming to create a virtual chip and then synthesising it.This program will then simulate the output of this VHDL program to verify that it is working as desired.Then the last stage is to download the whole VHDL program into a FPGA chip using a xilinx cable.
    All this need to be done using a labview program - to open the Foundation program and then extract the saved file and then to execute the download command to cause the VHDL program to be downloaded onto the FPGA chip.How do i go
    about doing all this?What is the first step i must do.Also all this have to be done thru networking..looks like its too difficult..I really need help.
    grays

    I haven't done VHDL so pardon my ignorance.
    LabVIEW can call external DLL via "Call Library Function" or C programs via "Code Interface Node", both located in "Advanced" function.
    If your program is a DOS program, use "System Exec.vi" found in "Communication" function. If you need to format your DOS command prior to sending it, use the "Format Into String" function in "String" function palette.
    Lastly, if you're trying to extract data, assuming it is text, use "File I/O" functions. If the data is binary, use "File I/O -> Binary File VIs".
    Hope that answers most of your questions.
    Shan Pin Koh

  • Loading External SWF and setting variables

    Hello Everyone.
    I'm sure you are all a where of the FlashVars attribute for
    Flash embeds which holds variables for SWF's when they are
    rendered. I'm attempting to load an External SWF dynamically
    from within my own SWF and need to provide it with the values
    normally stored in the FlashVars. For the example below I
    wait until the External SWF is completely loaded using the
    onLoadInit event from moviecliploader and then i attempt to
    set the required variables that the loaded SWF needs. This works
    great in test and debug mode (ie. Test Movie and Debug Movie
    from the Control menu), but when i publish my FLA to SWF and run
    the SWF the variables will NOT get set in the loaded External SWF.
    From my readings ive people have mentioned that the player is only
    able to access Methods of an External SWF. If this is the case then
    how do they expect people to set the FlashVars of dynamically
    loaded SWFs? I investigated the loadVariables procedure as well and
    had the same results in test mode and was wasn't reliable because
    of timing issues.
    The sample source is below... if anyone has any ideas or has
    come across this issue before, I would really appreciate some
    insight.
    Thank you in advance for your time.
    var loader_mc:MovieClipLoader = new MovieClipLoader();
    var mclListener:Object = new Object();
    loader_mc.addListener(mclListener);
    mclListener.onLoadProgress = function(target_mc:MovieClip,
    numBytesLoaded:Number, numBytesTotal:Number) {
    // DO NOTHING
    mclListener.onLoadComplete = function(target_mc:MovieClip) {
    // DO NOTHING
    mclListener.onLoadInit = function(target_mc:MovieClip) {
    // WORKS IN TEST MODE NOT IN PUBLISH/SWF MODE
    target_mc._root.param1 = "value1";
    // WORKS IN TEST MODE NOT IN PUBLISH/SWF MODE
    _level0.container_mc.param1 = "value1";
    this.createEmptyMovieClip("container_mc",
    this.getNextHighestDepth());
    container_mc._lockroot = true;
    loader_mc.loadClip("somecoolflash.swf", container_mc);

    I've tried that as well and it behaves the same as onLoadInit
    ... Works when i test but doesnt when i publish to a swf. I think
    this is security related and the flash player just cant write to a
    loaded swf and set variables.

  • Use loadSWF load my stage3D game swf and show In AIR , This swf may crash when running

    Problem Description:
    use loadSWF load my stage3D game swf and show , This swf may crash when running
    Steps to Reproduce:
    run my Upload Project . Fill in the login box, any account and password . Because of network problems, you may need to wait a long time to show up login box
    Actual Result:
    this swf crash when running
    Expected Result:
    this swf do not crash when running
    Any Workarounds: 
    Test Configuration
    My Hardware and Environment details:
    1.this url's swf load files in worker
    2.this url's swf use SDK is Flex 4.6.0(bulid23201)
    3.this url's swf is Flex Project
    Upload Project Url:
    http://fight.fuhuodao.com/fight/testUrl/!FightAirShell.zip

    The loading of SWFs from AIR has a different Security model than that of the WebPlayer.  There is a workaround to loading plugins in AIR: If you use a static plugin this should work for you.  To do this: Link in the plugin at compile time, and pass the PluginInfoResource to the loadPlugin() method.

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • Simple swf movie control

    I am still getting used to scripting from within Flex. I have
    a very simple flash movie that indicates a value from 0 to 100% -
    one frame for each percent. I want to embed that movie into a Flex
    application and control the swf's position in the timeline from
    within the Flex application.
    I know that I cannot just use:
    "SWF.gotoAndStop(currentFrame)" or
    "MovieClip(SWF.content).gotoAndStop(currentFrame)" ...
    but I would like to find a simple solution - if one exists. I
    do not want to create 101 separate swf files and change the source
    every time I need to change the frame.

    You can communicate with a loaded SWF through the
    SWFLoader.content property. This gives you access to any public
    members of the swf.
    If you implement a public method, like setPos(iPercent:int),
    you should be able to call that method thropugh the content
    property.
    Note that there are timing issues wotking with content in a
    loaded SWF. SWFLoader has to be complete, and you need to listen
    for the Application.complete event before interacting with the swf.
    If you have difficulty with this, I have an example on
    www.cflex.net. Search for swfloader.
    Tracy

Maybe you are looking for

  • Adding Item managed by serial no.s to Delivery Document

    Hello Experts, Can you please help me in the following? I'll appreciate your help. I want to add items managed by Serial Number to delivery document (using DI API). We have a set of internal serial numbers to be used for those items. For E.g, we have

  • Creating a new ticket

    Hi SAP GURUS!!! I Have a requirement , I wanna create a new duplicate ticket for an existing ticket in the same system.And the details in the original ticket should reflect in duplicate ticket. I got the details of ORDERADM_H TABLE AND ACTIVITY_H tab

  • Low quality graphics from screenshots

    I did some full screen screen shots to use in Keynote (using apple + shift 3). These are pict files which look perfectly fine when I open them in preview. I then dragged and dropped them into Keynote, and both in preview mode and when I play the show

  • FDM and Hyperion Planning Mapping options

    Hi, Good Day My team has an implementation of FDM and Hyperion Planning ver 11.1.2. We are basically using FMD because we need a place to maintain (user friendly) different mapping tables for the accounts dimensions, to be able to load data. My quest

  • Validate Multiselect List Against LOV

    I am trying to validate what a user has selected from a multiselect list. I want to make sure the user selections are within the values of a particular LOV. I have been trying to come up with a good way to do this, but I am stumped. Does anyone have