A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: buttons don't work as links

  1. #1
    Here's my problem.

    I have a button. It's a button on which the text is "Links". Assuming I want it to go to "links.htm" as a relative URL (not that this is the problem cuz it doesn't work with an absolute URL either), I entered the following code:

    on(release) {
    getURL("links.htm", "_self");

    which should be right, I think. If I leave out the on(release) it just goes to the URL without my clicking anything as soon as the button loads, and if I put in the on(Release), even clicking it doesn't work. PLEASE help me!!


  2. #2
    President, save the
    New Zealand dollar foundation

    Join Date
    Jun 2000
    are you sure that action is going onto the button?
    a common mistake is to select the frame where the button resides (in the timeline), open the actions pallette, and enter your action.
    What you are then doing is putting the action onto a frame.
    You need to select the button on the stage, open the actions window, and enter your button action there.
    When you open the actions window you will see
    Actions - Frame
    if you have a frame selected, and
    Actions - Movie Clip
    if you have an object on the stage selected.

    Make sense?

  3. #3

    nope that's not it ...

    Yeah the actions panel says Actions-button
    so i know i'm applying the action to the button.

    and i know when i figure this out it'll be somehting so simple that i'll kick myself for not figuring out, but for now i'm just screwed.


  4. #4
    Join Date
    Feb 2002
    if u are clicking on the frame in the timeline within the action-panel it wont work right. You need to click on the actual button on the stage, and apply the action to that button, and get rid of the action on the frame within the timeline.

  5. #5
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    press the picture...
    Are you using on(release) or on(Release) as you wrote in your explanation? If you are using expert mode, switch to normal mode and it will automatically correct this kind of mistake.

  6. #6

    nope ... tried that

    I'm using on(release)with no caps. i tried entering it myself as well as in normal mode.

    also, I'm sure i'm applying it directly to the button from the stage and not to the frame. there's no code for the frame, only for the button itself.

    thanks though

  7. #7
    Junior Member
    Join Date
    Mar 2002

    Re: nope ... tried that

    Is your button encapsulated inside a movieClip ? In this case, maybe have you used another event method (such as onPress, onRollOver or onRelease...) and it could explain why your script is not executed. Only the first event method in your hierarchical structure is recognize.

  8. #8
    why not throw the .fla somewhere online and we can take a look.

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