Buttons in movie clip don't work consistently

I'm using Flash navigation in Dreamweaver. Most of the
buttons work, except for a bunch that are in a movie clip. They
sometimes load the right page, sometimes not at all. I'm using
Flash CS3 and ActionScript 2.0.
This is what I have on the buttons:
on (release) {
getURL("This is where I have the URL", "_self");
}

first and foremost. For testing, add a trace to your
function.
on(release){
trace("The release is triggering");
getURL("TheURL","_self");
If this traces out when you test the movie, then you know
that the release is getting triggered. If it does not, then it is a
problem with the release not getting triggered.
If it is getting triggered, then the problem is in the getURL
statement. I would try _root.getURL(); to force the getURL to
happen on the main timeline.
If it is not getting triggered, then I may consider using
timeline actions in the root timeline. To do this, give the
movieClip that they are embedded in an instanceName, and give each
button an instanceName. Then use code like the following on the
first frame of the root timeline:
myMovieClip.myButton.onRelease = function(){
getURL("TheURL","_self");
}

Similar Messages

  • Buttons in Movie Clips, Movie Clips in Movie Clips

    Here goes. I have a scene with a button in the timeline, that
    targets a frame in a movie clip, which is essentially the content
    area of the layout. this is the code used:
    on (release) {
    textmov.gotoAndPlay ("challenge");
    This works fine and dandy. Now the problem. Within this
    "Content" movie clip, i have another movie clip with a button in
    it. This clip is designed to tween in then upon clicking a close
    button tween out. When I test it the button doesn't have rollovers
    like and I can't get it to talk to the clip above it to play the
    close tween.

    > I am still struggling with the fact, that upon testing,
    buttons in movie clips
    > do not exhibit their various states. Up, Over etc. I'm
    relatively sure that you
    > can have buttons in Movie Clips. I've also noticed that
    any graphic symbols
    > within a Movie Clip produce the hand, when the mouse
    cursor is Over them, just
    > like a button would. All of this happens, when testing
    in the FlashPlayer.
    is there any place you could kindly upload the source file
    for me to check ?
    > Do buttons operate independently of the Movie Clip
    timeline they are placed in?
    that is correct, button should work independently to movie
    clip.
    it only react to mouse upon entering the HIT state (which is
    invisible to user)
    and stops reacting once the mouse is off that state.
    > I have one Movie Clip with a one frame time line, should
    a Button symbol work
    > it it?
    of course it should work...
    Try to upload the source, let us check it out for you, spare
    you time on guessing :)
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Buttons in movie clip won't bring up scenes

    I've created a movie clip within my main scene.
    I have 6 buttons in that clip. I would like these buttons to
    call up the appropriate scenes but it isn't. I don't know whether I
    cannot have buttons in movie clips call up new scenes or if my
    actions script is simply wrong.
    Here are some of the actions I've tried to upload the scene
    or swf files:
    thanks.
    on (release) {
    _root.gotoAndPlay("instance name");
    ----Also, named 1st frame of scenes with matching instance.
    on (release) {
    _root.gotoAndPlay("scene name");
    on (release) {
    gotoAndPlay("scenename",1);
    on (release){
    uploadMovie ("name.swf",1);
    }

    use frame labels only and use the goto methods (like your
    first 2 goto statements) and not the goto functions (like your last
    2 goto statements).
    also, there is no uploadMovie() method in actionscript. use
    loadMovieNum() if you want to load name.swf into _level1.

  • I have FCE 4.0.1 and running OS x 10.7.5  when i burn my movie the audio from my movie clips don't come through .  My Sound effects and music can be heard.  I export to Quicktime movie, make it self contained then open IDVD for an intro and burn it.

    I have FCE 4.0.1 and running OS x 10.7.5  when i burn my movie the audio from my movie clips don't come through .  My Sound effects and music can be heard.  First I export to Quicktime movie, make it self contained then open IDVD for an intro and burn it.  everything sounds great in preview but then ( once again)I lose my audio from my movie clips.

    Try Mixing Down the audio before export.
    This info may help;
    https://discussions.apple.com/message/1060680?messageID=1060680&amp%3b#1060680
    Also serch this forum for Mix Down you should find lots of info.
    Al

  • HT1430 My phone locked up during sync to I tunes,   Power button and sleep/wake don't work

    My  phone locked up during sync to I tunes,  Power button and sleep/wake don't work.

    We here http://support.apple.com/kb/HT1808 and here http://support.apple.com/kb/ht4097

  • Buttons in a movie clip don't go to frame Labels

    Hello, I have 1 button inbeded in a movie clip named mcintroclp that is on frame 1 of my main timeline, Frame 2 is labeled port_btn on the main timeline. In the timeline of the movie clip mcintroclp I've put the code:
    stop();
    function buttonClick(event:MouseEvent):void
    gotoAndPlay(event.target.name);
    port_btn.addEventListener(MouseEvent.CLICK,buttonClick);
    The problem is that when the port_btn is pressed the playhead starts from the beginning of the main timeline not at frame 2 with the label port_btn. does anyone know what I am doing wrong, Thanks
    SQ

    what timeline contains your code?  (that's the same timeline that contains those two buttons, correct?):
    The timeline that contains the code is the movie clip named mcintroClip I've put the code on an actions layer on the last frame of the MC timeline. Which is the same timeline that contains the two buttons.
    what timeline contains mcintroClip?
    mcintroClip is on the first frame of the main timeline (whaich has a label home but I dont think that matters)
    what timeline contains intro_mc?
    intro_mc is the instance name for the movie clip mcintroClip on the main timeline. I tried to put that in the code because I don't relly know what I'm doing.
    what timeline has labels that match your button names?
    The main timeline contains the labels that match the button names, at this point frame 2 is labels port_btn
    The only othe code I have is stop(); on frame 1 and 2 of the main timeline.
    Thanks much for all your help on this.

  • Buttons inside movie clip dont work

    I have a simple HTML website with 5 buttons one of which, a movie clip, drops down 3 more buttons but the buttons dont always work. I get wierd issues for instance: whether I'm on the mcs page or another page completly the drop down buttons only work when Im on the parent movie clips page. When the buttons do work and you click on the button of the page your on  they only work once then the whole issue repeats itself. Hopefully to clarify here is the code inside of the movie clip that directs the drop down buttons.
    stop();
    var cdButton:URLRequest= new URLRequest("character desin.html");
    cd_btn.addEventListener(MouseEvent.CLICK, cd);
    function cd(event:MouseEvent):void
            navigateToURL(cdButton,"_self");
    var caButton:URLRequest= new URLRequest("concept art.html");
    ca_btn.addEventListener(MouseEvent.CLICK, ca);
    function ca(event:MouseEvent):void
            trace("ca_btn");
            navigateToURL(caButton,"_self");
    var dsButton:URLRequest= new URLRequest("draw sketch.html");
    ds_btn.addEventListener(MouseEvent.CLICK, ds);
    function ds(event:MouseEvent):void
            trace("ds_btn");
            navigateToURL(dsButton,"_self");

    From what I see you are trying to somehow program a Actionscript only iframe navigation. That will never work without an external Interface call to the Browsers Javascript. This is complicated stuff and surely not what you have in mind. If concept art, draw sketch etc. are all separate swf files, you should load them (instead of the html you embedded them in)

  • Movie clip resize not working when image is loaded

    Hello,
    I'm having some strange luck in building an image slide
    show. I load the image paths into an array from an XML
    page and then step through the array elements w/ forward and
    back buttons.
    I have an empty image clip on the stage where I create an
    empty movie clip inside each time a new image is loaded. I load the
    image into the second movie clip like this:
    [code]
    _root.picsPage_mc.mc_pic_loader.mc_individual_pic_loader.unloadMovie();
    _root.picsPage_mc.mc_pic_loader.createEmptyMovieClip(
    'mc_individual_pic_loader', 1 );
    _root.load_movie_and_stop(
    _root.picsPage_mc.mc_pic_loader.mc_individual_pic_loader,
    _root.photo_array[_root.photo_index].image,
    _root.picsPage_mc.mc_pbar, 'regular_load');
    [/code]
    The load_movie_and_stop function is as follows:
    [code]
    function load_movie_and_stop( target_mc:MovieClip,
    movie_clip_to_load:String, p_bar:MovieClip, action:String )
    mc_loader._width = 0;
    mc_slider_bar.mc_drag_pan._x = 0;
    if( action != 'simple_load' )
    p_bar._visible = true;
    p_bar.bar._width = 0;
    var mclListener:Object = new Object();
    mclListener.onLoadStart = function( target_mc )
    if( action != 'simple_load' && action !=
    'regular_load' ){ target_mc.stop(); }
    if( action == 'load_and_play' ){ target_mc.play(); }
    mclListener.onLoadInit = function( target_mc )
    _root.resize_movie_clip(target_mc, 160, 120, 250, 190);
    if( action == 'load_and_stop' ){ target_mc.stop(); }
    mclListener.onLoadProgress = function( target_mc )
    if( action != 'simple_load' )
    percentLoaded = Math.floor( (
    target_mc.getBytesLoaded()/target_mc.getBytesTotal() )*100);
    p_bar.bar._xscale = percentLoaded;
    p_bar.txt_percent = percentLoaded + "% loaded.";
    mclListener.onLoadComplete = function( target_mc ){
    p_bar._visible = false; }
    var my_mcl:MovieClipLoader = new MovieClipLoader();
    my_mcl.addListener(mclListener);
    my_mcl.loadClip( movie_clip_to_load, target_mc );
    }//___endFunc___
    [/code]
    After the image is loaded into the movie clip, I then resize
    the image to be a specific width.
    The image resizing is done w/ this function:
    [code]
    function resize_movie_clip(clip_loader_name:MovieClip,
    max_width:Number, max_height:Number )
    orig_width = clip_loader_name._width;
    orig_height = clip_loader_name._height;
    aspect_ratio = orig_width / orig_height;
    if( (orig_width > max_width) || ( orig_height >
    max_height ) ) // If either dimension is too big...
    if( orig_width > orig_height ) // For wide images...
    new_width = max_height;
    new_height = new_width / aspect_ratio;
    else if( orig_width < orig_height )
    new_height = max_height;
    new_width = new_height * aspect_ratio;
    else if( orig_width == test_height )
    new_width = max_width;
    new_height = max_width;
    else { trace( "Error reading image size."); return false; }
    else { new_width = orig_width; new_height = orig_height; }
    clip_loader_name._width = Math.round(new_width);
    clip_loader_name._height = Math.round(new_height);
    [/code]
    Now, 98% of the time this works perfectly, but there is some
    certain times where the image resizing is completely ignored and
    the image gets loaded as it's normal size.
    Can anyone see why the image sizing get's ignored in some
    instance?
    Thanks for any help,
    Clem

    Found the solution that worked (used ._xscale and ._yscale
    instead of ._width and ._height
    [code]
    function resize_movie_clip(clip_loader_name:MovieClip,
    max_width:Number, max_height:Number, center_offset:Number )
    if( (clip_loader_name._width > max_width) || (
    clip_loader_name._height > max_height ) ) // If either dimension
    is too big...
    if( clip_loader_name._width > max_width )
    _root.picsPage_mc.txt_test = "func if 1";
    clip_loader_name._width = max_width;
    clip_loader_name._yscale = clip_loader_name._xscale;
    if( clip_loader_name._height > max_height )
    _root.picsPage_mc.txt_test = "func if 2";
    clip_loader_name._height = max_height;
    clip_loader_name._xscale = clip_loader_name._yscale;
    else { new_width = orig_width; new_height = orig_height; }
    [/code]

  • Multiple click points for one button and movie clip

    I am trying to make a single button into a multiple click
    point. I have a movie clip on the stage and I have an invisible
    button over it. The movie clip consists of a single timeline that
    has an ambient animation running and looping intially. I have three
    more labeled sections of that timeline that each contain a
    different animated sequence as click point animations for that
    movie clip. I want the user to click on the button on the stage and
    the first labeled click point animation of that movie clip will
    play. I want that action to be stored so that when the user clicks
    again then the second labeled click point animation will play then
    they will click for the third in the same way. In between user
    clicks I want the ambient animation loop in the beginning of that
    movie clip timeline to play. When the user has clicked the 3rd and
    last animated sequence then the whole thing will reset and be
    available again. Can anyone let me know how that can be
    accomplished. I originally scripted it through tell target to play
    the first but I don't know how to move forward. Thanks!

    What version of Flash are you using? Telltarget is very
    old... try something like this:
    // array of the animations
    myAnims = ['firstAnim','secondAnim','thirdAnim']; // these
    are also frame labels
    // your current animation index in the array, arrays start at
    0,
    // so we start at -1 which is like before anything
    currAnim = -1;
    // function to play the next animation
    function nextAnim(){
    // add one to the current animation index
    currAnim++;
    // if you've reached the end of the array, start back at 0
    if(currAnim >= myAnims.length)currAnim = 0;
    // now tell the MovieClip to play based on the value of the
    current array index
    myMovieClip.gotoAndPlay(myAnims[currAnim]);
    Then on the button you just put:
    on(release){
    nextAnim();
    And at the end of each animation on the timeline, put:
    gotoAndPlay(1);
    And at the end of the ambient loop at the beginning I guess
    you have that, too, so it loops.
    Hope that helps

  • How do I create a play button for movie clip using AS3

    Hello.
    Bit new to this and have been searching the adobe forums and google. I am trying to create a button that will play an imported MovieClip.
    I have a movie clip that I've imported into it's own layer (Layer1) Frame 1.  I've given the MovieClip an instance name of foundationMovie.
    I've created a button and have that on its own layer(Layer2) above layer1, it is also in Frame 1.
    I've added a
    stop (); action to layer2
    The video is not set to autoplay.
    I want the video to start playing when the viewer clicks the button.  I know I've got to put some kind of event listener using AS3 in my timeline somewhere.
    I've found some code and I've been trying to work with it.  I'm sure I've mutilated it beyond usability but this is what I've got.
    stop ();
    player.addEventListener(MouseEvent.CLICK,play);
    function play(event:MouseEvent)
    gotoAndPlay("foundationMovie");
    If someone could point me the right direction or help me with my code I would really appreciate it.  Thanks.

    First, you need to clear up what you are working with... a movieclip and a video are usually entirely different things.
    Next, your code may get you started on your way with some changes.   You shouldn't use "play" as a function name due to there already being a play() method/function in Flash.
    If the movieclip is a movieclip and has an instance name of "foundationMovie", and your button has an instance name of "player" then the following adjusted code would normally work...
    stop ();
    player.addEventListener(MouseEvent.CLICK,playMovie);
    function playMovie(event:MouseEvent)
         foundationMovie.play();

  • How to add button inside move clip and call it from main timeline?

    Hi,
    On the main timeline I  have a movie clip called clock_mc and playBtn
    playBtn is  placed in the center of clock_mc
    When you press playBtn clock_mc starts playing
    playBtn.addEventListener(MouseEvent.CLICK, playClock);
    function playClock(event:MouseEvent):void
        if (event.target == playBtn)
            clock_mc.play();
            playBtn.visible = false;
            trace ("play button was clicked");
    This is working fine for me.
    But I want to add replayBtn to the last frame of clock_mc and set up the function on main Timeline.
    Another words when the clock_mc rich last frame you see replayBtn.
    code example:
    replayBtn.addEventListener(MouseEvent.CLICK, playClock);
        if (event.target == replayBtn)
            clock_mc.play();
            replayBtn.visible = false;
            trace ("replay button was clicked");
    I've tryed to placed the replayBtn on the stage on the main timeline and I've set it up to replayBtn.visible = false;
    And then I add replayBtn.visible = true; to last AS frame of clock_mc but it wont work
    Even when I put the button physically to the last frame of clock_mc it will not work either.
    Please help

    I've solved the problem:-)
    I've set replayBtn.visible = false; on first frame of clock_mc
    and  replayBtn.visible = true; at the last frame
    and than as you sugested I'v add:
    clock_mc.replayBtn.addEventListener(MouseEvent.CLICK, replayClock);
    function replayClock(event:MouseEvent):void
            clock_mc.play();
            trace ("replay button was clicked");
    I couldn't see replayBtn at the firs stage because I have clockTween assosiated with clock:
    clockTween = new Tween(clock_mc, "x", Regular.easeOut, -469,438, .5, true);
    and I had replyBtn in the wrong place so when clock_mc was coming up on the stage replayBtn was on the left side of the stage :/
    Now I have to solve only one thing.
    Maybe you would have any suggestions please.
    I've set up stop(); in a first frame of clock_mc
    that when you see clock_mc sliding in it has to wait for playBtn to be clicked
    because I have two tween:
            clockTween = new Tween(clock_mc, "x", Regular.easeOut, -469,438, .5, true);
            playTween = new Tween(playBtn, "x", Regular.easeOut, -720,514, .5, true);
            playBtn.visible = true;
    so when you click on playBtn:
    function playClock(event:MouseEvent):void
        if (event.target == playBtn)
            clock_mc.play();
            playBtn.visible = false;
            trace ("play button was clicked");
    everythink is working fine except when I clik on replayBtn it play for I sec because there is stop(); on the first frame of clock_mc

  • AS3 Putting Buttons Inside Movie Clip

    I am practicing AS3 (after years of AS2) and am having trouble having a button inside a movie clip talk to another movie clip on the main timeline. Here is the code:
    OneButton.addEventListener(MouseEvent.CLICK, OneButtonClicked);
    function OneButtonClicked(event:MouseEvent):void
    MovieTarget.gotoAndStop(1);
    MovieDescription.gotoAndStop("One");
    TwoButton.addEventListener(MouseEvent.CLICK, TwoButtonClicked);
    function TwoButtonClicked(event:MouseEvent):void
    MovieTarget.gotoAndStop(2);
    MovieDescription.gotoAndStop("Two");
    The code above works, but if I put OneButton and TwoButton inside a movie clip, I know longer can target MovieTarget and MovieDescription. The reason I want to put OneButton and TwoButton inside it's own MC is so I can dim each button after it is clicked by toggling the playhead inside that MC. Help? Thanks!

    Start over from the begining
    press  f8 and chose movieClip then draw your untoggled button call the movie button then create another movie and create your toggled button or greyed out button and call it greyedButton.  Go to main stage add 2 button instances and 2 greyedButton instances( just drag from library).  you have 4 instances on stage.  give call instance names and place one them on top of each other so u can only see 2 buttons on stage.  put the greyed button under the button.
    now with action script
    button1.addEventListener(MouseEvent.CLICK, OneButtonClicked);
    function OneButtonClicked(event:MouseEvent):void
    MovieTarget.gotoAndStop(1);
    MovieDescription.gotoAndStop("One");
    button1.visible = false; //  here the greyed button will show
    button2.addEventListener(MouseEvent.CLICK, TwoButtonClicked);
    function TwoButtonClicked(event:MouseEvent):void
    MovieTarget.gotoAndStop(2);
    MovieDescription.gotoAndStop("Two");
    button1.visible = true; // here button1 will go back to its orignal state
    button2.visible = false // here the greyed button will show

  • Deactivate a button until movie clip is complete

    I am creating several self study courses for my company's
    intranet. I added buttons for nextFrame and prevFrame to allow the
    user to navigate at their own pace. My problem is that a frame may
    include a movie clip that needs to play before the next button
    appears (or is activated).
    Thank you from an old dog trying to learn new tricks.

    Hello!
    Maby you could disable your button with this little script in
    the timeline:
    YourButton'sInstancename.enabled = false;
    That will disable your button.
    Enyways, if your problem is what I think it is.. you might
    reslove your problem by making the movieclip like this:
    Start by making a new movieclip. Name it as you would like
    it.
    In the first frame of your MC (movieclip) start making the
    animation with tween and whatever you want. When the animation is
    done, make a new layer INSIDE your MC and on the frame where your
    animation stops, drag in the button, or make something and convert
    it to a button. Make sure you have this script in the same frame as
    your button: stop() ; So, when the animation is finished, the MC
    stops at the button.
    After that, just type the script inside your button. Like
    ex.:
    on (release) {
    gotoAndStop("scene 1", 1);
    You have to change scene 1 to the name of your scene which
    you want to go to after clicking the button, and change 1 to the
    framenumber you want to go to.
    Hope this helps!
    Happy smile,
    SveinMikkel.com

  • How to _root in as3 (buttons in movie clip referencing to main timeline)

    Hi, I created buttons within a movie clip that i placed in the main timeline.I am  a novice to as3. I just wanted the button to go to the frame label of the main timeline. i used to do this with _root in the old flash. how do i do this?
    thumb02_btn.addEventListener(MouseEvent.CLICK, buttonClicked);
    function buttonClicked(event:MouseEvent):void
        gotoAndPlay("slide2");

    Thanks for the quick reply!
    somehow i must be doing something wrong though. It's not working...
    I added a stop to the "slide02" labeled section of the main timeline.
    and I also added a stop to the beginning and end of the movieclip. Am I doing something wrong? attached is my file....thanks!!
    stop();
    thumb02_btn.addEventListener(MouseEvent.CLICK, buttonClicked);
    function buttonClicked(event:MouseEvent):void
        MovieClip(this.root).gotoAndPlay("slide2");
    stop();

  • Button in movie clip! What to do?!

    Hello!
    I have a button inside of a movie clip timeline which I want to link to the main timeline, however, no idea how to go about it, I have tried all the usual coding but think i need to point it to the main timeline but don't know how.
    Please help.
    Cheers
    T

    Write the button code in the main timeline, targetiung the buttons via the movieclip's instance name.  That way you don't have to deal with interacting with the parent timeline.
    mcName.btnName.addEventListener.... etc

Maybe you are looking for

  • Calling report from a form/report

    Hello all, My Apex version 3.2.1 I have created an application on some tables. Each table has a report and form page. Now everything in these pages is working fine(inserting, updating, deleting records). I have a situation here, where after I insert

  • Urgent!! "This iphone is already activated. You may disconnect disconnect..

    I have two laptops and 1 iphone: Home - Macbook Pro Work - Windows 7 netbook iPhone - First hand, bought from my own service provider, never drop on the ground or goes into water I only sync my iPhone 4 with my mac before. 3 days ago I updated iPhone

  • USB 3.0 hub recommendation?

    I bought an Anker USpeed 7-port USB 3.0 hub that I thought would work great to allow me to connect 4 USB hard drives to my MacBook Pro (Retina, Mid 2012) and a few other USB devices (printer, keyboard, etc). It doesn't. Unfortunately this specific hu

  • Unable to run flex files in Firefox and Safari

    I created a flex program that loads an XML document. In short what I did is as follows: var XML_URL:String = "data/GetData.aspx?documentId=123"; var XMLURL:URLRequest = new URLRequest (XML_URL); loader = new URLLoader(XMLURL); The document loads up p

  • I need help asap with my blackberry curve

    I bought a blackberry curve 9330 on ebay and when I plug it in to charge the red led comes on then goes off after a few seconds and it acts like it wants to turn on but doesnt any ideas at all please please help me anything is helpful!