Reaching a movie on the stage from inside another movie clip

I'm trying to reach a body of text which i turned into a movie clip which is on the main stage, and have it scroll up/down whenever it rolls over the designated hot spots. Here's what i have.
stage.addEventListener(MouseEvent.MOUSE_MOVE,down1,false,0,true);
function down1(e:MouseEvent):void {
     if (mouseX>=0 && mouseX<=42 && mouseY>111.1 && mouseY<146.1) {
          stage.addEventListener(Event.ENTER_FRAME,scrolldown1);
     } else {
          stage.removeEventListener(Event.ENTER_FRAME, scrolldown1);
function scrolldown1(e:Event):void {
     if(MovieClip(this.root).resume_txt.y > 219) {
          MovieClip(this.root).resume_txt.y += 5;
     } else {
          this.removeEventListener(Event.ENTER_FRAME, scrolldown1);

Can you explain the purpose bhind these lines...
     if(MovieClip(this.root).resume_txt.y > 219) {
          MovieClip(this.root).resume_txt.y += 5;
It seems as though if it is >219, it will move until the mouse moves out of the region.  Is there any specific aspect of it that you can pinpoint as not woking?.

Similar Messages

  • Flash CS4 Link to a Movie Clip from inside another Movie Clip

    I am working on a Flash CS4 project which has 5 buttons with 5 corresponding movie clips all on the main timeline. Everything in functional so far.
    My problem is this: I want to be able to mouse click on a particular word in the text inside movie clip 4 ("mc4") and have it link to movie clip 3 ("mc3") (on the main timeline).
    I've tried many things, and I can't get it working.
    I have tried to highlight the word then link it to "mc3" in the properties panel where it says link (I successfully linked to an email address and to an outside website in other parts of the project)....
    I tried to link it in the properties panel to "mc3", I tried & "parent.mc3", "root.mc3";
    Linking it this ways seems to be the simplest, logical thing to do, but I don't know what kind of prefix it needs.
    Then, I tried making the word (inside mc4) an invisible button (button6) then linking it to the mc3, with it's actionscript in the main timeline with the other button functions.
    I tried duplicating mc3 and duplicating invisible button 3 and moving it's hotspot to over the word.
    I tried putting a copy of mc3 and the button inside mc4, with the actionscript also inside mc4.
    I tried duplicating mc3 and calling it mc6, and putting that inside mc4, with the actions back on the main timeline, and tried again with the actions inside mc4.
    I tried with mc6 and invisible button 6 on the main timeline, but that doesn't seem possible.
    I tried using this code from Adobe Actionscript 3.0:
    button6.addEventListener(MouseEvent.CLICK, startMovie);
    function startMovie(e:MouseEvent):void
            this.play(&quot;mc6&quot;); [and I also tried with &quot;mc3&quot;]
    Nothing works!! Please, I would appreciate any suggestions!!
    Thanks,
    Suzanne

    If I limit my attention to the second sentence of your posting, then I suggest the following (borrowing from the rest of your posting)...
    If that invisible button6 is inside MC3 (on MC3's main timeline), atop the word you are trying to link to the movieclip, and you just want to make mc4 play by clicking that invisible button6, then assign the following code to the button6 inside MC3...
    button6.addEventListener(MouseEvent.CLICK, startMovie);
    function startMovie(e:MouseEvent):void
            MovieClip(this.parent).MC4.play();
    If I missed, then I missed following your explanation.

  • Referring to functions on the stage from a movieclip.

    First of all, I'd like to thank you to anyone who takes their time to read this. I registered to this forum for the sole purpose of getting help to this one issue of mine, as I found most issues were solved in here. By reading my problem (and hopefully responding) you're doing me a huge favour. Thanks in advance.
    I just started "coding" in AS3. By "coding", I actually mean trying around with features and generally trying to grasp the vast amount stuff you can do with this software of. I have some coding experience, however the way   Flash likes to hide code snippets all over my project does tend to confuse me. Not knowing where I tried putting the code and/or rewrote some other stuff keeps me sorta busy.
    I'd also like to apologize for the title, if it in any way confuses you. Shortening down my problem to a single sentence was hard, please keep that in mind.
    Anyway, my issue is this:
    Messing around with movieclips inside movieclips, I've keep encountering the error "1120: Access of undefined property onTimerComplete." I do realize that this error generally is caused by not having defined an instance correctly or not having it defined at all - an error beginners tend to make.
    Nonetheless, I'm not trying to refer to an instance/symbol, I am trying to call a function defined on the stage from within a movieclip that also is placed on the stage.
    I've been reading huge amounts of text/articles and how-to 's, but they all seem to only touch the subject lightly or simply going in head-first - becoming far too complicated for me (a beginner) to grasp.
    So, trying to sum my questions up into something that looks like a tl;dr:
    - What's up with levels, "_root" and referring to functions like in the older versions of flash?
    Flash tells me to use some display-package instead of _root, when I use that... (I do realize the article is from Flash 5.0)
    - How do you refer to a function defined on the stage, from inside a movieclip? (The function is a timer, that is supposed to make the mother-movieclip continue to the next child-movieclip.)
    Please, I really don't know how to define my problem any further than this. Ask as many questions as you would like, I really appreciate any help I can get.
    - Mattimussi

    click file/publish settings/flash and tick "permit debugging".  highlight the line number referenced in the error message.  (and, use:
    Calling:
    stop();
    MovieClip(root).startTimer();
    Defining:
    var myTimer:Timer = new Timer(2000, 1);
    myTimer.addEventListener(TimerEvent.TIMER_COMPLETE,onTimerComplete);
    myTimer.start();
    function onTimerComplete(event:TimerEvent):void{
    play();
    //myTimer.stop();
    function startTimer():void{
    trace("startTimer function was executed");
    myTimer.start();

  • Accessing buttons on main stage from inside of a movie clip

    Greetings...
          here is the scenario:
                 - I have buttons on main stage, and a swf file which is loaded to scene using a LOADER in AS3
                 - this is a website, so the problem rises when user moves its cursor around the page and now  buttons in main stage,
                    are still active since they are behind the loaded swf file.
                 - i would like to learn, how can i CODE inside the loaded SWF file, to either remove the buttons in main page, or remove
                    the event listeners. not sure if my case has anything to do with .Parent or .roo, (I want to access those main stage
                    buttons from the SWF file which is loaded)
                 - The general case is, i have SWF files loading inside another SWF files, is it possible to access items on each stage from
                    inside of loaded SWF files on that specific stage. Similarly i would be interested to learn about accessing main stage from inside
                    of movieclips running on stage. how can i access something not in present FLA file yet, in FLA file that is loading the page as SWF.
                    Thanks.

    If you load an swf into another using the Loader class, then the Loader itself is the parent of the loaded swf., so MovieClip(parent.parent) might help you to target the timeline that the Loader was born from.  The more proper way to have a loaded file talk to a parent file is thru dispatching events that the parent assigns listeners for after the file has loaded.  Here's a link to a posting that might help explain how to implement this.
    http://forums.adobe.com/thread/470135?tstart=120
    As for the buttons that you want to disable, you could either use the removeEventListener() method to remove the listeners you have assigned, or you could set their mouseEnabled property to false, or you could set their visible property to false.

  • Going Back to the main frame, from inside a movie clip time line.

    In flash CS5 I want to go back to the main time line, from inside a movie clip button, so when i click the the movie clip it goes to another frame on the main time line..
    Can anyone help me?
    Thanks
    Daniel Derrick

    your can use _root to reference the main timeline from anywhere though that can lead to problems if your swf is loaded by another swf.  because of that eventuality, it would be better to use a relative path back to the main timeline.
    so, from a movieclip's timeline (when the movieclip is on the main timeline), you can use _parent to reference the main timeline.
    but even better would be to use no code on that movieclip's timeline and keep all your code on one timeline (the main one).

  • How to target a label on the stage from a loaded composition

    from EdgeCommons I'm using EC.loadComposition to load another website into a container within EA.
    Now, from a button inside this loaded composition I would like to call a stop function to target a label on the main stage of the EA file.
    sym.getComposition().getStage().stop("scene4"); does not work.
    It think it has to go outside of sym because the composition container is actually an iframe.
    Thank you

    Hi,
    I think you may have replied to my post accidentally. I had asked a question regarding javascripts that could target the stage from a symbol, not about coloring book apps.  However I have made one in Flash, here is the page I made (don't laugh, I never finished it).
    http://boogerbunch.com/home.html
    Here is a link to the forum I used to get the Info to build it, I would think the process would be very close in edge.
    http://www.kirupa.com/developer/mx2004/coloringbook.htm
    Good luck!
    >>> scottsalter0 <[email protected]> 3/1/2013 10:29 AM >>>
    Adobe Community ( http://forums.adobe.com/index.jspa )
    Re: How to target a label on the stage from a div embedded in a symbol?
    created by scottsalter0 ( http://forums.adobe.com/people/scottsalter0 ) in Edge Animate - View the full discussion ( http://forums.adobe.com/message/5113759#5113759 ) 
    Hi there,
    I noticed your Edge Colouring Page post on the Adobe Forums.
    For my University work, I need to create a colouring page using Adobe Edge Animate. Is it possible if you could post a tutorial or step-by-step guide on how to do this please?
    Many Thanks
    Reply to this message by replying to this email -or- go to the message on Adobe Community ( http://forums.adobe.com/message/5113759#5113759 )
    Start a new discussion in Edge Animate by email ( mailto:[email protected] ) or at Adobe Community ( http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=4823 )

  • Attach a movieclip from the main timeline inside another movieclip.

    I need help with the game I am working currently. On the main timeline Actions frame I have a loader class called myLoader. I attached that to a movieclip called currentSWF. I have a movieclip called SpinningCard in the library which I dynamically attached to the stage. Inside the SpinningCard movieclip there is another movieclip Card. In the Card movieclip I have 10 frames and on each frame I want to attach a different instance of the movieclip currentSWF. How can I do achieve that?
    here's what I have till now...
    On the main timeline Actions frame...
    var loader:Loader=new Loader();
    loader.load(new URLRequest("CardGraphics.swf"))
    var currentSWF:MovieClip;
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
       function swfLoaded(e:Event):void {
       currentSWF = MovieClip(loader.contentLoaderInfo.content);
       addChild(currentSWF);
    Inside the Card movieclip on the first frame I have this code...
    var a1:MovieClip = MovieClip(parent.parent.getChildByName('currentSWF'));
    CardFrame1.addChild(a1);
    //CardFrame1 is an empty movieclip which is there on the frame 1 of Card Moveiclip.
    I am getting error : Parameter must be non-null. How can I solve. Can anyone please help me.

    Hi Nabren
    I'm also looking to load a library based movie-clip into a stage based movie-clip, so that I can inturn swap it with other movie clips to act as different pages (page2_mc etc) which will be used in different sections of the application to give chapters as such.
    I've had a go at the above but can't get a result, though it did not throw an error. I also had a trace() on each side and both of those triggered.
    The stage based mc I called pageMC and the content mc I called content the same as your example
    trace('loader - cx');
    var loader:Loader=new Loader();
    var pageMC:MovieClip;
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
    function swfLoaded(e:Event):void {
    pageMC = MovieClip(loader.contentLoaderInfo.content);
    pageMC.name = "pageMC";
    addChild(pageMC);
    trace("Menu 4");
    I'd appreciate some assistance. I would like to use internal MC's as I want to put the application to iOS and Android and believe by using movieclips I should be able to have some code with them whereas importing swf's I can't.
    Thanks

  • How do I move all the photos from the i-photo library on one account to the i-photo library on another account?

    I have recently bought a new mac mini running Lion, and yesterday I migrated an account off an older machine running Tiger.
    I want to delete the older account from this machine as it is causing some problems with i-cloud, but I want to transfer the photos first and add them to a different account on the new computer.
    So my question is How do I move all the photos from the i-photo library on one account to the i-photo library on another account?

    Copy the iPhoto library from the old Mac to the Desktop of the new one.  Then download the paid version of  iPhoto Library Manager, which is now compatible with Mt. Lion, and use it to merge the two libraries into a new, third library.  This will preserve the two libraries in case the merged library isn't to your liking. 
    Here are screenshots of iPLM's coping and merging preferences:
    When you're satisfied that the new, merged libraray is complete and working OK you can delete the two earlier libraries.
    OT

  • How can i move all the song from my iPod to my new mac pro laptop?

    how can i move all the song from my ipod touch to my new macbook pro?

    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
      Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • How do I send a purchased movie to the iCloud from my Windows pc please?

    I have been trying without success to send purchased movies in my iTunes account to the iCloud to free up space on my laptop.
    Every time I try the movie is deleted, literally gone.
    What am I doing wrong please and how do I move a movie to the iCloud from my pc and vice versa?
    I am in the UK if that is relevant.

    Movie rental FAQ
    http://support.apple.com/kb/HT1657
    Purchased movies FAQ
    http://support.apple.com/kb/HT1906

  • Stop the playhead from inside a movieclip

    I am trying to stop the playhead from within a movie clip and when I test the scene (the movieclip) it works but when I test the main timeline scene, it stops the frame within the movie clip but continues on the main timeline.  On the frames that stop I am using a script that will allow it to continue when the space bar is pressed. How can I stop it on the main timeline, and within the movie clip at the same time?
    Is their a way to do something like _root.stop(); or something?

    Have a question about the _root.stop().
    I have a pause and play feature in a flash player so the user can stop the presentation along with all the voiceover that streams with the presentation.
    I used the _root.stop() in the flash player hoping it will stop the main timeline, but also the embedded movieclip timeline. It stopped the main timeline,  but not the other one.
    How do I stop both timelines at the same time? the _root.stop() was not working for me.
    Thank you, Brian

  • TS1702 i downloaded advance cinema app from tha app store, but everytime i click on a movie, it takes me to the IMDB website and im not able to watch the movie. The app promises 4000 free movies, but not able to watch any new movies...

    i downloaded advance cinema app from tha app store, but everytime i click on a movie, it takes me to the IMDB website and im not able to watch the movie. The app promises 4000 free movies, but not able to watch any new movies...

    I have found the issue. I have not found an answer to the prob. I have put in a case with customer service. If it doesn't work right, I need my money back!!!

  • Trying to show() and play() a symbol from inside another symbol

    Hi Everyone !
    I'm running into a problem which is getting me crazy.
    I have the following case :
    - 1 symbol (_Page_Background) containing an animation with the following trigger @0s :
    // Hiding the symbol
    sym.getParentSymbol().$("_Page_Background").hide();
    // Stop it
    sym.stop();
    - 1 element (B_TOYS), inside of a symbol (BUTTONS) with the following "click" trigger :
    // Showing the _Page_Background symbol
    sym.getComposition().getStage().getSymbol("_Page_Background").show();
    // Start playing it
    sym.getComposition().getStage().getSymbol("_Page_Background").play("INTRO");
    The Symbol _Page_Background starts hidden, like it should. But when I click on the button (B_TOYS), nothing happens. Although, everything was working correctly before I turned my buttons into symbols ..
    I guess the problems lies with the "show()" function, because I have other buttons that work properly but they don't show/hide anything, they just play()
    Am I missing something ?!
    Thanks in advance for your kind help !

    Hi Dimitri,
    Think of symbols as independent timelines that can contain other elements, or instances of other symbols. The Stage/main timeline is a symbol as well. Scripting calls are scoped to the symbol that the script is in. The keyword sym stands for the symbol that you're in with the script.
    So if your script is at the same level as what you are targeting with it:
    Use sym.$("elementName") to access an element's properties
    Use sym.getSymbol("symbolName") to access a symbol's timeline. If there's another symbol inside that symbol that you want to access, you'd use sym.getSymbol("symbolName").getSymbol("childSymbolName")...that's only two levels deep, but you can go as deep as needs be.
    If you're trying to access an element in a symbol, you'd combine these two, such as sym.getSymbol("symbolName").$("elementName")
    When your script is within a symbol and you want to access an element or symbol outside of the symbol timeline:
    Use sym.getParent() to get to any elements that are in the parent symbol (the symbol which contains the symbol you're calling from), which could be the Stage or could be another parent symbol
    Use sym.getComposition().getStage() from any symbol level to access things at the main Stage level.  You can also dive into a symbol on the Stage from any symbol using sym.getComposition().getStage().getSymbol("symbolName").
    All is explained in detail here:
    http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html
    hth,
    Joe

  • Accessing display object on the stage from another class

    I've googled this to no avail, I've only found how to manipulate the stage itself and not a display object on it, and I'm noob enough to not be able to figure it out from there. :/
    I have a movie clip on the main timeline with instance name displayName. I created a button that should change what frame displayName goes to (in order to...did you guess it?! diplay the Name of the button. Awesome. )
    So I am trying to write the code in a reusable fashion and have the buttons all linked to a class called GeoPuzzle. Inside GeoPuzzle I instantiate a touch event and run the code. However, the function has to be able to change displayName in the main part of the timeline and, of course, the compiler says displayName doesn't exist because I'm in a class and I'm talking about the stage.
    Here is the simplified code in the class:
    package  com.freerangeeggheads.puzzleography {
        import flash.display.MovieClip;
        import flash.events.TouchEvent;
        public class GeoPuzzle extends MovieClip {
            //declare variables
            public function setInitial (abbrev:String, fullName:String, isLocked:Boolean):void {
                //set parameters
                this.addEventListener(TouchEvent.TOUCH_BEGIN, geoTouchBeginHandler);
            public function GeoPuzzle (): void {
            public function geoTouchBeginHandler (e:TouchEvent): void {
                   e.target.addEventListener(TouchEvent.TOUCH_END, geoTouchEndHandler);
                   //some other methods
                   nameDisplay.gotoAndStop(e.target.abbrev);
            public function geoTouchEndHandler (e:TouchEvent): void {
                //some other methods
               nameDisplay.gotoAndStop("USA");
    The lines in bold are my problem. Now this code doesn't actually execute as is so if you see an error in it, yeah, I have no idea what the problem is, but it DID execute before and these lines still gave me trouble so I'm trying to troubleshoot on multiple fronts.
    How can I tell displayName to change it's current frame from within display object class?
    Thanks!

    if displayName is a GeoPuzzle instance, use:
    package  com.freerangeeggheads.puzzleography {
        import flash.display.MovieClip;
        import flash.events.TouchEvent;
        public class GeoPuzzle extends MovieClip {
            //declare variables
            public function setInitial (abbrev:String, fullName:String, isLocked:Boolean):void {
                //set parameters
                this.addEventListener(TouchEvent.TOUCH_BEGIN, geoTouchBeginHandler);
            public function GeoPuzzle (): void {
            public function geoTouchBeginHandler (e:TouchEvent): void {
                   e.target.addEventListener(TouchEvent.TOUCH_END, geoTouchEndHandler);
                   //some other methods
                   this.gotoAndStop(this.abbrev);
            public function geoTouchEndHandler (e:TouchEvent): void {
                //some other methods
               this.gotoAndStop("USA");

  • How can i move all the music from my playlist on my ipod onto...

    OK, I have a 4G 20GB ipod that has reached its capacity...I have upgraded to the 5G 60GB video...I want to move my entire playlist from my old ipod onto the new one. I tried to click and carry the playlist onto the itunes playlist but I cannot?

    I feel I've explained plenty what you must do but you aren't getting it.
    All music on your old iPhone should be in your iTunes library on your computer. Transfer the music from your iTunes library on your computer to your new iPhone in the same way it was transferred from your iTunes library to your old iPhone - via the iTunes sync/transfer process.
    Since you prefer the manual way, you must manually drag and drop the same 377 songs from your iTunes library to your new iPhone - in the same way the 377 songs were manually transferred from your iTunes library to your old iPhone.
    Or you can sync which provides more options overall. Create an iTunes playlist for the 377 songs. Select Sync Music under the Music tab for your iPhone sync preferences with iTunes and choose selected playlists, artists, albums, and genres. Select the iTunes playlist below that includes the 377 songs followed by a sync.  

Maybe you are looking for

  • Windows look and feel instead, in InternalFrameDemo.java

    Hi all, I am learning swing and I am trying to modify the InternalFrameDemo.java source from http://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html#InternalFrameDemo My idea is to add the line JFrame.setDefaultLookAndFeelDecora

  • Can't Restore - 4th Gen iPod

    I have a 4th generation iPod. I had a song start to skip one day and the next time I tried to connect to my computer iTunes did not recognize my iPod. I've gone through all the suggested steps on the website even up to and including uninstalling/rein

  • Here drive can't display route offline

    If i navigate to a gps coordinate within here drive on my lumia 820 it shows the destination on the map. When i hit thr drive to button (not sure if this is the english name for the button, i use the dutch version) it says "can't show the route offli

  • E-mails too small to read....

    how do i fix e-mail lettering that is too small to read.....!!!!!?????

  • Mass Reversal of CO Documents

    I know transaction KB17N reverses a CO document but is there a CO transaction that does mass reversals?  If so, what is the transaction?