A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Help, I've javascripted and I can't get up!

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Posts
    3

    Help, I've javascripted and I can't get up!

    Ok, I know just enough in both flash and javascripting to make myself dangerous. That said, here's what I'm trying to do:
    - I've located a javascript called "TinyScrolling" that is a vertical scrolling script that automatically scrolls a page down to an anchor point.
    - I've created a flash nav bar that I would like to use with this script.
    - My attempt at melding these too items can be located here: http://www.bryankatzel.com

    Currently, the two pieces have just been mashed together and if you press the very first button (the WORK necktie) you will see that it takes you to the sixth paragraph but without the tinyscolling java effect. The buttons below the flash do work fine.

    So, after all that, what action do I need to tell my flash nav button to do to work with the javascript?

    Thanks ahead of time for any thoughts or instruction, I really appreciate any help.

  2. #2
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    from flash, you can use the getURL() function to call javascript functions like so:

    getURL("javascript:myFunc('param');");

  3. #3
    Junior Member
    Join Date
    Jan 2007
    Posts
    3
    Thanks for the info, but... not sure if I can get that to work. I have adjusted the page slightly, just for reference it is http://www.bryankatzel.com

    Once again, I'm super new at this so I could be setting the parameters wrong or not using the right function. Could someone maybe help me with the code should be.
    Thanks again!

  4. #4
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    hmm, yeah, after analyzing the javascript of that code, when the page is loaded, it takes those links on the page and replaces them with a javascript function, initScroll. initScroll function works based on the target file. It doesn't take a parameter, so you cant call that javascript function, it won't work.

    I would suggest doing this. Look into writing a custom initScroll function that does the same thing, but works with some parameters. If you can't get something, I don't have the time at this moment, but possibly tomorrow or later tonight I'll have time to throw something down that will work.

  5. #5
    Junior Member
    Join Date
    Jan 2007
    Posts
    3
    Wow, I really appreciate the offer. I'm going to work on it tonight but if you don't mind and have the time I'd love your help... me not speak java good

    Thanks again!

  6. #6
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    hey man, im sorry, but i just don't have time to get that working for you. i have too many other actual work obligations. i hope i at least set you on the right track to now ask a more specific question.

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