Move the playhead to the parent SWF

Hi all,

I have a sticky wicket... for reasons too complex to get in, I am obliged to enter a quiz of CP in a Flash application (using the class loader).

The problem... when the user completes the quiz and (SUCCESS or FAILURE) I need the parent Flash animation timeline to advance to the next (frame or image designated tag)... basically, if the user passes the quiz, they can continue to see the rest of the material demand... but if they fail, they need to take another quiz who is in charge in another frame... in both cases, the parent Flash timeline MUST change position of playing with your head...

Thanks in advance

DID IT!

King of widget, thanks for your post, but I think that I thought about it.

I created a button in flash, inserted the AS3 below, insert the Flash as an animation in first Grade... and when I loaded CP into Flash project and clicked the button... He went to the image tag specified button.

This is the code I used:

BUTTON_INSTANCE_NAME.addEventListener (MouseEvent.CLICK, FUNCTION_NAME);

function FUNCTION_NAME(event:MouseEvent):void {}
MovieClip (parent.root.parent.root) .gotoAndStop ("FRAME_NUM_or_FRAME_LABEL");
}

The key has been the path to the Flash timeline... Thanks for putting me on the right track...

Tags: Adobe Captivate

Similar Questions

  • How we prevent external swf click do not affect the parent swf

    I use the loadMovie command to load an external swf (a short course of education) in the parent swf file. The parent swf file is an interactive exercise with several buttons to answer. The user can click a button to open and close the turorial on top of the exercise.

    If the user clicks at random on the tutorial, they can accidentally click the answer buttons in the swf below parent and hear signals correct and incorrect. When they close the tutorial, they see that the answers have been given and it has a score when they have not intentionally give all the answers.

    How to prevent clicks on the external register on the parent SWF swf? Thanks in advance for any help on this matter.

    Add a rectangle step in the lowest layer of your external swf and make sure that the size of the stage of the loaded swf file and load is the same.  convert this shape to a movieclip and assign an instance name (for example, bg_mc).  in Control Panel, you can use:

    bg_mc._alpha = 0;

    {bg_mc.onRelease = Function ()}

    }

    bg_mc.useHandCursor = false;

  • AS3 pass variable values of external swf loaded in the parent swf format

    Hello

    I'm working on an e-Learning project that uses a main SWF (SWF1) and a second SWF (SWF2) with 2 quizzes in it. Published in the ATMOSPHERE for Desktop and Android, SWF1 and SWF2 are packed together in the Office of AIR or AIR APK exports.

    I use a charger in SWF1 to compose and execute SWF2. What I am having difficulties with, need help, is how to get 2 2 SWF2 quiz scores and load these values (each is a number) return SWF1. Once back in SWF1, they will be written to a string and then displayed in a text box using textbox.text.

    While I searched online and found examples to send variables from parent to child of the SWF file, so far not able to find an example of script understandable/useable AS3 to get variables from child to parent SWF.

    Any help appreciated.

    Best wishes

    The best way to communicate between parent and child SWFs is through events. Send an event to the child with the data to send and intercept the event to the parent level. This flow is common and very easy to handle

  • need help on a function on the parent swf call! Help, please!

    Hi, new to actionScript and trying to complete my final project and I'm banging my head on a brick wall now, my question may be easy for some pros, so please help!

    Basically, I loaded an external swf with a button to main.swf

    function loadSWF (e:MouseEvent): void {}

    var url: String;
    var buttonPressed:Sprite = e.currentTarget as Sprite;

    If (buttonPressed == button1) {}
    URL = "." "/ content1.swf".

    }

    }

    It works very well.

    Then, I am trying to disable the function of button while the swf file is loaded.  I add an another eventListener to the same button.

    function disableMenu (e:MouseEvent): void {}
    Button1.mouseEnabled = false;

    }

    This also works.  OK now comes the problem.  I have a close button on my child swf("content1.swf) to close itself and returen to main swf.

    but I would like the button on the main.swf to work again.  so the close button I add another eventListener hope to activate the menu.

    (NB: this is on the child swf!)

    function enableMenu (e:MouseEvent): void {}

    root. Button1.mouseEnabled = true;

    }

    I thought the root will bring back me to the main swf, but apparently it does not.  Now I get the error msg button 1 is undefined.

    No idea how to solve this?  Or I am not supposedd to do it this way at all?  Sorry I'm a newb to AS always...

    Any help will be appreciated! Thanks in advance!

    Rather reaching the chronology in the foreground, I think that a simpler approach would be to send a custom event of the loaded swf file.

    In the child swf file:

    function enableMenu (e:MouseEvent): void {}

    dispatchEvent (new Event ("requestEnableMenu", true));

    }

    In the swf file parent:

    addEventListener ("requestEnableMenu", enableMenu)

    function enableMenu (e: Event): void {}

    Button1.mouseEnabled = true;

    }

  • Insert FLV, let him create drive, can't move the skin SWF haults

    I use Dreamweaver CS4 on mac... I insert an FLV file through the file menu guests... Let him build the skins, he needs, which by default in the directory root... my FLV file is in a "Vidéos" folder... It is also to create a folder "Scripts"... All this plays very well...

    In the dreamweaver files Viewer, I spend Clear_Skin_1.swf andFLVPlayer_Progress.swf... Dreamweaver warns me I have I need to update my ways... I do it with the following code... and now the file does not work...

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="350" height="234" id="FLVPlayer">
                <param name="movie" value="Videos/FLVPlayer_Progressive.swf" />
                <param name="quality" value="high">
                <param name="wmode" value="opaque">
                <param name="scale" value="noscale">
                <param name="salign" value="lt">
                <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Videos/Clear_Skin_1&streamName=Videos/CDWS_videomanual&autoPlay=true&autoRewind=false" />
                <param name="swfversion" value="8,0,0,0">
                <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
                <param name="expressinstall" value="Scripts/expressInstall.swf">
                <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="Videos/FLVPlayer_Progressive.swf" width="350" height="234">
                  <!--<![endif]-->
                  <param name="quality" value="high">
                  <param name="wmode" value="opaque">
                  <param name="scale" value="noscale">
                  <param name="salign" value="lt">
                  <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Videos/Clear_Skin_1&streamName=Videos/CDWS_videomanual&autoPlay=true&autoRewind=false" />
                  <param name="swfversion" value="8,0,0,0">
                  <param name="expressinstall" value="Scripts/expressInstall.swf">
                  <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                  <div>
                    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
                  </div>
                  <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
              </object>
    

    Now when I return to the root files, let dreamweaver re - write the code... it works... why I can't organize these skins SWF/players?

    (Said me), is due to the streaming video option (you need that a streaming server to use this taking), which connects a permanent page, so that the flash insert places the progressive option it so ease of coding and may make the location of standard file I guess.

    PZ

  • How to click on the button in the SWF exported to go to frame parent SWF?

    I looked online, but couldn't find anything useful.   I got these codes on the web, but they do not work... (I'm pretty new to Flash).

    -----------------------------------------------

    projectgallery.swf - PARENT SWF

    projectgallery_cutLimestone.swf - EXPORT SWF

    returnToAlbums_btn_inst - instance of a button on the export swf I want to be able to click to go to a different image in the parent SWF

    ___________________________

    Here are my codes:

    ------------------------------------------------

    the parent SWF:

    import flash.display.MovieClip;

    import flash.events.MouseEvent;

    var myLoader:Loader = new Loader();

    var url: URLRequest = new URLRequest ("projectgallery_cutlimestone.swf");

    myLoader.load (url);

    loadHandler function (event: Event) {}

    var projectgallery_cutlimestone:MovieClip = event.target.content;

    addChild (myLoader);

    trace (projectgallery_cutlimestone);

    function returnToAlbums (event: MouseEvent): void {}

    projectgallery_cutlimestone.returnToAlbums_btn_inst. Play();

    }

    projectgallery_cutlimestone.addEventListener (MouseEvent.CLICK, returnToAlbums);

    }

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, loadHandler);

    ---------------------------------------------

    When I try, the SWF file loads fine, but when loading, this OUTPUT error is displayed:

    [focus]

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    hand / frame2)

    at flash.display::MovieClip/gotoAndStop()

    hand / preload1)

    --------------------------------------------------

    then, when I try to click on the returnToAlbums_btn_inst button, the OUTPUT error is displayed:

    ReferenceError: Error #1069: property is not found on flash.display.SimpleButton and there is no default value.

    function / < anonymous >)

    -------------------------------------------------

    I'm really new to Flash, so I don't know why it doesn't work.  The proceeding is labeled (I checked).

    OK, fixed.

    The main problem was by naming your classes of documents. In both files, the Document class has been the main. Flash Player implements cache all definitions of class so they can be reused and shared across loaded SWF files. This is really useful if you're aware of it. Otherwise, it may cause a headache. The errors seem to come out without apparent reason, etc. I've renamed the first Index swf Document class. Make sure you never have two classes of documents with the same name. You must also change the hand to CutLimestone if you're considering other galleries of loading.

    I also made a few small changes - be sure to copy it to new galleries so they all have the same behavior.

    Good luck!

  • MainTimelime ContextMenuItem MENU_ITEM_SELECT event not sent the magazine containing the external SWF

    1. custom context menu applied to MainTimeline
    2. using a Loader() to load an external SWF and have it added to its container display string
    3. Make a right-click SWF loaded menu contextual custom appears, but the MENU_ITEM_SELECT events are not dispatched when the user clicks on the items
    4. click right on elsewhere in the parent SWF works great, even on deep nested objects (not externally loaded)
    5. Remove loaded SWF of the display string and right clicking in its location very good

    I managed to find a hack . On the charger () parent display object, I put:

    .mouseEnabled = false;

  • An external swf movie clip can control the action on the parent timeline?

    I have an instance where I would like to a movieclip inside an external swf file to control the action on the parent timeline... any ideas? It is a drive function? Here's my attempt...

    swf import external file 'entrypage"using movieclip empty 'container' on the parent timeline main
    _root.createEmptyMovieClip ("container", 1);
    container.loadMovie ("entrypage.swf");

    feature of swf external files movie clip "na9" appearing inside the "testnav" on the main timeline of the swf files external...
    testnav. NAV9.onPress = function() {}
    _parent.gotoAndStop ("Theend"); clicking the movieclip above, he "end" label for the parent timeline
    }


    Am I close?

    You can send me your files to [email protected] to see what the problem could be

  • SWF external button to move the main timeline

    Hello

    I did a hand (parent) page that loads a swf that has a button (a1) which, when the click on I need to move the chronology of the parent

    I wrote this code to the external swf and tried many commands such as Object (root) .gotoAndStop (1);

    A1.buttonMode = true;

    A1.addEventListener (MouseEvent.MOUSE_UP, a1a);

    function a1a(event:MouseEvent):void {}

    }

    What should I write on the inside to make it work?
    Thanks in advance

    Try this:

    A1.buttonMode = true;

    A1.addEventListener (MouseEvent.MOUSE_UP, a1a);

    function a1a(event:MouseEvent):void {}

    trace (a1.parent.parent.parent);

    trace (a1.parent.parent);

    find the good timeline, possibly with more parent.parent... and then:

    MovieClip (a1.parent.parent.parent) .gotoAndtop (10);

    }

  • call the parent of a loaded swf file functions?

    Hi all

    I have a main Flash file that load other SWF files using loader objects.  I want to be able to call the methods of this main purpose since then in the loaded SWF files.  For example, I want the file loaded in order to add an event listener on the stage of the main file.  I found this example:

    http://flexcomps.WordPress.com/2008/09/01/AS3-calling-MyFunction-on-main-timeline-from-Loa ded - swf.

    That seems to do what I want, but I can't understand how to implement it in my setup.

    My "main" file that loads other sovereign funds is called "main.swf" and has a main document class.

    My loaded file is called start.swf and has a class of documents 'Start '.

    in my main constructor:

    var ethics_content:Loader = new Loader();

    ethics_content. Load (new URLRequest ('start.swf'));

    in the constructor of my departure:


    If (this.parent.parent! = null) {/ / IF the STATEMENT FAILS}
    var parentObj:Object = this.parent.parent as an object;
    trace ("parentObj has been found.'");
    } else {}
    trace ("this .parent .parent is null.");
    }

    stage.addEventListener (MouseEvent.CLICK, handle_click); GENERATES AN ERROR WHEN IT IS LOADED TO THE HAND. SWF

    trace ("step: ' + Stadium");  RETURNS A [STAGE] OBJECT BY OPERATING BY ITSELF, BUT NULL WHEN IT IS EXECUTED IN THE HAND. SWF
    trace ("root:" + root); RETURNS AN OBJECT [START] WHEN RUN BY ITSELF OR WITHIN THE HAND. SWF
    trace ("parent: ' + parent"); RETURNS A [STAGE] OBJECT BY OPERATING BY ITSELF, BUT NOTHING OF IN THE HAND. SWF
    trace ("this .parent:" + this.parent); RETURNS OBJECT STAGE ITSELF, NOTHING OF IN THE HAND. SWF
    trace ("root.parent:" + root.parent); RETURNS THE SCENE OBJECT BY ITSELF

    How to get to the scene of a loaded SWF file?  Or at least, how can I call a function in my main class from the loaded file start.swf so I can move the functionality I need the main.swf file?

    Any help is greatly appreciated.

    If your main swf loader is not added to the display list when it try {branch} is running, the charger will not have a parent.

  • Embeded SWF - &amp; gt; return to the parent read head

    I am building a presentation that loads multiple external swf files into the main timeline. I know this is probably a very simple question, but at the end of the loaded swf file, I would like the main movie (parent) to go to the next keyframe labeled. I know that it would take some kind of action script in the last frame of the loaded swf file. I'm not sure what would be this script

    something like:

    gotoAndPlay (_root. ("' Samples ');?

    Thanks for the help

    cf_coletta wrote:
    > I'm building a presentation that is in charge of several external swf files in the
    > main scenario. I know it's probably something very simple, but in the end
    > swf file loaded, I want the main movie (parent) to switch to the other
    > labeled keyframe. I know that it would take some kind of action script in the
    > last image in the swf file loaded. I'm not sure what would be this script
    >
    > something like:
    >
    > gotoAndPlay (_root. ("' Samples ');?

    the foregoing not correct
    _root.gotoAndPlay ("Samples");

    But, if you load movies into levels that rather
    use _root _level0

    --
    Concerning

    Urami

    --

    Happy new year guys - all the best there is in the 2006 :)


    http://www.Flashfugitive.com


    http://www.Firefox.com

  • Can a loaded SWF call a function that lives in the parent?

    I'm building a pretty simple site in AS3 Flash. There is a main movie (main.swf) that loads just different SWFs via buttons on a main navigation bar. The user clicks on a MC in "main.swf" and a function is called, loadMyContent ("section1.swf"), is called and it drives well. Other buttons use the same function, section2.swf, section3.swf, etc. of loading.

    I set the operation of the "loadMyContent()" in the document of the main sequence class file. It's that everything works fine when I just need to load the content of the user action from the buttons who live in "main.swf". I want to call that same "loadContent" function in the "section1.swf" and have "main.swf" run its fuction "loadContent", but I can't seem to figure out how to make a child to call a function that lives in the parent.

    Is there a way to have my child do this?

    I have a suspicion that I may have to define this "loadContent" elsewhere, but I am a little confused now. I'm not really familiar with design patterns, even if I want to get a understanding of them very soon. Can anyone offer help with my immediate need or suggest a path to a solution? Thank you.

    kglad,

    Thank you very much! It worked perfectly. My FLA section1 compiles now it's SWF without complaining.

    In case anyone else is following this, is the exact code I ended up using to cast 'this.parent.parent' as a MovieClip:

    MovieClip (this.parent.parent) .loadMyContent ("section2.swf");

    The discussion, I think that kglad is referencing is this discussion. If this is not it, let me know. Once again, kglad, thank you!

  • hide the external swf movie clip

    Hello.

    I have my main.swf and in the second frame, I load an external swf called first.swf with this method:

    [AS] var loader: MovieClipLoader = new MovieClipLoader();

    this.createEmptyMovieClip("myGalleryContainerproducts",5);

    myGalleryContainerproducts._lockroot = true;

    loader.loadClip ("first.swf", myGalleryContainerproducts);

    myGalleryContainerproducts._y = 86;

    myGalleryContainerproducts._x = 50;

    [/ ACE]

    In first.swf, I have two clips with instance names ena and dyo

    I want in main.swf in the third frame to hide these clips of first.swf (only the movie clips is not the entire .swf) or move (change x and y values) so they hide practically.

    All solutions?

    Thanks in advance

    After the ena and dyo are instantiated, you can use:

    myGalleryContainerproducts.ena._visible = false

    myGalleryContainerproducts.dyo._visible = false;

  • How to get a SWF that is responsible for controlling the parent timeline?

    I have a SWF that loads an external swf. I want the external swf (that has been loaded only), interact with the timeline of the swf file that just load it. I tried MovieClip (root). or MovieClip (parent). but they give me errors. How can I use as3 in the external swf so that it interacts correctly with the parent?

    the main timeline in the swf file that is loaded, you can reference the main timeline in the swf loading using:

    MovieClip (parent.parent)

  • Drag / move the dynamic region to tree parent link table

    Hello

    Is it possible to drag a row of a table returned by using the dynamic region of the parent tree? For example, I have the parent tree Explorer (say, dept and emp), clicking the dept and emp, it makes the Department or employee details to separate the workflow using the notion of dynamic region. Now I'm moving employees Department provided one and link to another node in the Department, it does not work. The listener to fall (on the tree) is not getting recognized.

    Is there something I'm missing?

    Thank you
    Sachin

    Hello

    as far as I know, drag and drop happens on the client and is therefore not bound by employment regions or dynamic regions. Then drag and drop should work for this use case. You share the implementation of slip and fall in the scenario you so that I don't want to exclude a program on your site (for example disccriminator incompatibility) error

    Frank

Maybe you are looking for

  • How to completely reset the touch Journ.E?

    is it possible to give to zero DAY. E TOUCH, such that she has been in the saleor can be rearranged the system

  • Possible to disable cmd for some users?

    Hi, im having a problem with one of my brothers always tries to hack into windows via cmd when he is angry at someone.The problem is that after he did this, spit of Windows and you need to start safe mode and then collect from there.It's not good for

  • Windows Vista 64 bit not Shutting Down

    I have Windows Vista 64-bit and after a few recent updates it will not shut correctly. The screen saying shutting down just y rest turns and it never stops. I have to use the power button then go through "Windows is not stopped correctly." Does anyon

  • magnification of an image

    Hello, is it possible in Acrobat DC make an option for a readable page to ower hower an image with your cursor, the image cilick and open a wiev with an enlarged image? Just as in a web page!Thank you

  • How to extract pages from a large file?

    How to extract pages from a large file?