A Flash Developer Resource Site

Results 1 to 20 of 20

Thread: button interaction

  1. #1
    I have been trying to make a animated button that links to a page for months now, tried many different tutorials but still cannot manage it. Is there ANY tutorial out there that explains it right from the start to actually putting into Dreamweaver?...none of the tutorials on this site or most of the sites I have been to do...

    Really frusfrating, once I understand this I can imagine the rest is not quite as complicated


  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    You want your Flash button to be embedded in HTML and to take you to another page ?

  3. #3

    Smile it is very easy, really...

    Creating a button or any animation that goes to another site when clicked on is very simple:

    First open both the library and actions windows; library open = 'ctrl' + 'L' actions window = 'ctrl' + 'alt' + 'A' or go up to 'window' and select to open these windows.

    Now create the button or movie as a library item - click the '+' symbol in the library window -- choose whether you want to make a button or a movie. Now make your button or movie. When you are done, click back on 'scene1' in the upper left corner of the Flash screen to exit from the library item editor.

    Now drag that button or movie you created from the library to the stage.

    With the movie that you dragged from the library selected - clicked on and highlighted, drag the 'getURL' action from the actions list in the actions library window over to the blank area on the right in the actions window and fill in the info at the bottom when each line of that action is selected seperately. In the window options select 'self' to replace the page or 'blank' to open a new browser window.

    Now 'save as' and test it by going to 'Control' / 'Test Movie' to see if it works the way you want it. Click 'publish' (under 'save-as') and it will make the 'swf' file in the same location as you saved'as the Flash file and it will have the same name as the Flash file as well.

    Now incorporate the 'swf' file that was created when you clicked 'publish' into dreamweaver just as you would a jpg image file or anything else.

    You can also find some buttons in the 'Window' / 'common libraries'.

    [Edited by Noslen on 08-03-2002 at 09:05 PM]

  4. #4
    Thanks for your reply but suprise suprise I failed again, doh!

    I made a button, grouped it and made it fade from keyframe 1-10. But when I went to actions, none of them were highlighted to select.

    I think after grouping I have to convert button into either a "button" or "movieclip"...any ideas anyone?

    Thanks

  5. #5
    Create all the button or movie's animation when making it at first within the library - including fading in or out or anything. It also helps to have it on its own layer, but avoid animating it within the actual movie itself - do it all when making it as a 'new symbol' in the library.

    Also make very certain that the button that you made and then dragged onto the stage is actually selected or no actions will be available as nothing is selected.

    Use a button from windows / common libraries to make it easier to understand - keep it as simple as possible until you get the concept down.

  6. #6
    I have just made the fade animation and its in the libary. I then made a "button" symbol and inserted the animation into the "over" tag from the "up,down,down,over" menu.

    I test my movie and now the button straight away fades and it loops!...any idea how to stop it looping?!...and how to make animation play ONLY when mouse is over it?

  7. #7
    Another thing that is confusing me...in my scene1 window...theres no need for any "timeline" bar to be past the first key frame is there?, because you only do the animating in the "movie clip" section?...am I right?, or is this where I am going wrong?!

  8. #8
    Produce ALL of your animation in the library. It sounds like you would be better off making a movie instead of a button - I don't believe you can control a button in the manner that you want, to stop its animation in individual states.

    As far as making the animation occur only when the mose is over it, wait until you get the original idea down - to get another URL when it is clicked.

    To make the movie only do something when the mouse is over it, you need to combine 'stop' actions withing the movie itself when at the library level of the movie - like on the first frame. And then when it is on the stage use the action 'goto and play' whatever frame you want to happen when it is 'mouseover' - like goto and play frame 2 when mouseover.

  9. #9
    Yes, there is no need for a scene to be more than one frame necesarrily if all the work is done by multiple frames and actions at the library level.

    PS When testing a movie, it is always set to loop - use control / loop to turn that off if it isn't what you want.

  10. #10
    I would of thought file/preview/flash would be the way to test it?...its not really a movie is it?, its more a interaction...a program

  11. #11

    also need tell target too

    Sorry, if you use 'goto and play frame 2' alone it will try to play frame to of your mian movie. What you need to do is use 'tell target':

    1) Drag the library moviethat has a stop action in its first frame on the stage.

    2) Select it.

    3) Name its instance - NOT frame. this is a very small box in a window and will give that instance of the library movie that you selected on the stage a name to refer to it by.

    4) the use the tell target and goto and play actions like this:

    {telltarget mymoviebutton {goto and play frame 2}}

    Make sure the goto and play action is a subset of the telltarget function by dragging it to the right place.

    I just recently learned this myself after a lot of frustration.

  12. #12
    yes, it probably is best to use preview. My PC crashes hard whenever I use the Flash program to access the my browser so I can't either use preview or even test (when test has to go to a URL). I always end up having to go to where I saved the swf / html and run it from there.

  13. #13

    OOPS

    I just did it on my own and you don't need the tell target action - sorry Newbie helping newbies...

    But if you did try that, do the same thing, but select a different graphic and give it the command to make it happen as a tell target goto and play frame 2 This will produce a disjointed rollover where putting your mouse one one thing makes another thing animate.


    [Edited by Noslen on 08-03-2002 at 10:08 PM]

  14. #14
    Got you up until part 4...what?!

  15. #15
    Hope you read the 'oops', but it is a good thing to use to make a disjointed rollover with Flash. When applying the actions to the library item you dragged onto the stage select it and just drag the 'telltarget' function and then the 'goto and play' action below it but with =in the telltarget's brackets - you will see it indented if you do it right.

    To do it just as a click on the object itself to play its animation just select the library item you put on the stage and drag 'goto and play' onto the blank area to the right and then set the parameters below for frame 2. This will tell Flash to play frame 2 of the object. ALso set it as mouse down or over and uncheck on load in the checkboxes.

  16. #16
    Yeah I certainly wanna know how to do those disjointed movie rollovers like on your site...but need to work out the basics first. When explaining tell targets it would help if you also said in which mode I should be in "scene, movie clip or button" mode,

    thanks!

  17. #17
    yes my language is a bit vague - i have been using stage when i should have said scene

    SCENE = the main area of Flash

    LIBRARY = where you make the movies clips or buttons

    Try to do as much as you can in the library - my site is only one frame - not counting the single preloader frame that is frame 1. And that includes all the pictures, animations and various parts of the site.


  18. #18
    use the tell target action in the scene area of Flash. You can have many instances of the same movie clip - a library item - and give each a different name and they will respond only when they are called by that name using the tell target action in the scene area.

  19. #19
    ARGHHHHHH!!!!!...what?!, your site is made with one frame?!?!...just my button has 10 frames!, I give up!!...3:10am need sleep. This whole button thing is a absolute nightmare...been trying it for about 6 months now!

    BUt thanks for your support really appreaciate it!

    Goodnight

  20. #20
    I mean that my site's scene is only one frame on the timeline but the items in the library are many frames each. 3:10 am is a bit late, I hope this has been of some help to you...

    Send me your email address and I will send you a simple example of the source and swf of both a direct mouse animation and a disjointed rollover. Once you see it, it will be no problem to create some really cool stuff that only Flash can do.

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