ActionScript inside Movieclip is SOMETIMES ignored

Hi,
I am working on something similar to a slideshow where
buttons are used to move forward and backward in the time line.
On one of these "slides" there is another button, a MovieClip
with a few frames inside (i.e. the rollover and mousedown states
etc.) and ActionScript in Frame 1 that make the button work
(rollovers and the like).
If I play forward in this slideshow, everything works.
If I play backwards to the frame that has this button, then
all ActionScript inside this button is completely ignored
(including trace), and the button will endlessly cycle through the
frames inside (even though I tried various STOP commands from
inside and outside the movieclip).
The interesting thing is that I have a very similar slideshow
with a similar button that does NOT have this issue. If I
copy/paste the working button to replace the bad one, the same
thing happens to this button, so it somehow is local to this one
file.
There are no error messages coming up, and I don't even know
if there IS any code that would disable script inside a movieclip.
I checked the code inside the MovieClip and found nothing
wrong - it only has the stop command, a few addevenlisteners and
their corresponding functions in frame 1.
I just don't get why it works in one file but not in this one
- the best part is that whenever I create a new slideshow, I simply
create a copy of the last slideshow file, so the basics of all
these files should be identical...
Another thing that completely throws me for a loop is that
when I add any random shape (e.g. a square) into the frame that has
the BACK button that brings me to the broken button, then it works!
So I have a workaround, but I would really like to know what
causes this - I'd prefer a fix to a workaround that might break
some day, too.
Any idea what could possibly cause something like this and
what I can do about this?
Thanks!

you probably have a corrupt swf.
to test, copy all the assets to new swf and see if the problem persists.

