Simple play(); problem

Go easy on me. I'm very new to ActionScript.
My problem is this. I've got a button inside a movie clip.
That button needs to play a movie clip that is on the main
timeline. However, whatever I try (that's within my knowledge)
doesn't work.
Here is a list of AS that I've got in my file.
Main timeline/first frame stop();
Movie clip end of animation has:
this.stop();
play_btn.addEventListener(MouseEvent.CLICK, slideOver);
function slideOver(event:MouseEvent):void {
timeline.play();
Movie clip that needs to be controlled:
first frame has this.stop();
last frame has:
this.stop();
and code to include a text file (which is working just fine).
Any ideas?

Well I'm not really sure why it doesn't work, but if you take
away this code from the first movie clip (the one with the button
in it):
play_btn.addEventListener(MouseEvent.CLICK, slideOver);
function slideOver(event:MouseEvent):void {
timeline.play();
and add this to the main timeline like this:
stop();
my_mc.play_btn.addEventListener(MouseEvent.CLICK, slideOver);
function slideOver(event:MouseEvent):void {
secondMovieClip.play();
than it should work.

Similar Messages

  • Is it possible to add audio with a simple play/pause button and also have a clickTag attached to the full stage?

    my client wants to add audio to their banner ad (which always has a full stage clickTAG set). I'm trying to figure out a way to just use a simple play/pause button and attach a toggle action to it. Problem is when the user clicks it's going to the clickTAG URL that's attached to the full stage. Is there any way around this?
    Please advise and thank you in advance.

    I have the same issue. It is pretty annoying but at least the audio remains within the motion project. It just isn't accessible it seems as an FCPX template. So what I'm doing is this:
    I still use the video within FCPX's generator section so that you can edit the parameters as you need to
    For the audio, open the project in motion then under Share, click 'Export Audio'. Select 'CAF' format and save to your hard disk
    I then import the audio file into an event I set up specifically for this purpose (per BenB's suggestion).
    When I need it, I then insert the generator from the generators section and then attach the audio file below the primary story line for the audio track
    It isn't pretty but it works.

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • JDeveloper IDE simple setting problem

    Hi,
    Recently we switched to JDeveloper from Visual Cafe .I have a simple setting problem.How can I set the options so that IDE gives, the core java classes and packages,and our application classes and packeges, prompts in imports as well as in code.Where to set the options.
    eg: when I write
    import java. it should prompt all the pakages.
    Thanks in advance.
    -Gopal
    null

    I am not sure I understand what you are requesting, but ...
    You can configure JDeveloper projects to include various libraries by default.
    This is done by selecting menu Tools | Default Project Properties.../ Libraries tab.
    You should define a library for your classes.
    You can import any of the packages / classes from all the libraries which your project includes.
    It would be incorrect for a tool to automatically add a bunch of import lines at the top of every file because each file should import what it needs and just as importantly, not import what it does not need depending on the component type (e.g. a servlet should not include javax.swing.* ).
    An easy way to import elements into JDeveloper is to type in something like:
    import java.
    // and then type in Ctrl Space
    and this launches the package browser, you can select packages or classes to import.
    You can also do this at the variable declaratiton point such as typing in:
    foo() {
    Frame x
    // Press Control Alt Space
    and this will correctly change the type (Frame) to the type you select in the package browser and add the import statement.
    -John
    null

  • Video playing problem

    I m experiencing serious video playing problem unable to play avi files of size 150mb above as i have downloaded titanic n was unable to play it!!!!! Pls look in the matter

    hi mate, what device are you using, and what have you encoded the bitrate and audio codec of the video?

  • Simple OOP Problem. Help!

    This is just a simple OOP problem that i cant decide on a best
    implementation for.
    im passing an object to an instance of, 'TabbedFrame', which is just
    a frame with a Tabbed Pane in it that is holding custom panels.
    however, these custom panels need access to the object being
    passed to 'TabbedFrame' and to some methods in it.
    i cant make them static however so how do i gain access to them?
    is my only option to pass the 'TabbedFrame' to each panel?
    like - jtabbedpane.add( "Panel 1", new mypanel1(this));
    here is code:
    new TabbedFrame( DataObject );
    public class TabbedFrame{
    public TabbedFrame(DataObject do){
    this.do = do;
    jtabbedpane.add( "Panel 1", new mypanel1() );
    DataObject do;
    public class mypanel1{
    public mypanel1(){
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    }i would just pass the DataObject to evey panel (there are 12) but
    i also need to be able to call methods in the 'TabbedFrame'.
    Any help would be appreciated!

    Modify mypanel1's constructor:
    public class mypanel1{
    TabbedFrame tf;
    public mypanel1(TabbedFrame tf){
    this.tf = tf;
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    DataObject theDo = tf.getDataObject();
    tf.someMethod(); // Call method on the TabbedFrame
    }In TabbedFrame:
    public TabbedFrame(DataObject do){
    this.do = do;
    // Modify call to constructor to pass "this" TabbedFrame.
    jtabbedpane.add( "Panel 1", new mypanel1(this) );
    }

  • DVD Studio Pro - Why is it so easy to create stories, but you cannot group all them together for a simple PLAY all scenario, instead of going to scripts

    - Why is it so easy to create stories, but you cannot group all them together for a simple PLAY all scenario, surely it can be done? I am about to give scripting a shot but seriously it looks way to confusing compared to stories, I have several sub menus and in each sub menu I have a play all story, however what I also want to do is create a PLAY ALL from the main menu, any suggestions
    Erby60

    Duplicate all your stories, have a menu item with duplicate story 1 as the target, and set the end jump of duplicate story 1 to duplicate story 2, etc.  Shouldn't that work?   There may be a simpler way, but
    As far as adding documents, The simplest way is to build in dvdsp and then add a folder containing the docs to the project folder that dvdsp has created and use toast to burn it.   There may be a rule for naming this folder, but can't remember it at the moment.
    Hey, ya know there's something called the dvdsp manual.  A quick search found this
    In addition to the VIDEO_TS or HVDVD_TS folder, there are other items that can be part of the format process:
    A folder specified by the DVD-ROM content setting
    DVD@CCESS Installers
    You can change or set the folder to use for DVD-ROM content either when specifying the preformat settings or while configuring the format process. The DVD@CCESS Installers are included if the project used DVD@CCESS links and the Embed Text Data checkbox in the Disc Inspector is selected. See DVD@CCESS for more information on DVD@CCESS.

  • Discontinuous midi playing problem

    Recently I am developing a game on Motorola V980. A sound playing problem has occurred in my working progress. That is when I continuously play two Midis, first one worked fine, but second one was played discontinuously. However, when I played the second MIDI independently, such problem did not occur.
    Detail logic of my program were organized like this:
    1) Open a binary file and stream it
    2) Copy streams into local buffer, such as byte arrays
    3) Create Player object for each sound and organize them in an array
    4) Invoke Start, Stop, ... methods according to my game logic
    5) Finally, a level was completed, stop and destroy Player objects and recycle memory allocated.
    I am wondering if it is a bug of sound system of Motorola V980. So I looked for solution in relative Motorola official specifications, media guides and many J2ME developer forums. Unfortunitely nothing I have got. Anyone kindly give me some advices on this issue would be greately appreciated.

    Welcome to Apple Discussions!
    You will want to restore your iPod...
    Restore the iPod
    btabz

  • DVDSP3 - First play problem

    Hi
    I producing a project on DVD SP3. I've done this before but I'm having problems with this particular project. It is a simple project with 1 menu page and a start button. From there you can navigate thru chapters. I have "first play" set to Menu 1 and everything works fine on the simulator but when I burn a disk and try to play the DVD on a player, Menu 1 does not appear on the startup. If I hit "enter" on the DVD player's remote the "Start DVD" button visibly blinks as activated and the DVD video plays and navigates thru the chapters fine.
    So.....Everything works but Menu 1 is not visible on startup.
    I'm starting to pull my hair out....LOL
    Something weird I've noticed is that when I burn the large project it the prompt says it is "compiling". When I burn this small project the prompt says it is muxing.
    I just finished a project with 10 menus and 77 buttons. It works like a charm. Am I just overlooking some obscure mistake or is there something obvious mistake I've committed?
    Toby Threadgill

    Hello,
    Thanks for your ideas. I have tried both your suggestions unfortunately to no avail. When I use the simulator, everything works like a champ. When I emulate using the DVD player or burn an actual DVD the menu does not show up and the screen is black. If I hit the enter on the player, the button visibly blinks on the black screen and the video track starts playing and navigates fine.
    Toby Threadgill

  • Need help with simple mask problem

    hi there this is mark from superbooty a band that has played in the bay area for over 10 years...
    i was wondering if someone could help me with a Motion2 problem i'm having regarding masks.
    i'm working on this simple animated scene of a car going by a beach - the photo is from the passenger side and shows the outside mirror.
    i'm moving the background (different from the original that came with the car) and i want to move an image of tokyo inside the mirror housing too.
    i figured out how to do the mask but when i try to animate the image of tokyo the mask layer moves with it. when i lock the mask i can't move the image - ???
    there's got to be a way to lock the mask but be able to move what it is masking..
    here are the links to three images that show what the problem is - the first is
    the shot of the scene unmasked, shot 2 is the scene with the mask enabled, and the third is the shot when i try to animate the tokyo background:
    http://superbooty.com/mirrorbeach1.jpg
    http://superbooty.com/mirrorbeach2.jpg
    http://superbooty.com/mirrorbeach3.jpg
    any help would be most appreciated - thanks!

    Adam's solution is the one I'd use - put the mirror contents in a layer, mask the layer, then manipulate the mirror content image. Did this solve it for you - if so, please click on the or buttons over posts as appropriate...
    Patrick

  • Encore CS6 First Play problem

    Long-time Adobe user with CS6 Master Collection. Not come across this one before, though.
    Simple Encore project using 3 PPro sequences via Dynamic Link.
    Set up so a 20 sec video plays automatically then drops into a static menu offering choice of two timelines.
    All tests OK, previews in Encore OK, and builds OK.
    HOWEVER, the resulting DVD skips the intro video and starts with the menu, despite the intro video being set as First Play and testing OK inside Encore.
    I've built the project from scratch twice now with the same result.
    Any hints as to cause and cure?

    OK. I eventually tracked it down.
    Before adding the intro element, I started with the menu. When I added the intro movie, all looked good on the flowchart and it played OK in Encore, but, as I explained initially, when burned to DVD playback started with the old menu, not the new first play.
    I tried deleting Encores preferences (start with SHIFT+CONTROL) to no effect.
    I tried adding STOP at the end of menus, to no effect.
    I also tried a variety of other first play items, but the DVD always started with the non-first-play menu.
    Eventually I looked at the project properties and found that the title button and main timeline were still pointing at the original first-play menu item, not the one currently selected. Changing the main timeline had no effect, but changing the Title Button to the new first-play timeline finally solved my problem.
    It seems possible that there is an issue with updating all relevant items in Encore CS6 (Windows, fully updated) when changing first play. Or am I missing something that makes it my fault here?

  • Simple Finder Problems

    I am the admin for a mobile computer lab of ibook G4's. Having problems with the simple finder student account. I created a folder of alias's to connect to our Student Saved Server (OS9), click on it to open the folder it opens and automatically tries to connect to each share point. The student isn't able to log-in since it's not the correct point and hangs the machine most of the time. If you click cancel enough times (about 10 share points) it still will sometimes hang the finder. It only happens in simple finder mode and I have check RW access points on the folder. Tried mulitple times with different rights ect. Any ideas?

    Create an account in System Preferences -> Accounts, and play around with the Parental Controls. Not a very good name in my opinion, but that's where you can set what applications they have access to. For instance, click the box next to Finder & System, and then click the Configure button. You can select exactly which applications they have access to.
    No need to use the Simple Finder Setting, as the other mode will allow you much more control.

  • Simple button problem

    I am having a real problem creating a simple button - I have
    created a Flash file using Action script 2, and when I create a
    simple button - text with a rectangle as a background, (see
    http://www.elkhavenestate.com),
    and the over state is behaving in a bizarre fashion. This is my
    first time using CS3, so is there a new control that I'm
    missing?

    I take it that it's the Home button. It appears to have a
    selectable text field or something in it, which is causing the
    problem. Either change that to a static text field or set its
    selectable property to false. The other two buttons appear to be
    fine, so maybe you can just duplicate one of them and turn it into
    the Home button.
    If I picked the wrong button, let me know.

  • Video Playing problem (Zen Vision M 60

    I just got my 60gb zen vision M for christmas and i started transfering files right away to test out its playback quality etc
    When i get to video particularly my anime video it plays the first 5 or so seconds and then freezes... no sound and no video.
    The video is a naruto video from dattebayo fansubs. I think it is divx encoded (will double check to make sure)
    What should i do to solve this issue?
    I have not tried any other video's as yet but will do so soon

    **bleep** it looks like it's slight differences in the encoding of the files that determin whether or not they play
    I used Bleach episode coded by Lunar and that worked fine.
    If it is down to minor differences in encoding that's causing this problem, surely it should be fixed as soon as possible, because of the massi've amount of different ways of encoding the player isn't really fit for avi playback if it's this temperamental :/
    *UPDATE*
    I've looked at the bleach file that works and the Naruto file that doesn't work in GSPOT.
    There are a few very minor differences that I don't really understand but the one that jumps out at me is the container:
    The naruto files that don't work have the container 'Multipart OpenDML AVI, "rec list" style DivX Style "packed bitstream" AVI (223 frames in first part, 639 frames follow)' and the bleach file that works is 'OpenDML (AVI v2.0) DivX Style "packed bitstream" AVI'
    I've bolded what I think the problem is, would those 223 frames (first part) be the 8/9 seconds before it freezes?
    Could this be the problem?
    *FURTHER UPDATE*
    The naruto file that has the line 'First part 223' lasts 9 seconds whereas another file that has the line '(205 frames in first part, 32998 frames follow)' lasts 8.
    I'm almost certain this is what the problem is.......any chance of a firmware fix for the avi playback not supporting multipart AVI files?
    Message Edited by antonusklesk on 2-25-20060:40 PM
    Message Edited by antonusklesk on 2-25-20060:4 PM
    Message Edited by antonusklesk on 2-25-20060:44 PM

  • Simple wav problem! PLZZZ help!!!!!

    Hi,
    I have a problem with playin waving files. In my application, i want a sound to be played wen a popup box appears. Here is my code:
    AudioClip beep = null;
    try
    File audioFile = new File("Sounds\\beep.wav");
    beep = Applet.newAudioClip(audioFile.toURL());
    beep.play();
    catch (MalformedURLException e){}
    finally
    String message = m;
    JOptionPane.showMessageDialog(null, message);
    However, the sound doesnt seem to play. I wrote some System.out statements for tracing, and apparently the "beep" gets made and played. PLZZZZZ could some1 tell me wots goin rong!!!
    Thanks in advance!

    I've used Applet.play(URL) OK with .au files. Perhaps you should try to convert your .wav to an .au? (progs like GoldWave will do this)
    However I suspect that your URL spec is wrong. Applet.newAudioClip will always return a non null object ; look at its source :
        public final static AudioClip newAudioClip(URL url) {
            return new sun.applet.AppletAudioClip(url);
        }You could try calling openStream on your URL to see if its valid.
    - Justin

Maybe you are looking for