Action when "loadmovie" swf clip finishes

Hi,
I am a fledgling flash designer. I am moving on nicely with
the program but I am stuck on one particular task, I was hoping
that someone may be able to help me.
I have a container movie which is a menu. That menu loads a
buffered audio player movie into a target named "jukebox" that is a
movie in itself with its place controls. Everything works 100%.
Great. Except :-)
I would like the jukebox movie to "know" when the loadmovie
swf has finished so it can advance. At the moment if I dont place
stop commands and user control buttons to move around the jukebox
movie the jukebox just loads one then the other, it obviously
doesnt wait until the loaded movie .swf has finished.
I suspect it may be a case of making the individual loaded
swf.s declare a variable which is equal to the frame its playing
and then passing that variable off into the main movie and when if
that variable total = complete frames then move to next movie...
But being a novice I lack the script knowledge..
Can anyone help?
TIA :-)
J

if you're loading into bo_mc, you can't control where your
loading image is going to be positioned inside bo_mc: the top left
of your loading image will be placed at the center of bo_mc and
there's no way to change that.
and your container movieclip (bo_mc) may, and probably
should, be an empty movieclip with 0 width and 0 height. so,
centering within bo_mc, in that situation, makes no sense.
and the only way to control the position of your loaded image
is to control the position of bo_mc or one if its ancestors.
so, you're more clear but you can't do what you're thinking.
you can't keep the mc (bo_mc) static and center the loaded jpg.
you can load into bo_mc and then position bo_mc so it's
centered with respect to the stage or any other movieclip on-stage.
that way your image will be centered.

