A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Button

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jan 2004
    Location
    eegypt
    Posts
    10

    Button

    I WANT TO LINK THE BUTTON TO A PICTURE OR A SYMBOL IN THE THE MOVIE
    goldberg

  2. #2
    if(i>$){i=:);} falshdancer's Avatar
    Join Date
    Nov 2003
    Location
    NYC
    Posts
    546
    Be more specific.
    la la la la laaaaaaa

  3. #3
    The epitomy of hip
    Join Date
    Jun 2004
    Location
    United States of America
    Posts
    77
    HaHaHa dum dee dum HaHaHa

    You are very straightforward

    HaHaHa

    Ok, time for me to be straightforward

    1. Make button
    2. Select button
    3. Go to actions panel for button
    4. Put this script into button actions:


    on (release){
    "targetpath to your symbol"."what you wanna do"
    }

    explaination: targetpath is your way of telling the computer where your symbol is. (it must have an instance name though)

    a simple targetpath would be "this.symbol.symbol2"

    that means that the button would target the symbol 1(only buttons or movie clips) and inside of symbol one it would target symbol 2

    the "what you wanna do" part is telling the symbol what to do

    for example: gotoAndPlay(2);

    if you put the targetpath and what you wanna do together you get a piece of code that makes a selected piece of your flash movie or game do what you want it to do.

    Im not sure what you want to do... "LINK THE BUTTON TO A PICTURE OR A SYMBOL IN THE THE MOVIE"

    if you want the button to make a picture appear and dissapear just make a movieclip with 3 frames. Give it the instance name "pictureFrame". on the first of the frames in it put the code

    stop()

    on the second frame, create a keyframe with no code in it and put the picture in it

    on the third create another keyframe with the picture still in it and put the code in the frame

    gotoAndStop(1)

    after that go back to the main stage and create a button

    on that button, go to the actions panel and put the code

    on (release){
    this.pictureFrame.nextFrame()
    }



    need more help, advice?

    call 1-800-my email address is thingsgo50@cs.com

    *despite 1-800 # all calls are 99 cents a minute
    J
    A
    Z
    Z

    Can you dig it?

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