LoadMovie from inside a movieclip question

I have a scroll movieclip which contains 15 buttons each button is an instance of 1main button. I have the button frame inside the timeline of the movie clip and the actions in frame 1 of the clip.
onrelease should call the loadMovie function and load another. swf in level 1
btn_1.onRelease = function()
this._root.loadMovie("crossings.swf");
btn_2.onRelease = function()
this._root.loadMovie("breath.swf");
it only works using LoadMovie not LoadMovieNum but instead of loading the swf into level 1 it loads into level 0
i can use this the way it is but why is it only loading in level 0?
rdred

OK I see what happened.
main.swf loads movie1.swf (level1) from a button (works)
movie1.swf has button that loads movie2.swf (level2) (works)
problem now is I will need to unload movie2.swf (level2) with a 
button  so movie1.swf (level1) is visible again
I tried the following actions in a button in movie2.swf (level2)
on (release) {
this._root.unloadMovieNum(2);
on (release) {
unloadMovieNum(2);
both do not work, what am I doing wrong?

Similar Messages

  • Calling a variable from inside a movieclip AS3 in Flash CS4

    I am trying to trace a variable string from inside a movieclip which is inside another movieclip on the main timeline using:
    trace(VariableString);
    and also
    trace(stage.VariableString);
    Neither work
    The variable is an input textfield and traces fine when it is on the main timeline but will not work from inside the movieclip. I am using Actionscript 3 in Flash CS4.
    I appreciate this has probably been discussed previously on this forum but I cannot find a difinitve answer that seems to work.
    Thanks

    Thanks for the reply. However this did not seem to work.
    I think I had better explain a little better.
    On Keyfrme1 I have a MovieClip1 containing a text input component. I have created a variable on keyframe 1 using:
    var VariableString1:String = new String();
    When clicking on a seperate button this happens:
    VariableString1 = MovieClip1.text;
    I can trace this correctly on the main timeline using:
    trace(VariableString1);
    However, if I try to trace this from  another keyframe inside a movieclip2 which is inside another movieclip3 using:
    trace(MovieClip1(root).VariableString1);
    I just get the error 1180 call to a possibly undefined method MovieClip1
    Sorry if this is not very clear but I am getting very confused with this.
    Thanks again

  • Referencing a button on main stage from inside a movieclip

    I am banging my head against the wall on this.
    On the main stage I have a button that I have made invisible once the file is loaded.  Inside a movieclip I have on frame 15 the following actionscript 3 code
    button_mc.visible = true;
    I want the button to become visible at the end of this movieclip.  I am not using an external as3 file, I am putting the as3 code in its own layer on the first frame.
    I know it has something to do with the path to the button, but I cannot figure it out.  If there is anyone who can point me in the right direction for referencing instances by instance name that reside on the main satge from inside a movieclip I would be very grateful.
    Thanks
    Thepopguy

    Try:
    MovieClip(this.parent).button_mc.visible = true;

  • AS3 loading external swf files with buttons from inside a movieclip

    In my main .swf I have labels on the timeline, navs for those btns are on the first frame of the AS layer and each button sends the playhead to a different frame.
    On one frame called fr1 there is an mc called mc_1 that appears on stage when the playhead stops there. Inside mc_1 are a set of navigation buttons that need to call external .swfs.
    Do I add event listeners on the last frame of mc_1 for each button?
    how do I call the loaders for the swfs on the buttons since the swfs will load on the main timeline NOT the mc_1 timeline?
    So label on main timeline called fr1 will load external1 swf , on fr10 external 2.swf will load and so on.
    any help?

    The code for that button's event listener needs to be placed wherever it has direct access to the button.  Not necessarily on the same timeline, but in a place where both the button and the code are present at the same time.
    The code could be placed at the frame in the main timeline where the movieclip with the button(s) is, targeting the buttons via the movieclip (mc.button.addEvemtListener...) , unless the buttons are somewhere down the timeline of that movieclip.
    If they are down the timeline of that movieclip, then you would need to have the event listener also inside the movieclip, down its timeline where the buttons are finally settled in... being sure to assign instance names to the buttons at every keyframe.

  • 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

  • Play a frame in timeline from inside 2 movieclips.

    Hi. I have tried everything but it just isn't working.
    On my main timeline I have a MC called "rainbow." Inside "rainbow" I have a MC called "greenbow."
    Inside "greenbow" I have a MC called "meetbtn2"
    I want it to play frame 134 on the main timeline when you click "meetbtn2."
    my code inside greenbow is as follows:
    meetbtn2.onRelease = function () {
    _root.gotoAndPlay(134);
    however it doesn't work! is it because i am inside two MC's?
    I have also tried
    _root.rainbow.greenbow.meetbtn2.onRelease = function () {
    _root.gotoAndPlay(134);
    any help? Thanks!

    i believe you miss understood me. the actionscript and the MC are on the same frame on the same timeline.
    however
    on the main timeline: the MC "rainbow" doesn't appear til frame103
    inside "rainbow": the MC "greenbow" doesn't appear til frame 48
    inside "greenbow": the movieclip that acts as the button"meetbtn2" doesn't appear til frame 11
    however all instances have been named correctly and all actionscript is on the same frame-space as its objects....

  • Changing stage timeline from inside a movieclip button

    I create a movieclip button, and I want to change main timeline from it. what should I do ?
    Is it useful to use MovieClip(root).gotoAndPlay(...) ; ?
    Is there any other way to change main timeline?

    Example:
    Add something to trigger the event in the child:
    dispatchEvent(new Event("eventTriggered"));
    In your parent swf, listen for the event using a listener for the child with a corresponding event handler...
    childName.addEventListener("eventTriggered", eventHandler).
    function eventHandler(event:Event):void {
        trace("child dispatched an event");
         // gotoAndPlay(etc);

  • Controlling the root timeline from inside a MovieClip

    [preface] I'll apologize in advance. I'm a designer, not a
    developer. I know very little about actionscript so if you
    can help me out, please pretend like I know nothing.
    [/ preface]
    I just need actionscript to check the value of a variable
    when the end of a movie clip is reached and then call an action.
    Here's what I've got and it doesn't work. Please don't laugh.
    if (p == 1){
    tellTarget (_root) {
    play();
    else if (p == 0){
    stop();
    (the "stop" on the "else if"
    is referring to the movie clip's timeline, not the root
    timeline... in case you're wondering)
    Any help would be greatly appreciated. Thanks!

    No it's not a school project. Good guess though. It's
    actually a self-promo piece for the ad agency I work for. I'm an
    art director expanding my horizons. I would take a class or run
    through one of the good actionscript books but unfortunately, I
    don't have time.
    Thanks for the help again kglad.
    btw, I've used tellTarget successfully in a few projects in
    the last few months. I'm using Flash 8.

  • 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.

  • 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..

  • StageWebViewBridge from inside MovieClip [HELP]

    I'm trying to implement stageWebViewBridge from inside of a movieclip ..   It's generating this issue because stage is null.     Does anyone know how to implement this inside a movieclip ?
    Error: StageWebViewDisk.initialize( stage ) :: You must provide a valid stage instance
    // this is our main view
    var view:StageWebViewBridge;
    //**** STAGE WEBVIEW BRIDGE
    /* init the disk filesystem */
    StageWebViewDisk.addEventListener(StageWebviewDiskEvent.END_DISK_PARSING, onInit );
    StageWebViewDisk.setDebugMode( true );
    StageWebViewDisk.initialize(stage);

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

  • Help (retrieving image name from xml then will be echoed inside the movieclip

    Hello guys, I just want to ask sometihng on how to show the image inside the movieclip by pulling the image name inside the xml file.
    this is my xml file.
    <?php
    header("Content-type: text/xml");
    $host = "localhost";
    $user = "root";
    $pass = "";
    $database = "test";
    $gelo= "image1.jpg";
    /*xml output*/
    $xml_output = "<?xml version=\"1.0\" ?>";
          $xml_output .= "<GALLERY>";
              $xml_output .="<IMAGE>" . $gelo . "</IMAGE>";
         $xml_output .= "</GALLERY>";
    echo $xml_output;
    ?>
    //this is the code inside my actionscript
    stage.scaleMode = StageScaleMode.NO_SCALE;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.TEXT
    loader.addEventListener(Event.COMPLETE, loadCompleteHandler);
    loader.load(new URLRequest("http://localhost/loadimagefromxmlAS3/data.php"));
    function loadCompleteHandler(event:Event):void {
    var xml:XML = new XML(event.target.data);
    //txt.text = xml.toXMLString();
    trace(xml.IMAGE[0]);
    var list:XMLList = xml.data.title
    var loader:Loader = new Loader()
    this["holder_mc"+0].addChild(loader)
    loader.load(new URLRequest(list[0].IMAGE))    
    When I run it in flash, I got the error
    image1.jpg
    TypeError: Error #1010: A term is undefined and has no properties.
        at xml_fla::MainTimeline/loadCompleteHandler()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    I hope you will consider my ignorance since im a beginner using the actionscript. Thank you

    1) You should have "Permit debugging" enabled in Publish settings so you could tell exactly witch line is wrong
    2) This line makes no sense to me: var list:XMLList = xml.data.title
         Change it to var list:XMLList = xml.IMAGE;
    3) loader.load(new URLRequest(list[0].toString()));
    4) Also this line is suspicious: this["holder_mc"+0].addChild(loader)
         Why don't just say: holder_mc0.addChild(loader)?

  • Event Bubbling from inside a MediaElement

    Hi,
    Does anyone know how to bubble a custom event from inside a ProxyElement? My ProxyElement wraps the target media inside a SerialElement and prepends a clip. I'm wondering how to dispatch an event which I could capture outside of OSMF (bubbles all the way up to Stage).
    I've tried dispatching from the ProxyElement, the SerialElement it creates, the VideoElement inside the serialElement, and also from the DisplayObjectTrait of each of those. I'm unable to successfully capture it via bubbling.
    In contrast I've modified the AdProxy example (org.osmf.examples.ads.AdProxy) and I can successfully capture a bubbled event dispatched via the displayObject it creates. I believe this may be due to its use of a custom AdProxyDisplayObjectTrait? It doesn't seem to do anything fancy so I'm not sure why it works yet my other attemps don't.
    Speaking of the AdProxy example. If i modify it to create a SerialElement and prepend a clip only the first clip plays correctly, all subseqwuent clips are heard but not seen. Is this a bug or do I need to somehow remove the custom AdProxyDisplayObjectTrait to resolve this issue? The child media claims it correctly has its own DisplayObjectTrait and the dimensions are correct. I'm using OSMF 1.6.1.
    Cheers,
    Tim

    I have a strong sensation that the OSMF project is quite dead.
    no new submits since 2010, the contact form on the offical OSMF
    project website http://www.opensourcemediaframework.com/
    returns a PHP error.
    and many unanswered questions about OSMF in this forum.
    i think it would be wise to not use OSMF if possible, although
    I'm also stuck with it since we are utilizing HDS/PHDS
    protocols which are utilized in the framework.
    otherwise its quite a head-ache.
    I'm unable to get to a video element coming from a proxied element
    that is being produced via an HDS connection.
    and haven't found any solution that works.

  • 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).

  • JNDI Lookup of ConnectionFactory fails from inside Glassfish application

    This may very well end up being a glassfish specific question.
    I've got a stand-alone WAR using JSF, where I have a backing bean use some helper objects that will send a JMS message. When this WAR is running from inside of Glassfish, it fails to do the lookup of the ConnectionFactory.
    The application pulls the Queue JNDI and the Provider URL from a database, and uses a env Hashtable to do the JNDI InitialContext (which succeeds.) Using this Context, the ConnectionFactory lookup fails.
    The remote server in this instance is WebLogic 9.2 (the JNDI is publically available with no user authentication, verified with a JMS developer tool we use internally.)
    Here's the stacktrace...
    2007-10-15 19:48:04,514 ERROR [net.acadiasoft.shared.jms.util.JMSSenderHelper:130] NamingException: messageFactory not found
    javax.naming.NameNotFoundException: messageFactory not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
    at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
    at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:339)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at net.acadiasoft.shared.jms.util.JMSSenderHelper.getConnectionFactory(JMSSenderHelper.java:128)
    at net.acadiasoft.shared.jms.util.JMSSenderHelper.init(JMSSenderHelper.java:58)
    at net.acadiasoft.shared.jms.util.JMSSenderHelper.<init>(JMSSenderHelper.java:36)
    at net.acadiasoft.web.shared.jms.util.AdminJmsHelper.<init>(AdminJmsHelper.java:19)
    at net.acadiasoft.web.server.pages.SchedulerBackingBean.deleteJobs(SchedulerBackingBean.java:75)

    I've found the problem, and it's something I simply overlooked. I don't know why I didnt realize, but i was setting the java.naming.factory.initial env variable to what Glassfish uses, not WebLogic.

Maybe you are looking for

  • Creating a DVD project

    I've used iMovoe & iDVD for years. But now I can't get from iMovie to iDVD. I click the create project, it renders all my changes $ then goes to a big screen where everything is greyed out and I can't move. What gives?

  • Date format in log/error messages

    Hi there, Is there a way to change the date format in log/error messages in ttmesg.log & tterror.log files ? In my log files, only the hour is specified but I wish I could get the day each single line has been logged. Thanks in advance. PS : I'm runn

  • Encoder Counter Intermittently Set to 0

    I am using Labview on a windows XP box with a 6221 DAQ board connected to a 7330 motion controller via a RTSI bus.  I believe I have everything roughly working, but there is a behavior that I would like to explain before I go live. I am sampling an a

  • How come this is giving me a error

    When i declare the HTTPService(); object it gives me a error when i do the showBusyCursor import mx.rpc.events.ResultEvent; import mx.rpc.http.HTTPService; var phpService:HTTPService = new HTTPService(); phpService.showBusyCursor = true;

  • Colour and difference query

    Hi I was wondering what the differences, if any, are between the Macbook Pro and the Powerbook? I live in the U.K so is this just a different name given to the same versions for UK and USA. If they are different, how? and what do they do differently