A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Is it possible to use HTML anchors in actionscript scrolling?

  1. #1
    Member
    Join Date
    Feb 2006
    Posts
    53

    Is it possible to use HTML anchors in actionscript scrolling?

    good day all,

    i'm trying to create a actionscript scrolling text box with up / down buttons but also have html anchors to "go to answer" and "go to top"... Is this possible?

    Any ideas and suggestions are always appreciated!

    Thanks,

    Brook

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    No anchors are not supported in Flash HTML

    You can however keep track of the scroll position and use that with a bit of trial and error

  3. #3
    Member
    Join Date
    Feb 2006
    Posts
    53
    thanks for the post... I will try another route..

  4. #4
    Member
    Join Date
    Feb 2006
    Posts
    53
    Are there any alternatives to using anchors in Flash?

    Brook

  5. #5
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Quote Originally Posted by bebeard
    Are there any alternatives to using anchors in Flash?

    Brook
    http://sandbox.blogdns.com/examples/...nchors_KM.html

    Creative thinking and a bit of visual trickery. This example uses maxscroll to manipulate a single massive html textfield as if it were using anchors. This is just one of many ways to do this and the abilty has been around since Flash5 and just one of many ways to accomplish what you want using string functions. Once you work out what lines are your section headings in the huge html textfield (which would change depending on the width of the field itself)...it's a breeze to make it look and act just like it's html counterpart would in a page.

    Notice the scrollbar is sent to the correct position with each anchor. This HAS to use a scripted scrollbar and would not work if I enabled the scrollbar from the GUI. I could attach sounds to each section link....use buttons instead of text for the links or just about any other thing you could imagine.

    Here is the kicker.
    Always look for the simplest solution for any problem and then expand upon a working routine. Other than the few lines of code to create the scrollbar in this one....the actual code to simulate the anchors is only one line of script.

    I'm wrapping it up now for my download section. Now that my last portal is in place I'm adding all my downloads to my download module to continue supporting the platform.
    Last edited by Chris_Seahorn; 03-12-2006 at 12:10 PM.

  6. #6
    Member
    Join Date
    Dec 2005
    Location
    Park Slope, Brooklyn
    Posts
    56
    Quote Originally Posted by Chris_Seahorn
    http://sandbox.blogdns.com/examples/...nchors_KM.html

    Creative thinking and a bit of visual trickery. This example uses maxscroll to manipulate a single massive html textfield as if it were using anchors. This is just one of many ways to do this and the abilty has been around since Flash5 and just one of many ways to accomplish what you want using string functions. Once you work out what lines are your section headings in the huge html textfield (which would change depending on the width of the field itself)...it's a breeze to make it look and act just like it's html counterpart would in a page.

    Notice the scrollbar is sent to the correct position with each anchor. This HAS to use a scripted scrollbar and would not work if I enabled the scrollbar from the GUI. I could attach sounds to each section link....use buttons instead of text for the links or just about any other thing you could imagine.

    Here is the kicker.
    Always look for the simplest solution for any problem and then expand upon a working routine. Other than the few lines of code to create the scrollbar in this one....the actual code to simulate the anchors is only one line of script.

    I'm wrapping it up now for my download section. Now that my last portal is in place I'm adding all my downloads to my download module to continue supporting the platform.
    This is pretty hot sh*t! Glad to see you are continuing to help the rest of us make the most of our use of KoolMoves.

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