How to link a button to another frame in Flash CS3?

I have a button, and on it, there is this code:
on(press){
   gotoAndPlay("second");
the frame I want to link to is labeled "second", but the link is not working. What is wrong?

your button is a movieclip button and "second" is not in that timeline or "second" is not in the timeline that contains your button.
to start, don't add code to any object.  assign your button an instance name (eg, btn) and use:
var tl:MovieClip=this;  // assuming this timeline contains "second"
btn.onPress=function(){  // and you should use an onRelease for this.
tl.gotoAndPlay("second");

Similar Messages

  • How do I link a button to another flash document?

    I am using action script 3 to make my website and all my files and done for now and complete however I have no idea how to make the buttons I created in flash link to another flash document.

    Is each page a different html file?  If so, then you would use code like...
    function linkFunction(evt:MouseEvent):void {
        var url:String = "awebpage.html";
        var req:URLRequest = new URLRequest(url);
        navigateToURL(req, "_self");
    btnName.addEventListener(Event.MouseEvent, linkFunction);
    where btnName is replaced by whatever instance name you assign to the button.  A condensed version of the function is...
    function linkFunction(evt:MouseEvent):void {
        navigateToURL(new URLRequest("awebpage.html"), "_self");
    If it is not linking to different html web pages, then you need to provide a clearer description of what your mean.

  • How can redirect the errorPage to another frame?

    Please advise, I have been sticking to this problem for a whole day and still can't solve it. :-(
    What I basically want to do is to redirect the errorPage to another frame, say, the main frame.
    My application has 2 frames, the main frame is a search page, the left frame is a tree which is written by JavaScript and it is a hidden frame. The form code of the search page in the main frame is like that:
    <form name="form1" method="post" action="FindAgent.jsp" target="leftFrame">
    when the submit button is clicked, it will invoke the FindAgent.jsp which will update the tree and also has codes to catch any exception if there is. The problem is that when exceptions occur, the errorPage will be shown in the leftFrame which is hidden frame so it doesn't show anything. So how can I make the errorPage displayed in the _TOP window?
    I would not mind to have the errorPage displayed in the mainFrame by changing the target to "_SELF" or doesn't specify the target attribute at all in the search page. But anyother problem arose by doing that is that the search page will go away and try to display the FindAgent.jsp which doesn't have any appearance code after submitting. So how can I keep the current search page still but the submit() has been called actually, i.e. submit the form without redirecting the current search page.
    Any suggestions? Thanks in advance!

    Here's an idea. Have your error page (in the hidden frame), look something like this:
    <%
      String strErrorMessage = ... // get your error message text here
    %>
    <html>
    <head>
      <script language="JavaScript">
        parent.mainframe.location = "ErrorPage.jsp";
      </script>
    </head>
    </html>So the error page loads in the hidden frame, which then extracts the error information from the exception object. Then, using javascript, the hidden frame tells the main frame (using window references) to reload to the desired page. The only issue is how to get the error message text to the new page since your exception object is lost. You can store it as a session variable, and then pass the id of the message in the url to the new page, or you could just pass the text in the url itself.
    I hope that gives you some ideas!
    Michael

  • How to link one menu to another.

    Hey guys,
    I am creating a user input form for car types and car parts. I want to link one menu to another. I.e. the first menu will be make with a list of car makes, and if the user chooses "Ford" then the next menu will load items from a table "Ford" with the Ford models in it. I have the tables created in a database, one tabel is make with 50 different makes, and then i have 50 other tables for each make with the model types in it.
    Sorry if this is confusing please ask me if you need any more info.
    Thanks in advance

    supersham101 wrote:
     I want to link one menu to another. I.e. the first menu will be make with a list of car makes, and if the user chooses "Ford" then the next menu will load items from a table "Ford" with the Ford models in it.
    What you are looking for is a dependent drop-down menu. To get the values for the second menu, you need to send another request to the server, either by submitting the form again, or by using an Ajax request to populate the dependent drop-down. I don't know of any online tutorials for doing this, but you should be able to find something by doing a Google search. I know that "jQuery in Action, Second Edition" by Bear Bibeault and Yehuda Katz (published by Manning) describes in considerable detail how to do this.

  • How To Disable Minimize Button On A Frame...?

    hi..
    I want to disable the Minimize Button on de frame..!
    I found de way to disable Maximize Button on de frame.. using this method..
    Frame.setResizable(false);
    But i dont knw how to disable the Minimize button.... Can any one pls help me on this...
    thanks...

    check this:
    http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html

  • How to animate/delay individual frames in Flash CS3

    I need to animate 12 layers and I need layer 1 to be 2
    seconds, layer 2 at .5 seconds and so on......
    How do you change the individual frame delay in Flash CS3 so
    that they don't just keep animating fast and never stopping??
    Help!!

    Hmmm - not sure i understand your issue. F5 (insert frames)
    will lengthen
    the "exposure" of the layer. As to how to prevent them from
    "animating
    fast" - I don't understand what you are referring to - do you
    need to change
    the frame rate? When you say "never stopping" what do you
    mean? Flash loops
    by default in the player (playhead goes from last frame back
    to frame 1 and
    continues to loop).
    Adobe Certified Expert
    www.keyframer.com
    www.mudbubble.com
    (if you want to email me, don't look)
    "byn_byn_byn" <[email protected]> wrote in
    message
    news:fqmaee$o29$[email protected]..
    >I need to animate 12 layers and I need layer 1 to be 2
    seconds, layer 2 at
    >.5
    > seconds and so on......
    > How do you change the individual frame delay in Flash
    CS3 so that they
    > don't
    > just keep animating fast and never stopping??
    >
    > Help!!
    >
    >

  • How to play backwards flv imported in timeline on flash cs3?

    Hi guys,
    I want to play backwards imported flv in the timeline of flash cs3 from a current frame. How can I do this?
    Thanks in advance!

    Yes, thank you!
    I play it in reverse
    I have made some corrections in the code, I saw the spaces you mentioned, but it was starting to play from the end of the flv. So I have diceded to make it start from the point I like, putting this in the code totalFrames-38 (38 - is the number of frames from the end to the point i liked it to play), also I make tl.visible = true; because it was set on false and it wasn't visible.
    This is the code I used:
    var tl:MovieClip = this;
    tl.visible = true;
    tl.stop();
    tl.addEventListener(Event.ENTER_FRAME,preloadF);
    function preloadF(e:Event){
         if(tl.loaderInfo.bytesLoaded == tl.loaderInfo.bytesTotal){
              tl.removeEventListener(Event.ENTER_FRAME,preloadF);
              tl.gotoAndStop(tl.totalFrames-38);
            tl.addEventListener(Event.ENTER_FRAME,playReverseF);
    function playReverseF(e:Event){
         tl.prevFrame();
    Thank you, again!

  • How to link rollover buttons to iWeb pages?

    I've made my roll over buttons, their all ready and set up but I can't link them to my other iweb pages. Can anyone tell me how to do this? I tried publishing the site and setting it to link to url.com/blah (example!) but that doesn't work, it says the page doesn't exist.
    It's so simple to link when it's just a picture, why is this so difficult

    There are two types of links you can use for linking pages of a website - relative and absolute.
    When you choose "Link to: One of my pages" in the Link inspector this creates a relative link.
    When you choose to link to an external page you need to enter the full URL to the published page into the box in the Link inspector. Example...
    http://www.domain-name.com/site-name/page-name.html

  • How to link CS5 file to another file

    I've done a 12-page newsletter - complete with loads of images etc - using Indesign CS5 with links created by the TOC (Table of Contents) to each of the articles within the newsletter which will be a PDF.
    I have been advised that even as a PDF, the document will be far too costly to download on mobile devices/smartphones etc and that in order to circulate it to our mailing list, I need to produce a separate one-page Indesign CS5 file with links to the articles in my original piece of work. 
    What I now want to do is create a separate file for the front page linking to the main document which will be on our website but having spent the past two days attempting to figure out how to do this myself and trawling through my books and around the internet, I'm none the wiser.
    I'd greatly appreciate advice/guidance on the simplest and easiest way to do this with a complete idiot's guide on the steps needed to do so.
    Many thanks

    try to give <a href="your address">My Pdf</a>
    and your textfield should be html enabled
    mytextField.html=true
    mytextField.htmlText=your xml text

  • I know how to link a button to a start slide, but how do I specify an end slide?

    At work, they've asked me to create an ipad app in keynote that acts like a web page. I learned keynote today, and certainly not all of it. They want four separate click-through image galleries, with buttons represented by text, that link to four sets of slides. They are under the impression that grouping each set of slides and then linking each title to a specific start slide (the first in each respective group) will accomplish this, but it's not quite working. I need to know if there's a way to also specify an end slide for each button/gallery, because they're starting at the correct slide but then going all the way through to the end of the slides I've uploaded. Is this even possible?
    Thank you,
    Lais

    If you specify that the presentation only uses hyperlinks (doable with either KN 5.3 or 6.2), you can add navigation arrows or other shapes to each slide that contain hyperkinks to the next slide you want the user to see. So the navigation shape on last slide in each group would link back to the first slide. If you don't want to use arrows or anything else that partially covers the image, you can use shapes without fills for the hyperlinks. That way, tapping anywhere on the slide will activate the link.

  • How to linking a textfield to another when checkbox is checked.

    HI All
    Can Anybody please help me;)
    I want to do the following: I have to textfileds in a pdf form. Next to the second textfiled is a checkbox. I want to have the second textfiled to be linked to the first one only when the checkbox is checked.
    So when the checkbox is checked, the second textfiled should have the same value as the first textfield. Whe the checkbox is not checked The second textfiled can be overwritten and has its own value.
    This is my try:
    var g = this.getField("checkbox1");
    if(g.isBoxChecked(1))
    var f = this.getField("Text1");
    event.value = f.value;
    Now the if statement doesn´t work. But when i just have this:
    var f = this.getField("Text1");
    event.value = f.value;
    It works fine, and both textfiled s have the same value.
    Can anybody please help me?;)
    I am searching the whole net now for 2 days and haven´t found anything usefull. I also didn´t find anything in the adobe documentations and sample pdf files:(
    Thanks for any hint;)
    cheers dietmar

    Corey,
    Use a combo box with the part number and a switch statement (on blur, and commit immediately) linked to several text fields for the description. Something like this:
    var combo1 = this.getField("Combo Box5").value;
    var endDefault;
    var a = this.getField("Text1")
    var b = this.getField("Text2")
    var c = this.getField("Text3")
    switch (combo1){
    case "Select an address":
    getField("Text1").value = "",
    getField("Text2").value = "",
    getField("Text3").value = "";
    break;
    case "Part #1":
    getField("Text1").value = "Part #1 Description",
    getField("Text2").value = "Line break 1 description",
    getField("Text3").value = "Line break 2 description";
    break;
    case "Part #2":
    getField("Text1").value = "Part #2 Description",
    getField("Text2").value = "Line break 1 description",
    getField("Text3").value = "Line break 2 description";
    break;
    case "Part #3":
    getField("Text1").value = "Part #3 Description",
    getField("Text2").value = "Line break 1 description",
    getField("Text3").value = "Line break 2 description";
    break;
    default:
    endDefault = false;
    if (endDefault = false)
    app.alert("Please select from the drop-down menu",3);

  • How do I make Button Open new window in flash?

    Hi every one,
    i have this modelling site im working on, and when you click
    on photo i want to open a new window with the girls profile in it.
    but i dont want a new IE window, just a little flash movie, i tried
    "on (release) {
    //load Movie Behavior
    if(this == Number(this)){
    loadMovieNum("TWtester.swf",this);
    } else {
    this.loadMovie("TWtester.swf");
    //End Behavior"
    and it goes to that swf file, but its not in NEW window? does
    this make sense to any one?

    this is the as3 forum. you're using as2.
    and you need to clarify your terms. a new window means a new
    browser window. if you want to load your swf in the current window,
    load it into a target movieclip or _level.

  • How to instruct servlet to output to another frame?

    Hi all,
    This is what my application is about:
    Display a page with 3 frames.
    The 1st frame is a form, and the user is to fill out the form and submit a post request. The servlet invoked will perform some query and generate a list of results with links in another frame.
    Then the user will click on a link and more computation will be performed and result will be displayed in the 3rd page.
    my first question is: how to generate the result in another frame using servlet? Is RequestDispatcher an answer? I've tried using RequestDispatcher to forward the request to the .jsp file which represents the 2nd frame but nothing in the 2nd frame happens when I submit the form in the 1st frame. Rather, the 1st frame displays a page with message "The page cannot be found."...
    My second question is: should I write 3 separate .jsp files for each frame? Do I need a jsp file for the 2nd frame? I don't really understand how I can generate result in the 2nd frame which will in turn generate other results in the 3rd page when the user submits request in the 2nd frame.
    Thanks for your attention. Your help will be greatly appreciated!

    Have a look at a problem posted by nalinisp today. It might help.

  • Link a word in a sentence to go to another frame?

    I want to be able to do the following:
    Type out a sentence and then highlight one of the words in the sentence and create a link to go to another frame.
    Is this possible?
    The only other way which is time consuming (Especially with possibly hundreds of sentences) is to create each word as a button and then fit each word as a sentence together.
    surely there is an easier way?
    It will be the basis of an Elearning course for kids to click on a word in a sentence and based on their choice they go to a Correct or Wrong frame.
    Captivate cannot do this unfortunately.

    I'm not sure regarding the whole typing/highlighting end of things if you mean to do that will the file is running.   But in the authoring mode if you use the htmlText property of the textfield you can assign links in the text and use the TextEvent class to listen for clicking of the links and then take action on that.
    aTextField.htmlText = "Here's <a href=\"event: frame10\">One Link</a> and here's <a href=\"event: frame20\">Another</a>";
    aTextField.addEventListener(TextEvent.LINK, linkEvent);
    function linkEvent(evt:TextEvent):void {
         var frameLabel = evt.text;
         gotoAndStop(frameLabel);

  • How do you link a button to a image on the same page?

    I created a photoshop button and pulled it into my Muse website, and I want to link it to an image on the same page. I have a slide show set up, and this way I could have a secondary menu with buttons corresponding to each image in the slideshow. I can only find the option to link the button to another page, or link it to an external website. Help!

    Hi avary.s
    "Image Option" : http://prntscr.com/svhz7  Tells that its actually the whole image that is being placed within this slide show container.http://prntscr.com/svhz7 check : http://prntscr.com/svine
    However, "Hero Image" as show in screen shot provided in above reply, is a container which shows the edited part of  the complete image : check :  http://projectuni01.businesscatalyst.com/screenshots/2013-02-16_0217.png
    So in this case, In slideshows, the links are actually get applied on Hero image or on the slideshow containers.
    I hope this information helps
    Regards
    Anshul Sharma

Maybe you are looking for

  • Planning classical application Migration from version 9.3.1 to 11.1.1.3.

    Hi, Current Version Hyperion Version 11.1.1.3 Database: SQL Server 2005 Windows Server 2003 R2 Old Version Hyperion Version 9.3.1 Database: SQL Server 2000 Windows Server 2000 R2 1.I have created classical planning applicationin(CPLAN) in the 11.1.1.

  • [SOLVED!] Conky won't run undecorated, please assist.

    Greetings, As suggested in my other thread, I have been working on customizing a conky script that simply shows the time, date, calendar, current weather, and forecast, and I have completed it. However I have ran into a problem. Up until I basically

  • Spooling data with Header and trailer

    Hi everyone, I have a problem in spooling the data. I get a .dat file to load into db .That .dat file will be having header,records,trailer.While loading into the db i load only the records . I load the .dat file into table using sqlldr with direct=

  • Sound not loading

    I have the following code: myVars = new LoadVars(); myVars.load("http://charlesnewmanpubl.com/Sweethearts_On_Parade_BRGK.txt"); myVars.onData = function(src){      myVars.decode(src)      //trace(myVars.faFile);      var faFile:String;      var sound

  • Permission when syncing to local

    Hi, we are using SharePoint 2013 and I have a question. When a user syncs a document library to his/her workspace in his/her local PC, is the permission to this library applied on his/her laptop? Let's say I have "read only" permission in Document Li