asfunction help with components...

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default asfunction help with components...

    Hello,

    I am trying to figure out how to asign text in a scrollPane component actions
    to load other movies into different levels in my flash movie. Basically, I
    have a scrollPane component. It has a lot of text in it. I want to be able to
    have certain parts of the text act like buttons to call other movies on
    different levels when pressed. I can do this using invisible buttons but
    sometimes the buttons are not aligning up with the text. I was told asfunction
    would be the way to go. I tried finding information on this but I have not had
    much luck so far. Has anyone done this and know of any good tutorials or a
    good way to explain this.

    Thanks........tg

    tgleaton Guest

  2. Similar Questions and Discussions

    1. FMS UI Components?
      Do you think if FMS support communication UI Components (like SetBandwidth)? May I have the url and I can download themfor flash cs3. Thanks ...
    2. fcs components.
      hi all, i just installed a version of fcs 1.5 mx in my machine. i have fp 9, and authoring flash 8 and mx 2004. it installed the server in my...
    3. ASFunction again .. very close but not quite there
      I have to call a new XML file from the current XML file via a link from what is playing in the TextArea. That link will load a new title into a...
    4. asfunction and mouse events
      I am trying to use an asfunction from a longish text (400 lines) in a text field. My goal is to show a short, explanatory text in a second text field...
    5. Any components of .....
      Has anyone written a component like "Mail Merge" or "Poll Management" in ..NET Can anyone share or redirect me to any URL... Regards,
  3. #2

    Default Re: asfunction help with components...

    first off, i've never heard of asfunction, it probably doesn't exist. you can
    get at the content of a scroll pane by 'ScrollPane.getScrollContent()' you
    could put functions in the movie clip in scrollpane to line up the buttons.

    dk_says_hey Guest

  4. #3

    Default Re: asfunction help with components...

    I'm not sure if this will help:
    not to sure what a scroll pane component is but if it is like a text field
    then this should be somewhat accurate.

    asfunction works with <a href> tags but instead of a hyperlink it can call a
    function.

    <a href="asfunction:function_name, +arguments">text here</a>

    then you would have a function name, in this case function_name,

    function function_name(){
    createEmptyMoveClip("clip",1);
    clip.loadMovie("movie.swf");
    }

    which would handle the loading of the movieclip.
    You shouldn't need to pass any arguments unless you are loading the movies
    from an array in which they have index value then you will need to do some
    argument passing.

    hope this helps.

    Dave_090 Guest

  5. #4

    Default Re: asfunction help with components...

    hey I don't know why my text was deleted, but you can go to the actionscript dictionary to see how to use an asfunction method
    a href="asfunction:function_name, +arguments" text close a

    Dave_090 Guest

  6. #5

    Default Re: asfunction help with components...

    check manual again; it DOES exist ;-)

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  7. #6

    Default Re: asfunction help with components...

    Yes, there is something called an "asfunction" and the "scrollPane" is a
    component found in Mx just like the scrollBar. I have found some things on the
    asfunction in the actionScript dictionary, just not exactly what I want it to
    do. I also have a book "Flash MX Designer's ActionScript Reference" that has a
    little bit about it but not in-depth enough for what I am trying to do.

    Basically, when the movie with my scrollPane comes up I want to be able to use
    asfunction to load another movie into the same level as the one which already
    has the scrollPane component loaded into it. This involves using the
    asfunction which looks something like this:

    Hope this explains it a little better. I tried the following example but
    could not get it to work.

    Create a function on the main timeline something like this:



    code:---------------------------------------------------------------------------
    -----
    jumpFrame = function(targetFrame) {
    gotoAndStop(targetFrame);
    };

    --------------------------------------------------------------------------------

    2. Ensure that "Render as HTML" is selected in the dynamic textfield
    properties.

    3. Use the "a href" HTML tag to create links that jump frames. For example:


    code:---------------------------------------------------------------------------
    -----
    <A HREF=\"asfunction:jumpFrame,5 \">Click here to go to frame 5</A>";

    tgleaton Guest

  8. #7

    Default Re: asfunction help with components...

    dk_says_hey says-
    >never heard of asfunction, it probably doesn't exist
    TOTAL BS, read the help files

    tgleaton, check this thread-


    [url]http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=194&thre[/url]
    adid=783051&highlight_key=y&keyword1=asfunction

    hth

    Jack. Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139