A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: How to point user to frame

  1. #1
    Member
    Join Date
    Apr 2004
    Location
    UK
    Posts
    57

    How to point user to frame

    Hi,

    I got Flash site intro with some three slides presentation. Problem is that all age and background people are going to use this website and hence for some it wont be enought time to read text and for some it will be too slow.

    What I want to do is keep the slide speed standard and add buttons so that people can go back and read it again.

    I have attached the FLA file and in around frame 185 is the slide1 (frame name "page1") I had no problem linking button to external website or loading new movie (example skip button at bottom) but I can't make it just to the frame 185 (lable page1).

    HOW CAN I MAKE IT TO GO TO FRAME LABLED "PAGE1" WHEN USER CLICK ON BUTTON?

    Please help..
    Attached Files Attached Files

  2. #2
    A Flashkit User
    Join Date
    Sep 2005
    Location
    Ontario, Canada
    Posts
    405
    The code you put on the button to make it play that frame is:

    code:

    on (Release){
    gotoAndPlay("page1");
    }



    Thats about it. Very similar to making it go and play a frame number, but you just put the name of the frame label in quotations.

    -Ostil-

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    UK
    Posts
    57
    Quote Originally Posted by Ostil
    The code you put on the button to make it play that frame is:

    code:

    on (Release){
    gotoAndPlay("page1");
    }



    Thats about it. Very similar to making it go and play a frame number, but you just put the name of the frame label in quotations.

    -Ostil-

    Thanks for the reply,

    As you said I tried putting this code.. I put that code in actions layer along with simple button.

    It give me this error,
    Code:
    **Error** Scene=welcome, layer=actions, frame=186:Line 1: Mouse events are permitted only for button instances
         on (Release){
    
    Total ActionScript Errors: 1 	 Reported Errors: 1
    I also tried to give button name btn and then tried this:

    Code:
    on (Release){
    
        this.btn.gotoAndPlay("page1");
    
    }
    Even with this it give me the same error. Am I putting this action script in wrong place?
    {Take a look at the screen shots}
    Attached Images Attached Images

  4. #4
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Kmria,

    Ostil's code has to be placed on the actual button in order for it to work. If you want to place the code on the actions layer, then you'll have to give your button an instance name and the code would look like this:

    code:

    myButton.onRelease = function(){
    _root.gotoAndPlay("page1");
    }


  5. #5
    Member
    Join Date
    Apr 2004
    Location
    UK
    Posts
    57
    Quote Originally Posted by Osteel
    Kmria,

    Ostil's code has to be placed on the actual button in order for it to work. If you want to place the code on the actions layer, then you'll have to give your button an instance name and the code would look like this:

    code:

    myButton.onRelease = function(){
    _root.gotoAndPlay("page1");
    }

    Great

    it's working all good... I am not in to AS yet

    so if the frame is in MAIN timeline then you have to write _root before the function llike gotoAnd Play?

    Thanks for your kind help guys...

  6. #6
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Hey,

    Glad it worked. If its on the main timeline, its not always nessessary to write the _root. in front but its good practice to.

    Good luck

  7. #7
    Senior Member
    Join Date
    Jun 2005
    Posts
    132
    A few points that may or may not be of help.

    You may want to put a stop() action at the end of every segment, and then let the buttons lead the user to the NEXT section. This prevents the person from having to re-read the entire thing again, if they just missed the last couple lines, and is generally just "cleaner" work

    You may also want to consider using scenes, some around here seem to have a problem with them, but so far i dont think i have had any real problem with scenes. I like using scenes because it cuts down on my workspace clutter, i dont like having huge lines of frames.

  8. #8
    Member
    Join Date
    Apr 2004
    Location
    UK
    Posts
    57
    Thanks for the reply,

    I am using scenes in this. I removed others just to reduse the size of the file I attached. I have seen many example FLA files to get the idea how to do the animation and found out that on main timeline they have only three or even two frames. I'm still not very good at flash and this is my first project. Without helping hands like you guys it would be impossible to get this.

    I will use stop() and here is the so far work WITH all the scene
    www.readingmandal.uk.tt

    Please send me your feedback (remember this is first ever work i have done so please tell me +ve and -ve points )
    Last edited by kmria; 01-12-2006 at 06:17 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center