SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: newbie question

  1. #1
    SitePoint Member
    Join Date
    May 2003
    Location
    bristol, uk
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    alt tags - how to?

    hi, completely new to flash mx and on a steep learning curve. the thing i'm trying to find a solution to is there appears to be no 'alt tag' in flash.

    does anyone have a solution to this problem, otherwise you end up with buttons that don't identify themselves whilst browsing.

    regards

    avatar ;-)
    Last edited by avatar; May 22, 2003 at 08:39.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are no alt tags cos it's not HTML! Accessibility and web standards have always been a Flash issue. However, MX is the first version to support this sort of thing (though not quite the same). See Accessibility and Macromedia Flash MX here: http://www.macromedia.com/software/f...ettingstarted/

    G

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could also make your own alt tags very easily using a movie clip and a text field.

    Make a blank movie clip named alt_tag with the following action in the first frame.
    PHP Code:
    this._visible false;
    this.onEnterFrame = function() {
     
    this._x _root._xmouse
     
    this._y _root._ymouse-this._height;
    }
    this.createEmptyMovieClip("holder"100);
    holder.createTextField("alt_text"1010010020);
    holder.alt_text.background true;
    holder.alt_text.autoSize true;
    holder.alt_text.backgroundColor backgroundcolor;
    holder.alt_text.borderColor bordercolor;
    holder.alt_text.border true;
    holder.alt_text.selectable false;
    holder.alt_text.multiline true;
    holder.alt_text.wordWrap true;
    holder.alt_text.text label
    this._visible true
    You can then attach actions like so to your buttons.
    PHP Code:
    btnServices.onRollOver = function() {
     
    _root.attachMovie("alt_tag""myAlt"0, {label:"Check out our services"bordercolor:0x000000backgroundcolor:0xFFFF99,_x:_root._xmouse_y:_root._ymouse});
    };
    btnServices.onRollOut = function() {
     
    _root.myAlt.removeMovieClip();


    See attached
    Attached Files Attached Files

  4. #4
    SitePoint Member
    Join Date
    May 2003
    Location
    bristol, uk
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    outstanding, took me a few minutes to get my head round what was happening. But have now sorted the code and my buttons.

    Big thank you ;-)

    regards

    avatar

  5. #5
    SitePoint Zealot webQS's Avatar
    Join Date
    Oct 2002
    Location
    Sydney : Australia
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tooltips

    Hi

    I did an experiment on this one, and use it on my site as a nifty little feature. Slightly different to the code posted - I just call a function and pass it the various x.y coords and some text - the function sets up the tooltip to the right size and makes it visible.
    When the mouse rolls off the hit area, the visibility of the clip is turned to 'false'.

    A frame loop causes it to hover around as the mouse moves...

    http://www.webqs.com/experiment.php?id=5

    Cheers
    James

  6. #6
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just as a point of accuracy (oh God, here he goes! ), you're not creating alt tags. You're creating the effect of a "tooltip" popping up. The two aren't related at all. An alt tag is a HTML parameter whereas the "tooltip" is a part of the browser/operating systems GUI.

    Sorry. I'm boring myself too if that's any consolation!

    G

  7. #7
    SitePoint Member
    Join Date
    May 2003
    Location
    bristol, uk
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd like to thank everyone for their input as the result is just what I was after, both examples work really well.

    I know its not a real alt-tag equivalent, but its close enough to identify what buttons do.


Bookmarks

Posting Permissions

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