A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Movieclip Button Hyperlink help

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Location
    Nottingham, England
    Posts
    4

    Question Movieclip Button Hyperlink help

    I have a Migraine enducing problem.

    Iam creating a Picture preview system, so far I have a movie clip with all of my images inside,
    a load of buttons that when pressed make the movie clip swap to the correct picture and stop there.

    All of this is fine, my issue is that I wantto place the Movie clip in question into a button, and depending on the particular frame the movie is showing, it will send the user to a different Website.

    *falls over*

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    bad idea. once the mc is in the button you can't target it anymore.

    place a button inside your movieclip instead. You could have a button per frame (tedious), or code the urls call depending on the _currentframe, for instance using an array, and calling:
    PHP Code:
    getURL(myarray[this._currentframe+1], "_blank"); 
    for the array part:
    PHP Code:
    myarray = new Array();
    myarray[0] = "http://www.flashkit.com";
    myarray[1] = "http://www.google.com"
    on frame1 you call flashkit, onframe2 you call google, etc.
    not tested but should work.

    gparis

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Location
    Nottingham, England
    Posts
    4
    Forgive my lack of Actionscript knowledge...

    Iam mildly confused about the Arrays. they 'seem' to work under the setup I have used.

    The MC
    PHP Code:
    onClipEvent(load) {
        
    stop();

    myarray = new Array();
    myarray[0] = "http://www.flashkit.com";
    myarray[1] = "http://www.google.com"

    Button on a layer ontop of the MC that is linked
    PHP Code:
    on (release) {
        
    getURL(myarray[mc._currentframe+1], "_blank");

    "I work for Peanuts... no Seriously, I WORK for Peanuts!"

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    you don't need the onClipEvent. That block will work as well in a frame.

    Actually your setup shouldn't work. Since you used that clipEvent on a movieclip, myArray now is part of that movieclip scope, instead of the timeline where your button sits.

    For exemple if that movieclip instance name was mc, you should reference the Array as: mc.myarray

    More info about Arrays in the liveDocs (links in my footer)

    gparis

  5. #5
    Registered User
    Join Date
    Nov 2009
    Posts
    1
    How do you hyperlink a phone number for mobile websites? I have a website and I want to create a mobile version for viewing on cell phones. I know there is a way to hyperlink a phone number so that when you highlight the number, the phone will recognize it and “ask” you if you want to dial the number. I need the html tag that will allow this to be done. Thanks

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