Similar Messages

  • Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    code on the last frame of your movieclip instance:
    _root.gotoAndStop('whatever_frame');  // will work unless this swf is loaded into another swf.  in that situation, you should use a relative path to the main timeline (eg,  _parent or _parent._parent etc).

  • Trigger function when loaded swf finishes

    I'm making a site that loads external swfs based on which
    button is clicked. When the swf loads it plays an intro and then
    stops at a certain point. My goal is that when you click another
    button the current swf plays an outro before the next one loads.
    The problem I'm having is making the outgoing movie trigger the
    function that loads the next.
    At first I tried just adding loadNextMovie(); to the last
    frame of the loaded swf. But for some reason this causes the two
    stops in the file from working so the thing just keeps looping. I
    have no idea why adding this function call would prevent stop();
    from working.
    Is there another way to have the end of movie trigger the
    function? Also, why doesn't adding loadNextMovie(); to the last
    frame of the loaded swf work?

    Ok, sure. I have main.swf that loads external.swf. Main.swf
    has a function that loads a different movie. Like this:
    function loadMovie():void {
    trace("movie loaded")
    This function is to be called from external.swf by putting
    this in the last frame:
    stop();
    loadMovie();
    But when I actually put loadMovie(); into external.swf the
    stop no longer works and it just loops. What am I doing wrong? Is
    trying to put this function call in the external swf the correct
    approach?

  • Need Action When Flash File Finishes

    I have a flash file embeded in a jsp page....
    <OBJECT
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    WIDTH="320" HEIGHT="240" id="Yourfilename" ALIGN="">
    <PARAM NAME=movie VALUE="<c:out
    value="${myForm.resource}" />">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFCC >
    <EMBED src="<c:out value="${myForm.resource}" />"
    quality=high bgcolor=#FFFFCC
    WIDTH="640" HEIGHT="480" NAME="<c:out
    value="${myForm.resource}" />"
    ALIGN="" TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="
    http://www.macromedia.com/go/getflashplayer">
    </EMBED>
    </OBJECT>
    When the flash file finishes. I want my page to redirect
    auto-magically to another web page. How do I do that?
    Is it possible to put a re-direction into the object
    header?

    insert a keyframe on the last frame of the action layer, then
    add this code into it:
    getURL("
    http://www.yoursite.com","_self");

  • Knowing when a swf loaded in MovieClipLoader has finished animating

    Hi,
    I'm trying to create a wrapper written in ActionScript2, which loads a second AS2 swf then when this loaded swf has finished animating the wrapper will load a second swf.
    This is the code I have to load the first swf:
    this.createEmptyMovieClip("containerClip",this.getNextHighestDepth());
    var movLoad:MovieClipLoader = new MovieClipLoader();
    var myListener:Object = new Object();
    myListener.onLoadProgress = function(thisClip:MovieClip)
         thisClip.onEnterFrame = function()
              trace("CurrentFrame:" + this._currentframe);
              //trace("TotalFrames: " + this._totalframes);
              if (this._currentframe == this._totalframes)
                   //trace("true");
                   movLoad.loadClip("number2.swf",this);
              //trace("false"); 
    movLoad.addListener(myListener);
    movLoad.loadClip("number1.swf",this.containerClip);
    I can get the total number of frames from the loaded swf, but how can I check when I reach the total number so I can remove the first swf and load the second one?
    Stephen

    Hi,
    This is what I have so far:
    this.createEmptyMovieClip("containerClip",this.getNextHighestDepth());
    var movLoad:MovieClipLoader = new MovieClipLoader();
    var myListener:Object = new Object();
    myListener.onLoadInit = function(thisClip:MovieClip, loadedBytes, totalBytes)
         this.onEnterFrame = function()
              trace("CurrentFrame:" + thisClip._currentFrame);
              trace("TotalFrames: " + thisClip._totalframes);
              if (thisClip._currentframe == thisClip._totalframes)
                   movLoad.unloadClip("C:/development/projects/CMSwfLoader/assets/Yahoo_Smart_Banners_Loans_300x250_v2.swf");
                   movLoad.loadClip("C:/development/projects/CMSwfLoader/assets/300x250_2p_12Mb_tipografica.jpg",this);
    movLoad.addListener(myListener);
    movLoad.loadClip("C:/development/projects/CMSwfLoader/assets/Yahoo_Smart_Banners_Loans_300x250_v2.swf",this.containerClip);
    But I found that the onEnterFrame is not called at all, I want it to be called on the movieClip that has been loaded, so I can tell when it has reached the last frame. Is the problem because I'm listening for onLoadInit?
    Stephen     

  • My Photoshop CS 5 has some strange actions when I copy a portion of a photo using the clone stamp  to transfer to another part of the image. It carries the entire layer (not just the stamps selection) across the screen and I cannot place it where I need t

    My Photoshop CS 5 has some strange actions when I copy a portion of a photo using the clone stamp  to transfer to another part of the image. It carries the entire layer (not just the stamps selection) across the screen and I cannot place it where I need to. It appears as if I selected the entire layer on purpose (which I did not)
    The below items appeared when I opened Photoshop CS 5:
    “Photoshop has encountered a problem with the display driver and has temporarily disabled G & U enhancements. Check the video card malfunctions website for latest software. GPU enhancements can be enabled in the performance panel of preferences.”
    (I believe this started after the automatically updated Windows was applied. It was coincident with the before mentioned problem . . . but I don’t really know if it had anything to do with it. )

    For the Clone Stamp problem, check the Clone Source panel and Clipped is probably unchecked.
    If so, check Clipped and see if that makes a difference.
    (Window>Clone Source)
    As to the video card problem:
    Which version of windows are you using?
    What is the make and model of your graphics card?
    Do you know which update windows installed?

  • No video when emailing video clip?

    I took a video on my iPhone and want to email it to a friend. I did download it to my desktop iMac. Here are the things I've already tried.
    1.  I edited the clip in iPhoto and tried to email it from there, but that is not supported.
    2.  I then exported the clip to the desktop, drug the file to my email and it was completely blank (no video or sound).
    3.  I imported it into iMovie, trimmed the clip, finished the project & then shared it to the media browser. I opened a new email, added the file from the media browser, and I have sound and a still picture.
    4.  I've exported as a quicktime project and the clip plays in quicktime fine, but when I go to email it I have a still photo with sound.
    Please, what am I doing wrong?
    Kristy
    I have iPhoto '11 & iMovie '11

    Still thinking about it Kristy - not sure of the solution yet.
    As a test, I just dragged a movie clip from iTunes onto the Desktop. The clip was sent to me by my daughter and was taken on her iPhone 4. I dragged the clip into a new message in Mail and it plays perfectly.
    So, I'm not sure what's happening with your system. What email program are you using (I'm on Apple Mail)? As the movie clip plays fine in QuickTime, possibly it's the email app that's causing the problem. Can you try using a different program?
    John

  • Stop music playing in one swf when another swf starts

    Hello Flash developers please help me here.
    On my main SWF Home  File i have 2 swf files are loaded into my (main home swf)  and everything is runing smooth BUT the problem is when i want to  watch the video the music is still playing i have to click on the button to stop music playing.
    what i want is when i click on the video to play i want automatically the music to stop playing with out me clicking the mp3 button to stop the music playing.
    NOTE
    Keep in mind i have 2 SWF files that are loaded in to the main swf file ...
    Home SWF is the main file
    MP3 SWF   <<   Loads on Home SWF
    Video SWF <<    Loads on Home SWF
    All i want is when the video is playing automatically stop the music and when the video is finish the music automatically continuing from where it was left.
    Thank you so
    AKAoshi1

    I don't know how to do this. I have 4 files. file one calls file 2 when the Next at the end of file one is clicked, file 2 calls 3, etc. The reverse is true with the first Previous for files 2 - 4. Can I get some guidance?
    Thanks

  • How to know when a .swf file ends

    I have a base .swf file that opens and plays another .swf
    file. I want to know when that .swf file has finished so I can then
    open a third .swf file inside the original.
    Thanks.
    Rob Childress

    In Flash 8 AS1 or 2 look at
    MovieClip._currentframe
    and
    MovieClip._totalframes.

  • Trouble comunicating from flex to swf, when the swf is embedded

    i'm a newbie to flex/air so i'm hoping there is going to be a
    simple answer to this problem. it's caused a massive headache!
    i have been using a swfLoader to load a swf, then triggering
    function calls within the swf from flex by using the following in
    the script tag of my mxml
    var mc:MovieClip = MovieClip(myMP3player.content);
    mc.loadMP3Player("file:///"+path, artist, title);
    where loadMP3Player is the function in the linked swf and
    myMP3player is the id of the swfLoader.
    this works great, no problems... but when i change the code
    so that the swf is embedded, rather than loaded at runtime the code
    above gives a
    "ReferenceError:Error #1069 Property loadMP3Player not found"
    error
    when i try to trigger the function.
    i have tried many different ways of referencing and embedding
    the swf, all have the same result. i.e. swf loads fine and the flex
    project compiles without errors, but i am unable to call the
    function.
    how do i reference the function in the swf when the swf is
    embedded?
    any help will be really appreciated.
    btw: i need to embed the swf as i am distributing the
    finished article as an air app.

    Relief - well sort of.
    I uninstalled the last Flash version (10.3 latest built that I downloaded a couple of days ago) on all my browsers.
    Then I downloaded the older 10.2 and installed, and the problem was gone. I'm on MacOSX Lion, by the way.
    So this must be a bug in the last flashplayer.
    Cost me five hours and a bucket of sweat.
    And from now on, I'll be pretty scared to give the flashplayer an update, that's a fact.
    ottie

  • I have recently upgraded my iMac Intel G5 iSight to OS 10.6.8 and now the internal mic does not work with skype or facebook. I can here static when playing back clips. Do I need to update firmware or reload old sys parts

    I have recently upgraded my iMac Intel G5 iSight (iMac5,1) to OS 10.6.8 and now the internal mic does not work with skype or facebook. I can here static when playing back clips. Do I need to update firmware or reload old system parts. I have zapped PRAM. The blue indicator in system audio panel will appear for a second as I slide the bar for internal mic but then it disappears. Is there a fix?

    The sound seems very faint but can here static on playback.

  • How to call an action when the user selects a radiobutton

    Hai
    PLease help me in providing the information.
    In my Project i have two radio buttons as
    New
    Asssessment
    when the user selects new button, i want to automatically call an action in the controller(.jpf file)
    Simalarly when he selects the other radio button i need to call a separate action in the controller.
    Remember i dont have the submit button.
    I want to dynamically call an action when the user selects the radio button.
    i dont have any field inthe radio button which actually takes action as an attribute .
    please provide me the necessary

    Hi,
    You can use JavaScript to call the action in interest upon the Radio Button Element Being Selected.Should be simple, and if your controller is part of the portlet dont forget to use the jpfScopeId to asscoiate the controller instance with the one in the portlet.
    Let me know if you have any further questions.

  • Crashes, graphics glitches, and more crashes when editing video clips

    Can't for the life of me figure out why PE keeps crashing on me, so I'm here for help.
    My system consists of a i7-970 hexacore, 6GB ram, 1x 500GB os drive, 3x500gb raid 0 drives (this is where my video clips are stored), 2x GeForce GTX460 video cards.
    OS is Windows 7 Profressional 64 bit.
    The video files I work with are generally in the 50-200GB size.
    A little background - the videos that I am working with are recordings from Battlefield Bad Company 2 that I have recorded with some capture software called Dxtory.
    I record at 1920x1080 at 60 FPS to avi files.  The avi files are using the "xtor" codec (Dxtory's own codec)
    [ISFT]    DxtoryCore ver2.0.0.101
    [ISRC]    Video:YUV420 Audio:Speakers (Realtek High Definition Audio)
    Audio is PCM 192000Hz recorded in stereo.
    Let me start by saying I have not had trouble with this before until I started recording the videos at 60 FPS.  30 FPS worked ok (some crashes here and there, but they were bearable), but the frequent crashes started happening when I started working with the 60 FPS videos, done mainly so I could play around with slowing the clips down, etc.
    Sometimes I can open and edit clips just fine.
    Recently, a project that I'm working on is crashing when I try putting two different clips from different files together on the time line.  I managed to get it to work once, and saved the project after that.  Then, PE crashed randomly and when trying to reopen the project, it just crashes and won't let me get any further.
    I should mention the graphics glitches as well - occasionally (especially when previewing video clips before adding them to the timeline) after I close the preview window, the graphics in PE will glitch out, causing random lines to appear in certain areas, graphics to stack on top of eachother and freeze up, and sometimes I can click on the "play" button in the main project window and hear everything start playing, but the graphics are completely screwed up to the point where I can't view the video or hit the pause button.
    All of my computer hardware is fine, all drivers, and PE, are up to date.
    Can someone please help me figure out what is going on?  I'll be happy to provide any more information that might help out.

    The most likely issue is the codec that your program is using the create your video. It's apparently not compatible with Premiere Elements.
    This often happens also when people try to record their on-screen video with FRAPS.
    You'll see lots of discussions on this issue in the Premiere Pro forum. However, it's even more pronounced in Premiere Elements, which is designed to work almost exclusively with camcorder video.
    Some video programs are a little more versatile with this type of video. Some people have found Corell's Video Studio better at handling these non-traditonal formats.
    But I did a Google search on Dxtory editing and couldn't find any information on it.
    Sorry I can't offer a solution. But I can pretty much assure you that Premiere Elements isn't it. sorry.

  • How to preven JButton of generated actions when the user keep pressing down

    How to preven JButton of generated actions when the user keep pressing down the key or the short cut
    The code below to show the issue when the user keep pressing Alt+ O
    We want to prevent the JButton from generating multi actions just one action only
    A sample of code shows the behaviour which has to be prevented. Continue pressing "Alt +O" and you will see the standard ouptput will print time stamps
    Please notice, I am NOT interested in Mouse press which has a solution by adding a threshold ( setMultiClickThreshhold(long threshhold) on the JButton  as an attribute.
    public class TestPanel extends JPanel
       private JButton btn;
       public TestPanel()
          btn = new JButton("Open");
          this.add(btn);
          registerCommand(new MyAction(), InputEvent.ALT_MASK,
                KeyEvent.VK_O, btn, btn.getText(), 0);
       public static void registerCommand(AbstractAction action,
             int mask,
             int shortCommand,
             JComponent component,
             String actionName,
             int mnemonicIndex)
          InputMap inputMap = component.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
          KeyStroke knappKombination = KeyStroke.getKeyStroke(shortCommand, mask);
          if ((component instanceof AbstractButton)
                && mnemonicIndex >= 0
                && mnemonicIndex < actionName.length()
                && (shortCommand >= KeyEvent.VK_A && shortCommand <= KeyEvent.VK_Z))
             ((AbstractButton) component).setDisplayedMnemonicIndex(mnemonicIndex);
          if (inputMap != null)
             ActionMap actionMap = component.getActionMap();
             inputMap.put(knappKombination, actionName);
             if (actionMap != null)
                actionMap.put(actionName, action);
       public static class MyAction extends AbstractAction
          private static final long serialVersionUID = 1L;
          @Override
          public void actionPerformed(ActionEvent e)
             System.out.println(System.currentTimeMillis());
       public static void main(String... args)
          SwingUtilities.invokeLater(new Runnable()
             public void run()
                JFrame frame = new JFrame("Testing");
                JPanel panel = new TestPanel();
                frame.getContentPane().add(panel);
                frame.setPreferredSize(new Dimension(500, 500));
                frame.setMinimumSize(new Dimension(500, 500));
                frame.pack();
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setVisible(true);
    }Edited by: user12130673 on 2013-feb-13 03:01

    Use KeyStroke getKeyStroke(int keyCode, int modifiers, boolean onKeyRelease) with onKeyRelease=true instead?

  • How do you identify when a report has finished?

    Hi all,
    I've got a big report that is taking a while to run (approx 1min) and the problem I'm having is that my users are getting bored of waiting and starting to click around my web application and re-running the report because they think it has failed. The re-running of the report is causing more load on the system and the reports to run even slower. What I would like to do is stop them re-runnning the report maybe by somehow locking the web page until BI publisher has finished but I don't know how to get a message back from BI publisher.
    Currently I'm running the BI publisher report by having a button push which redirects the users web browser to a url such as:
    'http://'||:BI_PATH||'/xmlpserver'||:BI_DIRECTORY||'/Custom Reports/'||:p180_report||'/'||:p180_report||'.xdo?_xpf=&_xpt=1&_xdo='||:BI_DIRECTORY||'%2FCustom%20Reports%2F'||:p180_report||'%2F'||:p180_report||'.xdo&_xt='||:p90_template||'&_xf=rtf&_xmode=4'
    And then as I'm returning an rtf doc the familiar save, open or cancel popup comes up. The problem is that before the popup appears they can re-click the run report button.
    One way round it I've thought of is to have the report generate to a file system and redirect the user to a waiting page that checks periodically for the files existance and then when it does exist forward the user to a page with a view report button. This sounds like a lot of effort, does anybody know of a better way?
    I've also wondered if running the report using webservices would be an option, is there a way of getting BI publisher to run a web service when a report has finished? This could then interact with my back end server and the web page could act on that, or am I totally barking up the wrong tree?
    Any help would be greatly appreciated!
    Thanks,
    Darren.

    Hi Darren
    couple of ideas
    1. Rather than 'run' the report, get it to run through the scheduler immediately. Once its running through the scheduler you could then poll the scheduler tables to see when it completes. You could either redirect the users to a wait page or show an egg timer until the document has been created. this would require the document to be delivered to somewhere for you to poll as the URL will not return a job id.
    2. Bit more involved but probably better is to hook into BIPs web services. So rather than the button issue an http request it calls a servlet to issue a web service call to BIP to schedule a report. The WS will return the job id to the caller, you can then poll the scheduler via a ws to check the progress of the job. Once complete you can then retrieve the result form the scheduler tables via another call.
    Food for thought I hope
    Tim

Maybe you are looking for

  • Issue during automatic Creation of Work Order from Notification

    Hi, I have a issue during automatic Creation of Work Order from Notification. BADI implemented: NOTIF_EVENT_POST BAPI called in BADI: BAPI_ALM_ORDER_MAINTAIN I am able to create Work Order successfully but after that i need to update notification hea

  • File To RFC without BPM

    Dear Friends,   My scenario is File to RFC , file is picking from third party and that file parameters are updated in ecc  and response is updated in third party system using XI. For this one I created data types,message types,message interfaces and

  • Itunes download error mess

    I recently reformatted my hardrive and reinstalled windows xp and I am getting the following message when attempting to download itunes "error writing file: C:\Program Files\Common Files\Apple\Mobile Device Support\etc\zoneinfo\America\Anguila. Verif

  • SAP Query transport

    Hi, Wish to have step by step procedure of transporting SAP Query ? Procedure I followed & got error message I have used SQ02 & truck symbol it is creating only one TR without any customising task. Using T.code SCC1 in the target system I got error m

  • BUPA_SAVE_CONTROL

    Hi, I am required to cross check the value in field 'searchterm' against some ztable when the save button is pressed after entering details for a contact. For this i have been looking for a badi. Will BUPA_SAVE_CONTROL Badi serve my purpose?If yes th