Button functionality in a movieclip within another movieclip for another movieclip

Ok so i have this looping thumbnails bar that goes like this:
Scene1-imagebar-imagebarinside
The buttons symbols are in the "imagebarinside" movieclip and i am using this code:
ss1.addEventListener(MouseEvent.CLICK, play1);
function play1(event:MouseEvent):void
gotoAndStop("ssbox1");
...in this movieclip to play another labeled frame in another movieclip (Scene1-Bara)
Problem is it wont work :-< if anyone has a better ideea i'll really apreciate it

Hey!
So, trying to understand the distribution of your MovieClips inside the flash file, this is what I understand:
Scene1 contains a movieclip with the instance name "imagebar" and another movieclip with the instance name "bara".
"imagebar" contains a movieclip with the instance name "imagebarinside". If that is the case (And the code being on the first frame of "imagebarinside"), I would use something like:
function play1(event:MouseEvent):void
     Object(this.parent).parent.bara.gotoAndStop("ssbox1");
Hope this works!

Similar Messages

  • Button "Over" State Not Working Within Visible MovieClip

    Hi Folks,
    My button states aren't working right, and I'm pulling my hair out:
    http://www.miklas.org/test/test.htm
    The desired behavior is under the "Design..."  button--notice how when you mouseover the "Our Philosophy" link it turns blue? Why isn't  this happening for the "What We Can Do For You" and "Our Process" buttons in the other movieclips?
    The document is structured as follows:
    MovieClip 1: Design: Your Silent Salesperson
    ---Text
    ---Images
    ---Button: Our Philosophy
    MovieClip 2: Who Owns Your Brand
    ---Text
    ---Images
    ---Button: What We Can Do For You
    MovieClip 3: What's Your Brand's Persona
    ---Text
    ---Images:
    ---Button: Our Process
    DETAILED EXPLANATION:
    I have three separate movie clips with a bunch of objects. Using AS3,  I  tween their alpha value from 0 to 1 to make them visible depending on a  user mouseover. As part of each movieclip I have a button. It is text  with an underline; made to look like a hyperlink. When the user mouses  over the text, I want it to change color from orange to blue. This works  on the first movieclip, but doesn't on the second and third! What's  weird is that if I cut-and-paste the button from the second or third  movieclip to the first, the over state works fine. If I set Control  -> Enable Simple Buttons, the over state works fine. But when I  export it to .swf, it doesn't work!?
    tyvm!

    OK I finally got it! My layers were indeed out of whack--the entire problem was solved by the"setChildIndex" function.
    Basically, when the user mouses over the buttons, I fade in the new clip, and set the depth above the other movie clips. Here's the code:
    buttons_movieClip.whyDesign_button.addEventListener(
      MouseEvent.MOUSE_OVER,
      function(evt:MouseEvent):void
          if (active != whyDesign_movieClip)
            fade(whyDesign_movieClip);
            setChildIndex(whyDesign_movieClip,3);
            setChildIndex(whoOwns_movieClip,2);
            setChildIndex(persona_movieClip,1);
    There is a black background at depth 0. The following forum post helped a lot:
    http://www.smithmediafusion.com/blog/?p=435
    tyvm!

  • Need help to call a simple function from within another function?

    I created a movieclip which has a function in its one and only frame.
    function testx() {
    x = x+2};
    This movieclip is in the main timeline (in its own layer).
    In another layer on the timeline I have created a single keyframe with a button instance called myBtn
    myBtn.onRelease = function() {
    var x
    x =2
    testx(2);
    trace (x);
    What I want to do is call the function in the movieclip frame from the button press function. However, I can't seem to reference it properly.
    Can anyone help me to basically call a simple function from within another function?

    Yes am using CS4.  Have saved it as CS3 now.  Ok the file is somewhat complicated and what I am testing is not what I ultimately want to do but if I can pass that variable I can figure it out.  In terms of describing the file I think the only parts of importance are what I put in my previous post (please let me know if there is something I should be telling you that I have missed).  I am 99.9% sure that I am using the correct instance name.
    Scene1 Layer3 Frame1 has the function call for the button.
    myBtn.onRelease = function() {
    var x
    x = 2
    testx(2);
    trace (x);
    Slideshow layer //Actions Frame1 has the function
    function testx(x) {
    x = x+2};
    thank you so much for helping me.

  • Help please!  I need code for a button to stop a movieclip, when both are in a nested animation.

    I'm working on a project that has a button and a movieclip, which we want the button to stop, both nested in a movieclip on the main timeline.
    The button instance = muteBtn
    The clip to stop instance = backmusic
    The movieclip they are nested in = ecard
    There's also a preloader that works just fine on the main timeline.
    I've seen a wide variety of ways to stop a streaming MP3 and they all look way too complicated for my current Flash knowledge level.  As far as I know, if the MP3 is in a movieclip, stopping that clip will also stop the MP3.  If that's just dead wrong and what I'm trying to do will never work, please just let me know so I can struggle in another direction.
    What I'd prefer though would be the coding to make this button work.  I've tried a wide variety of ways to code something that seems like it should be so simple, and keep getting the error "Access of undefined property muteBtn".  I'm assuming this means it can't find the muteBtn in the nested layer.  How do I better define the muteBtn?  Do I then need to add something else that more clearly defines where the clip I want it to stop is since it is nested too?  PLEASE HELP ME!! Thank you in advance!
    Some of what I've tried:
    function endMusic(e:Event):void {
        ecard.backmusic.stop();
    or
    function endMusic(e:Event):void {
        backmusic.stop();
    with...
    muteBtn.addEventListener(MouseEvent.CLICK, endMusic);

    When you target objects, you need to consider the path to the object based on where you are trying to target from.  So if your code is in the main timeline and your button is inside a movieclip, then you need to target the button via the movieclip...
       movieclipName.muteBtn.addEventListener(MouseEvent.CLICK, endMusic);
    As far as stopping a moiveclip resulting in stopping a sound from playing, it is not likely to work.  To stop a sound you need to target the sound to stop it.

  • Embedding a Button that contains a MovieClip with a filter on it causes a build error in Flex

    I'm trying to embed (via [Embed(...)] code) a button that
    contains a movieclip with a blur filter on it. This causes Flex to
    stop compiling my project (actually it says that it cannot find
    another symbol that I'm also embedding). I've narrowed it down to
    this problem though.
    As soon as I remove the filter on the movieClip, Flex likes
    it again.
    Does anybody have experience with this or found a workaround?
    thanks, Frank Hermes

    This is really a SQL issue, not SharePoint. After 5000 rows, SQL does a lock escalation from a row lock to a table lock. The table lock prevents operations on the entire table, hence why you want to stay under 5000 rows, especially for a busy content database.
    One way to mitigate this scenario is to dedicate the content database to the Site Collection. This way only the Site Collection is impacted by the lock escalation.
    You can also set specific Lists/Libraries to disable the throttle entirely by using PowerShell to set the EnableThrottling property to $false. Alternatively, you can use a sandbox or full trust solution to display the data where it also ignores the throttle.
    To answer your question, yes it will fail after 20,000 items.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Button that replaces a movieclip

    so,im trying to make a button that replaces a movie clip.Basicly when you press on a button it replaces a movie clip that lets say i called ˝movie_1˝ that is already on the stage with a movie clip in the library i called ˝movie_2˝.
    Both movie clip have this already as an action onClipEvent(enterFrame){ mouse.hide(); this._x=_root._xmouse; this._y=_root._ymouse; }

    // assign your library movieclip a linkage id. eg, mcID
    yourbutton.onRelease=function(){
    var p:Movieclip=movie_1._parent;
    p.attachMovie("mcID","new_mc",p.getNextHighestDepth(),{_x:movie_1._x,_y:movie_1._y});
    movie_1.swapDepths(p.getNextHighestDepth());
    movie_1.removeMovieClip();

  • Accessing a function from a movieclip form a top level layer

    Im having a dillema. my whole game rests on being able to
    access functions from a movieclip inside a movieclip in a top level
    layer called "Cards" to another layer called "Functions". I've used
    this code:
    play_modifier_card(this.num.text);
    to access this function:
    function play_modifier_card(card_num){
    trace(card_num);
    It works OK when the function is in the movieclip but not
    when it is in a top level layer. I tried
    "_root.play_modifier_card(this.num.text);" but it didn't work. Any
    help appriciated. Thanks in advance.

    _global.play_modifier_card(card_num) {
    trace(card_num);
    }

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

  • Call a external SWF by press the button within another SWF file but the second SWF file play Externely

    Hello Guyz.
    i am working on Macromedia Flash 8 and i just want to call a external SWF when i press the button within another SWF file.......but the second SWF file play Externely............can any one knows the code.... AS2

    try this
    http://www.actionscript.org/forums/showthread.php3?s=&threadid=28123

  • Interactive audio button as mso within another mso (slideshow)

    Hello,
    I have a tricky question and after researching in the forum I have not come across a solution yet. I have a picture slideshow playing automatically and on these pictures are a text box and a button to tap onto the next page. I set this up as a multi-state-object whereas every picture of the slideshow is a separate status. See here:
    That works perfectly fine. However, I want to autoplay an audio file in the background but want to allow the user to manually pause it. This is why I created another multi-state-object including the audio file and 2 buttons (a grey crossed-out button to pause it and a red-orange button to continue playing). Please see this screenshot:
    In another post in this forum I found out how to combine those 2 MSOs together: I anchored the audio button MSO in a small text frame and included that into my main MSO with the picture slideshow (into every single status!). Then I added all the functions to the buttons again (switch to status 2 red audio button, pause audio playing etc.). My problem is now that the second status of the audio button MSO (= red audio button) does never show up at all and the audio file starts playing from the start everytime the status in the pic slideshow MSO automatically changes.
    Can somebody please help me or tell me if there is an alternative to that? Basically, I have an MSO running automatically and I want to automatically play an audio file but allow the user to manually pause and continue it by tapping on a button.
    Thank you in advance.

    Hi Bob,
    many thanks for your feedback. However, that does not solve the problem as beautifully as I wanted. As you see in the screenshot below, I have now 2 buttons (1 for pause and 1 for play/continue playing). When I click on pause, it pauses. But when I click on play, the audio file starts playing from the start again. I set the button function to continue playing but that won't display then for whatever reason.
    I would like to have 1 button that changes its appearance (pause / play - this is why I initially had a MSO) as well as pauses or continues playing the audio where it last was paused. Is that possible?

  • Simple button function issue

    Why won't this work?
    meta_nav.bm0.onRollOver = function () {
    meta_nav.bm0.gotoAndStop("state2");
    I've double checked to be sure all instance names and frame
    labels are correct. And have tested the same function with bm0 on
    the _root level, and this works fine:
    bm0.onRollOver = function () {
    bm0.gotoAndStop("state2");
    What am I missing to call a function to an MC nested within
    another MC?
    I've also tried this:
    _root.meta_nav.bm0.onRollOver = function () {
    _root.meta_nav.bm0.gotoAndStop("state2");
    And this:
    _root.meta_nav.bm0.onRollOver = function () {
    myNodeButton = _root["meta_nav.bm0"];
    myNodeButton.gotoAndStop("state2");
    No luck.

    Hey Michael, you're very close the solution yourself. Instead
    of trying to addressing scope in a absolute fashion (_root), try
    the relative approach.
    When you nested this videoclip, _root does not point to this
    movieclips timeline anymore, but to the root of the movieclip it is
    nested in. See it as that you added a ground level story to your
    house, lifting the old house, and see the front door as something
    on root level. In this case, you do not want to take the stairs
    down, but remain on the first etage.
    this.meta_nav.bm0.onRollOver = function () {
    this.gotoAndStop("state2");
    try tracing some this-es to find out what scope your current
    function has.

  • How to make next and previous button function

    Hello
    Can anybody help me with how to achieve next and previous button function such as the one at www.bestbuy.com?
    I would appreciate any help or suggestion.
    Thank you!

    if you're not familiar with flash it might be easiest to place your initial "page" in frame 1, the 2nd (or next) page in frame 2, the 3rd/next page in frame 3 etc.
    place your previous and next buttons in their own layer that spans the main timeline (which will have as many frames as you have "pages").  give them instance names (say prevBtn and nextBtn).
    you can then use the following code placed in frame 1:
    var tl:MovieClip=this
    prevBtn.onRelease=function(){
    tl.prevFrame();
    nextBtn.onRelease=function(){
    tl.nextFrame();

  • Fire event from within another event ?

    It seems that an event fired from within another event does not
    actually execute its code until the firing event completes. The fired
    event's Time value in its Event Data Node indicates the time that it
    was told to execute, but using GetTickCount calls shows that its code
    does not execute until the firing event is finished. This happens
    whether Value Signaling is used to generate a Value Change event or if
    CreateUserEvent and GenerateUserEvent is used. Is this because events
    are placed in a queue ? This behavior is different from Delphi for
    example where the fired event executes right away when called from the
    firing event (before the firing event completes).
    I have an event that executes upon a button value change. I would
    like that same event's code to execute when another button is pressed,
    but also have other code in the second button's event execute after
    that first button's event's code completes. Is there another way to
    accomplish this ?
    Steve

    > It seems that an event fired from within another event does not
    > actually execute its code until the firing event completes. The fired
    > event's Time value in its Event Data Node indicates the time that it
    > was told to execute, but using GetTickCount calls shows that its code
    > does not execute until the firing event is finished. This happens
    > whether Value Signaling is used to generate a Value Change event or if
    > CreateUserEvent and GenerateUserEvent is used. Is this because events
    > are placed in a queue ? This behavior is different from Delphi for
    > example where the fired event executes right away when called from the
    > firing event (before the firing event completes).
    I'm not that familiar with Delphi, but LV events are asynchronous.
    Window
    s OS has two ways of firing events, Send and Post. The LV events
    are always posted. The primary reason is that the LV events are handled
    by a node, not by a callback. The node you are calling is in the middle
    of a diagram, and reentering it not valid.
    > I have an event that executes upon a button value change. I would
    > like that same event's code to execute when another button is pressed,
    > but also have other code in the second button's event execute after
    > that first button's event's code completes. Is there another way to
    > accomplish this ?
    The best way to reuse code is to use subVIs. Firing events, or rather
    sending events is pretty close in other events to making a function call
    dispatched to anyone interested in the event. The event just hides who
    you are calling and makes you put your parameters in a funny format
    stuffed inside the event. IMO it also makes the code very hard to read
    since you don't know what calls what.
    Instead, just put the code into a sub
    VI and call it whenever you need
    to, from the event structure in one or more locations, and from other
    loops and diagrams.
    Greg McKaskle

  • Re: [iPlanet-JATO] Back Button functionality

    Hi Mike,
    Our test environment does not include proxy server.
    regards,
    syam.
    Please respond to [email protected]
    cc:
    Subject: Re: [iPlanet-JATO] Back Button functionality
    Guys,
    Please clarify something for me, the JATO code is commented as follows
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");Yet you make no mention of whether your test environment includes a Proxy
    Server, or does your browser
    go directly to the Application Server's web server?
    Can you clarify, please?
    ----- Original Message -----
    From: <syam_reddy@p...>
    Sent: Wednesday, April 25, 2001 2:59 PM
    Subject: [iPlanet-JATO] Back Button functionality
    >
    Hi,
    We observed the following difference in behaviour between JATO pages
    and NetD served pages.
    We have the following scenario. User will login to the
    site. After login he will get a frame set. This frame set has threeframes.
    Top and bottom frames are used for navigation (to switch between various
    sections on the site.) .The middle frame(main frame) shows the actual
    content. When the the frame set gets loaded main frame shows page1. User
    will click on a link on page1. Page 2 will be loaded in main frame. Atthis
    point if the user clicks on back button , with migrated application(JATO
    pages) the following message appears in the main frame.
    In Netscape Communicator 4.61 the following message appears in the main
    frame :
    Data Missing
    This document resulted from a POST operation and has expired fromcache.If
    you wish you can repost the form data to recreate the document by
    presenting the reload button.
    In IE 4.72/5.5 the following message appears in the main frame:
    Warning : Page has Expired
    The page you requested was created using information you submitted in a
    form.This page is no longer available.As a security precaution, Internet
    Explorer does not automatically resubmit your information for you. To
    resubmit your information and view the web page click teh refresh button.
    However, in the NetD site page1 will appear in main frame.
    How do we mimic the NetD behaviour with the migrated
    applications ?
    We think the above behaviour with migrated Apps, is due to the
    headers that are get set in Application ServletBase , see the following
    code snippet :
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");
    If we comment the above code , we were able to mimic theNetD
    behaviour. Are there any alternatives/thoughts on how to mimic the NetD
    behaviour ?
    Thanks in Advance,
    syam&ravi.
    [email protected]
    [email protected]

    OK, here's what I'm trying to do: We have, like you said, a menu
    page. The pages that it goes to and the number of links are all
    variable and read from the database. In NetD we were able to create
    URLs in the form
    pgXYZ?SPIDERSESSION=abcd
    so this is what I'm trying to replicate here. So the URL that works
    is
    pgContactUs?GXHC_GX_jst=fc7b7e61662d6164&GXHC_gx_session_id_=cc9c6dfa5
    601afa7
    which I interpreted to be the equivalent of the old Netd way. Our
    javascript also loads other frames of the page in the same manner.
    And I believe the URL-rewritten frame sources of a frameset look like
    this too.
    This all worked except for the timeout problem. In theory we could
    rewrite all URLs to go to a handler, but that would be...
    inconvenient.

  • PL/SQL: Executing a procedure from within another procedure

    Hello, I'm a newbie and I need help on how to execute procedures from within another procedure. The procedure that I call from within the procedure have return values that I want to check.
    I tried: EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
    but I get the error message:
    PLS-00103: Encountered the symbol "USER_GET_FORUM_INFO" when expecting one of the following::= . ( @ % ; immediate
    The symbol ":=" was substituted for "USER_GET_FORUM_INFO" to continue.
    And when I tried: EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
    I get the error message:
    PLS-00222: no function with name 'USER_GET_FORUM_INFO' exists in this scope
    PL/SQL: Statement ignored
    The procedure USER_GET_FORUM_INFO exists. (don't understand why it says "no FUNCTION with name", it's a procedure I'm executing)
    I'm stuck so thanks for any help...
    Below is all the code. I'm using Oracle 9i on RedHat Linux 7.3.
    ================================================================================
    CREATE OR REPLACE PROCEDURE user_forum_requestsaccess (
    p_forumid IN NUMBER,
    p_requestmessage IN VARCHAR2
    AS
    var_forumid NUMBER;
    var_forum_exists NUMBER;
    var_forum_access NUMBER;
    request_exists NUMBER;
    var_forumname VARCHAR2(30);
    FORUM_DOESNT_EXIST EXCEPTION;
    FORUM_USER_HAS_ACCESS EXCEPTION;
    FORUM_REQUEST_EXIST EXCEPTION;
    BEGIN
    SELECT SIGN(NVL((SELECT request_id FROM forum.vw_all_forum_requests WHERE forum_id = p_forumid AND db_user = user),0)) INTO request_exists FROM DUAL;
    EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
    IF var_forum_exists = 0 THEN
    RAISE FORUM_DOESNT_EXIST;
    ELSIF var_forum_access = 1 THEN
    RAISE FORUM_USER_HAS_ACCESS;
    ELSIF request_exists = 1 THEN
    RAISE FORUM_REQUEST_EXIST;
    ELSE
    INSERT INTO tbl_forum_requests VALUES (SEQ_TBL_FORUM_REQ_REQ_ID.NEXTVAL, SYSDATE, p_requestmessage, p_forumid, user);
    INSERT INTO tbl_forum_eventlog VALUES (SEQ_TBL_FORUM_EVNTLOG_EVNT_ID.NEXTVAL,SYSDATE,1,'User ' || user || ' requested access to forum ' || var_forumname || '.', p_forumid,user);
    COMMIT;
    END IF;
    EXCEPTION
    WHEN
    FORUM_DOESNT_EXIST
    THEN RAISE_APPLICATION_ERROR(-20003,'Forum doesnt exist.');
    WHEN
    FORUM_USER_HAS_ACCESS
    THEN RAISE_APPLICATION_ERROR(-20004,'User already have access to this forum.');
    WHEN
    FORUM_REQUEST_EXIST
    THEN RAISE_APPLICATION_ERROR(-20005,'A request to this forum already exist.');
    END;
    GRANT EXECUTE ON user_forum_requestsaccess TO forum_user;
    ================================================================================
    Regards Goran

    you don't have to use execute when you want to execute a procedure (only on sql*plus, you would use it)
    just give the name of the funtion
    create or replace procedure test
    as
    begin
        dbms_output.put_line('this is the procedure test');
    end test;
    create or replace procedure call_test
    as
    begin
        dbms_output.put_line('this is the procedure call_test going to execute the procedure test');
        test;
    end call_test;
    begin
        dbms_output.put_line('this is an anonymous block calling the procedure call_test');
        call_test;
    end;
    /

Maybe you are looking for

  • How do I revert to an older IE 10 build?

    A user is asking me to revert his IE 10 to 10.0.9200.16750, would there be a way to do that? i.e by uninstalling some updates or even better as I already tried to remove IE 10 completely to install an older build I found, to then apply updates up to

  • Why is my 2009 macbook running soooooo slowly and how can I fix it?

    My 2009 macbook pro is running slowly.  By slowly I mean in everything it does, it takes a long time loading (eg. turning on, opening apps, surfing the web, streaming videos, etc.) I used EtreCheck to generate an overview of the state of my mac.  Bel

  • How to add Jsp pages into existing portal (JDeveloper 9.0.4)

    I am a jsp developer. I have to add a jsp page into existing portal. I am new to portal. Could anyone help me how to develop jsp using portal classes like PortletRenderRequest,ProviderSession and others.

  • Unstable screen distortion after startup - scrolls left to right rapidly

    My Mac Mini (2.0/2GB/GMA 950) will not provide a stable screen after startup process completes - the screen rapidly scrolls left to right (possibly right to left, cant be sure) and the mouse pointer appears broken up until I move the mouse to the low

  • 24 bit question

    I am wondering if I select 24 bit for recording, is that a universal setting or does it stay with a particular song? The reason I ask is that I have many songs recorded in GB that are 16 bit, but I'd like to start new LE projects at 24 bit. Will this