Similar Messages

  • Draw inside movieclip/graphic with Actionscript

    Hi.
    How I can draw inside movieclip/graphic element with Actionscript?
    If i have example movieclip-element in my project and want to draw a single dot in its coordinate (10,10), how I can do that?
    ty m8s!

    The easiest way to draw inside a movieClip is the graphics class.
    You could do something like:
    this.graphics.lineStyle(1, 0x000000);
    this.graphics.moveTo(10, 10);
    this.graphics.lineTo(11, 11);
    This isn't perfect when drawing pixels, however - it only has methods for lines and shapes(circles, rectangles etc).
    If its important for you to draw a single pixel and accuracy is more important you may want to consider converting your Movieclip to a BitmapData class, which has methods for setting Pixels. Realistically though, if you didn't know about the graphics class, then that'll probably be what you're after.

  • Volume setting sometimes ignored

    I've notices (macbook) that the volume setting in OS X is sometimes ignored by applications (like quicktime, idvd etc). It just goes on max. volume, although i told os x my volume has to be 50% for example.
    After clicking in the menu bar (where it still tells me 50%) the setting is pushed to the value i specified earlier after clicking on the volume bar.
    What is causing this?

    I have turned my thrive off several times and the sound never came on then this morning its on. Go figure.

  • Change Stage Frame From Inside MovieClip?

    How Do I Change Stage Frame From Inside MovieClip?
    Heres my code so far:
    hh.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
        gotoAndStop(2);
    i tried (root).gotoAndStop(2); but i got an error , #1061 ..
    Thanks in Advance...
    ASAP would be nice..

    well your a smart *** now arnt you   Haha..
    I missed 1 painful word in that line of code thanks heeps..

  • Actionscript Inside Movie Symbol

    I'm making a flash menu that is a movie symbol. There are sub
    menus in this movie that are involved in motion tweening so I made
    them movies as well. The animation all works greats but the sub
    menus actionscript don't. Does anybody have any information that
    will help me? I'm pretty new at this....

    Ok...is there anyway you can post the code you wrote?
    Otherwise I'm guessing but I'm assuming you have the main menu clip
    called something like mcMainMenu (make sure your instance is named
    on your stage)
    Inside of it you have the sub menus which "each?" is a
    movieclip as well? i.e. submenu1, submenu2, submenu3? So that when
    you click on either of them it will call the url event....right?
    Make sure each of those instances have a name as well (on the
    property inspector make sure it doesn't say <InstanceName> if
    it does...then that's probably the issue.
    If you go to the main timeline of your movie you probably
    want to eventually take the code you have assigned to each of the
    individual clips and just create a new layer called "actions" and
    put something like the following:
    mcMainMenu.onRollover = function() {
    mcMainMenu.gotoAndPlay("...");
    mcMainMenu.subMenu1.onRelease = function() {
    getURL("...");
    mcMainMenu.subMenu2.onRelease = function() {
    getURL("...");
    mcMainMenu.subMenu3.onRelease = function() {
    getURL("...");
    ...obviously substituting the correct URL and goto
    frame/scene accordingly. But you see there's a hierarchy that is
    being followed so that flash knows exactly what item you want to
    assign an event to. Hope this helps a bit. If not...zip up your
    code and put it somewhere so we can take a look.

  • SimpleButton inside MovieClip Symbol

    I want to create various button panels contained in separate
    MovieClip(symbols) created and laid out in a movie clip. I want to
    use flash button objects on each panel. Then swap panels at will
    that bring the buttons along with the panel so all I have to do is
    call..panel1 = new panelOne; panel2 = new PanelTwo, etc...If I
    create a class for each button with its functionally built in how
    can I access the button from the panel? I figure I have to import
    the buttons in the panel class before it will work? I tried
    panel1.getChildAt(x) but that didn't seem to work. Do I have to
    dynamically add the buttons as children to be able to access them
    with actionscript.
    Thanks!

    From inside a movieclip you can talk to the _parent object/timeline using "_parent" to target it.  So if you wanted to tell the _parent to move to a certain frame, inside the movieclip you could use...
    _parent.gotoAndStop(some frame);
    Or if there was a function in the _parent you could use...
    _parent.someFunction();
    or maybe...
    _parent.someFunction(RoXYZ); // passing the RoXYZ variable as an argument
    And if you needed to target the main timeline from inside some buried movieclip, you can use _root instead of _parent.

  • Initiating Photoshop CS4 batch from Bridge sometimes ignores RAW xmp settings

    This happens a lot using both my work PC (XP 64) and home PC (Vista 64), but not always...and I have not been able to track down exactly how to fix this.
    What happens is I try to launch a batch process for RAW photos taken with my Canon EOS 5D Mark II (develop settings already set in xmp files using Adobe Camera RAW from Bridge). The actions in the batch process execute correctly, but the resulting files appear to have completely ignored my ACR develop settings. This happens if I launch the batch process in either version of Photoshop CS4 (64 or 32 bit).
    My only solution is to carefully watch Photoshop as files get loaded by the batch process and abort the batch if one opens without the correct develop settings (not always easy to discern...sometimes I have to wait for the process to save the file so I can toggle back and forth between the images in Bridge). I then restart Bridge and/or Photoshop until I can start a batch process that opens the image correctly. Once a single file has opened with the correct settings, subsequent files open as expected...so the rest of the batch process will complete.
    Has anyone else seen this phenomenon? This is really annoying as it never happened to me in CS or CS2.

    This happens a lot using both my work PC (XP 64) and home PC (Vista 64), but not always...and I have not been able to track down exactly how to fix this.
    What happens is I try to launch a batch process for RAW photos taken with my Canon EOS 5D Mark II (develop settings already set in xmp files using Adobe Camera RAW from Bridge). The actions in the batch process execute correctly, but the resulting files appear to have completely ignored my ACR develop settings. This happens if I launch the batch process in either version of Photoshop CS4 (64 or 32 bit).
    My only solution is to carefully watch Photoshop as files get loaded by the batch process and abort the batch if one opens without the correct develop settings (not always easy to discern...sometimes I have to wait for the process to save the file so I can toggle back and forth between the images in Bridge). I then restart Bridge and/or Photoshop until I can start a batch process that opens the image correctly. Once a single file has opened with the correct settings, subsequent files open as expected...so the rest of the batch process will complete.
    Has anyone else seen this phenomenon? This is really annoying as it never happened to me in CS or CS2.

  • Button inside MovieClip don't work...?!

    Hello,
    I\m traying to create AIR for Android app & I have 2 MovieClips in the main timeline the first in frame 35 and the second in frame 99 with the name of quary_mc. Inside the second movieclip there is a button with the name of sID_btn. When i addEventListener in frame 1 of the  main timeline it display:
    Error #1009: Cannot access a property or method of null object reference
    This is the code:
    quary_mc.sID_btn.addEventListener(MouseEvent.CLICK, displayData);
    function displayData(evt:MouseEvent):void
              trace("Hello");
    Regards,

    You will be unable to add the event listener to the button until frame 99 when it actually exists.
    Alternatively, you can just add the button on frame 1 at an alpha of 0 and then set it to 1 at frame 99. However, it will still get mouse input so you will need to set quary_mc.visible = false on frame 1 and quary_mc.visible = true on frame 99 to solve that issue.

  • Indexing instances of specific class inside MovieClip authored with Flash Pro

    Hi there.
    I'm writing a class that extends MovieClip and that is linked to the MovieClip Object authored via Flash Pro during development (Father object).
    The hierarchy of this MovieClip Object is hidden from me - everything I know is that it may contain instances of other Class that was authored during development and extends MovieClip in the same manner (Son objects).
    I have no information regarding names or hierarchical positions of these Son objects inside Father object.
    Now the question is: how to get them listed?
    So approach I've taken was to implement current events:
    public class Son extends MovieClip
         public static const INITIALIZED : String = "son_initialized";
         public function Son ()
              this.dispatchEvent (new Event (INITIALIZED));
    public class Father extends MovieClip
         public var son : Vector<Son>;
         public function Father ()
              son = new Vector<Son> ();
              this.addEventListener (Son.INITIALIZED, this.onSonInitialized);
         public function onSonInitialized (event : Event)
              this.son.push (event.target);
    Well, this code compiles with no errors whatsoever, but it turns out that onSonInitialized gets never called. I assume that's because children constructors are called ahead of their parent one.
    Is there any way to get them listed?
    Thanks in advance.

    kglad,
    I'm trying to get an array of references to Son objects (Son extends MovieClip), randomly located deep inside display list hierarchy of Father object (extends MovieClip too).
    The Father movieclip is authorized in Flash Professional and is a black box for me - I can only manipulate Father.as and Son.as.
    Since I can't know exactly their pathes and names (i.e. father.child1.child5OfChild1.son32 for example), I decided to make them self-aware, dispatching event during construction time, messaging everybody that this instance of Son exists:
    public function Son ()
         this.dispatchEvent (new Event (INITIALIZED));
    And then I attached a listener inside Father's constructor:
    public function Father ()
         this.addEventListener (Son.INITIALIZED, this.onSonInitialized);
    The idea was that this event listener should have been catching all the Sons, located inside Father. But it doesn't work that way - Father's constructor seems to be called after all constructors of its children, so this event listener catches nothing.
    I've worked this around by straightforward display list traversing - it works, but doesn't look so elegant. May be there is still a way to make it work through events?

  • TextInput inside MovieClip

    Hello,
    I am creating a game pretty much like jeopardy. What is
    happening is that you click on the number value you want, like 100
    for example. When it gets clicked on, there is a tween that occurs
    and then the question appears on the screen along with all of the
    contestant names.
    If one of the contestants knows the answer, the 'host' clicks
    on their name. I won't go any deeper than that. I can get the names
    to appear in as text, but it will not appear inside of a movieclip.
    Attached is my code.
    Any help would be greatly appreciated.
    Thanks
    Doug

    all your movieclips have the same instance name. fix that.
    and use the following to reference your textfields:

  • Dynamic text is inside movieClip

    I am working on flash & AS file, in flash file (main.fla) dynamic text is inside that movieClip (myButton) .I will like to send some text to that particular dynamic text field inside the movieClip (myButton) from AS file
    as file code is
    var myButton:Button;
    var myText:text;
    myButton.myText.text="Custom Msg";
    I import .as file in flash but it is not showing can anybody help me?

    This is working fine but my problem is that, in my another application I am importing the class from as file in that as file I have one loop
    if(errorCode == 0){
             trace("welcome ");
             mc.myText.text="Custom Msg";
              }else{
                 trace("Error loging in to Server Error Code : "+ errorCode)
    It will trace message properly
    my problem is that I will like to put "Custom Msg" in dynamic text which is in MovieClip (mc) of fla file, how could I go wtih this ?
    If I include same as file in flash It will shows as error
    1037: Packages cannot be nested. What the solution for this ?

  • Why do tabs and windows sometimes ignore the keyboard shortcut (CMD+W)? I keep having to go to File Close Tab

    Tabs in Firefox seem to ignore my commands sometimes, seemingly on random. Maybe more so when the tab contains a video, although I could be mistaken.
    I'm using a 13-inch, Mid-2009 Macbook Pro running OSX 10.10.2 (the latest build.), but this also happens on my stepdad's 17-inch, Early-2008 Macbook Pro as well.

    I think the most common reason would be a plugin intercepting the keyboard. This can happen if you use the controls on a Flash video, for example.
    ''This is copy/pasted from an old post:''
    Over the past couple of years, users have noticed that the Flash player on YouTube was particularly "sticky" or tenacious when it came to capturing keyboard focus.
    Last time I looked into this, about a year ago, I posted this summary of previously mentioned workarounds:
    (1) Full screen the video and then switch back
    press f then Esc - focus will move back to the page
    (2) Switch to another application window and then back {WINDOWS}
    press Alt+tab then Alt+tab - focus will move back to the page
    (3) Click on a different tab then click back - focus will move back to the page
    Some users also reported that the YouTube player behaves normally (i.e., clicking the page regains control) if you disable the Flash Player plugin's protected mode feature. There is now a hidden preference for this:
    (A) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (B) In the search box above the list, type or paste '''flash''' and pause while the list is filtered
    (C) Double-click the '''dom.ipc.plugins.flash.disable-protected-mode''' preference to switch its value from false to true.
    This might not take effect until all Flash has been unloaded for a few minutes, or you close Firefox.

  • Class Inside MovieClip Giving Runtime Error

    Hey guys.
    I'm trying to place an instance of a movieclip (instance
    name: tehMovieClip) from the library within another movieclip
    (instance name: parentMovieClip) on the stage. tehMovieClip, the
    movieclip going inside another movieclip, belongs to a class called
    CollisonDetection (linkage properties, class:CollisonDetection,
    Base Class: flash.display.MovieClip). When I put tehMovieClip
    inside parentMovieClip, I get this runtime error:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    If I just place tehMovieClip on the stage by itself, it works
    fine but I need it to be inside parentMovieClip. So what should I
    do?
    Just for your information, CollisonDetection extends the
    project's DocumentClass which extends MovieClip.
    Thanks in advanced!

    Thanks for that buddy.
    quote:
    Originally posted by:
    SwapnilVJ
    Is the movie clip your are placing linked from library to a
    class?
    The movieclip in question (the one I am placing inside
    another movieclip) is linked to a class.
    quote:
    Originally posted by:
    SwapnilVJ
    If yes. Is the Class linked to the movieclip have a
    Constructor method with parameters?
    Well this is my current constructor:
    public function CollisonDetection() {
    playerRefFromCollisonDetection.x = 600;
    Now that you've said that, I deleted that middle line and it
    seemed to work
    quote:
    Originally posted by:
    SwapnilVJ
    If Yes. you found the problem.
    And solution will be to update the class' constructor to have
    no parameters.
    Thanks buddy, but what if I need to have statements inside
    the constructor such as triggering methods/functions inside the
    class?

  • Loaded video inside movieclip

    Hi everybody,
    I'm working with several videos each inside their own movieclips. When I click my forward button to jump to the next video I get the second
    video playing over the first one especially towards the end part of the first video. I can play and stop the movies just fine but it's the gotoAndPlay that's causing me problems right now with forwarding and rewinding clips.
    Hope my explanation was clear cause I'm just starting out with AS3
    Here's the code if it can be useful,
    Any help would be appreciated.
    import fl.video.*;
    navbar.visible = true;
    navbar.addEventListener(MouseEvent.MOUSE_OVER, showmenu);
    function showmenu(e:MouseEvent):void{
            navbar.alpha = 1;
    navbar.addEventListener(MouseEvent.MOUSE_OUT, hidemenu);
    function hidemenu(e:MouseEvent):void{
            navbar.alpha = 0;
    navbar.next_btn.addEventListener(MouseEvent.CLICK, nextButtonClick);
    navbar.prev_btn.addEventListener(MouseEvent.CLICK, previousButtonClick);
    navbar.play_btn.addEventListener(MouseEvent.CLICK, playButtonClick);
    navbar.stop_btn.addEventListener(MouseEvent.CLICK, stopButtonClick);
    navbar.menu_btn.addEventListener(MouseEvent.CLICK, menuButtonClick);
    function stopButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.stop();
    delay1.stop();
    else if (delay2)
    delay2.Video2.stop();
    delay2.stop();
    else if (delay3)
    delay3.VidDesign3.stop();
    delay3.stop();
    else if (delay4)
    delay4.VidDesign4.stop();
    delay4.stop();
    else if (analysis1)
    analysis1.VidDesign5.stop();
    analysis1.stop();
    else if (analysis2)
    analysis2.VidDesign6.stop();
    analysis2.stop();
    else if (analysis3)
    analysis3.VidDesign7.stop();
    analysis3.stop();
    stop();
    function playButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.play();
    delay1.play();
    else if(delay2)
    delay2.VidDesign2.play();
    delay2.play();
    else if(delay3)
    delay3.VidDesign3.play();
    delay3.play();
    else if(delay4)
    delay4.VidDesign4.play();
    delay4.play();
    else if (analysis1)
    analysis1.VidDesign5.play();
    analysis1.play();
    else if (analysis2)
    analysis2.VidDesign6.play();
    analysis2.play();
    else if (analysis3)
    analysis3.VidDesign7.play();
    analysis3.play();
    play();
    function previousButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.stop();
    delay1.stop();
    else if (delay2)
    delay2.Video2.stop();
    delay2.stop();
    gotoAndPlay("delay1");
    else if (delay3)
    delay3.VidDesign3.stop();
    delay3.stop();
    gotoAndPlay("delay2");
    else if (delay4)
    delay4.VidDesign4.stop();
    delay4.stop();
    gotoAndPlay("delay3");
    else if (analysis1)
    analysis1.VidDesign6.stop();
    analysis1.play();
    else if (analysis2)
    analysis2.VidDesign7.play();
    analysis2.play();
    gotoAndPlay("analysis1");
    else if (analysis3)
    analysis3.VidDesign7.stop();
    analysis3.stop();
    gotoAndPlay("analysis2");
    gotoAndStop(currentFrame - 250);
    function nextButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.stop();
    delay1.stop();
    gotoAndPlay("delay2");
    else if(delay2)
    delay2.VidDesign2.stop();
    delay2.stop();
    gotoAndPlay("delay3");
    else if (delay3)
    delay3.VidDesign3.stop();
    delay3.stop();
    gotoAndPlay("delay4");
    else if (delay4)
    delay4.VidDesign4.stop();
    delay4.stop();
    else if (analysis1)
    analysis1.VidDesign5.stop();
    analysis1.stop();
    gotoAndPlay("analysis2");
    else if (analysis2)
    analysis2.VidDesign6.stop();
    analysis2.stop();
    gotoAndPlay("analysis3");
    else if (analysis3)
    analysis3.VidDesign7.stop();
    gotoAndStop(currentFrame + 250);     
    function menuButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.stop();
    else if (delay2)
    delay2.stop();
    else if (delay3)
    delay3.stop();
    else if (delay4)
    delay4.stop();
    else if (analysis1)
    VidDesign5.stop();
    else if (analysis2)
    VidDesign6.stop();
    else if (analysis3)
    VidDesign7.stop();
    gotoAndPlay(1);

    if the videos are removed from the stage when you change frames you can use a removed_from_stage listener to stop each video.

  • Inside movieclip script?

    Hey, I am wondering how I can use a script inside a movieclip outside the movieclip, for an example. The first frame in the movie clip:
    var RoXYZ
    RoXYZ = 3.14;
    And outside the movieclip it's:
    circle._visible = true;
    RoXYZ = 3.1415926535
    if(RoXYZ == 3.14){
    circle._visible = false;
    What i am trying to do is that if the movieclip reaches a specific frame a script is triggered. Is this possible?

    From inside a movieclip you can talk to the _parent object/timeline using "_parent" to target it.  So if you wanted to tell the _parent to move to a certain frame, inside the movieclip you could use...
    _parent.gotoAndStop(some frame);
    Or if there was a function in the _parent you could use...
    _parent.someFunction();
    or maybe...
    _parent.someFunction(RoXYZ); // passing the RoXYZ variable as an argument
    And if you needed to target the main timeline from inside some buried movieclip, you can use _root instead of _parent.

Maybe you are looking for

  • Anyone having problems with 4s after upgrading to the 5.0.1 Software

    My iphone 4s was working perfectly fine before i upgraded to the 5.0.1 software. Now i cant make calls or receive. Everytime i try to make a call its say " Call fails" and then its searches to connect to the network. I have tried restoring it 3 time

  • The Future of Flash

    In light of the recent announcement of continued support and upgrades for Flash, I've been thinking more about the future of Flash in the new HTML 5 oriented climate, with more browsers shunning the use of Flash, particularly on the mobile platforms.

  • Business Service (vs) Business System in Integration Directory.

    Hi to all, I want to know the best practice for using Business Service and Business System, Then When we should go for Business Service instead of Business System in Integration directory? Can any one give me suggestion for me . Thanks, Vikram.C.

  • Streaking of graphic on screen but prints ok

    When converting a postscript or encapsulated postscript file to a pdf with Distiller versions 5 or a trial version 8, there is streaking (which looks like rays from one end of the graphic to the other) shown on the screen. But when it prints, the har

  • What are credentials/tokens needed to connect to FMS

    I'm trying to connect to FMS with Wirecast and keep getting this error Cannot publish the stream. Verify the stream name and if you have provided any credentials/tokens that they are up to date. [-4020]that they are up to date. and of course, can not