dcsimg
A Flash Developer Resource Site

Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 58

Thread: ARGH!...help on multiple arguments for asfunction...

  1. #21
    Member
    Join Date
    Jun 2004
    Posts
    94

    Again..

    I'm not a programmer...ah my....

  2. #22
    Member
    Join Date
    Jun 2004
    Posts
    94

    Where and how?

    if I trace ("mc"), it returns mc
    if I trace (mc), it returns undefined...

    ?

  3. #23
    Member
    Join Date
    Jun 2004
    Posts
    94

    Think I got it!

    Placing this at the beginning of each frame:

    _root.a.removeMovieClip();

    clear the mc by removing the emptymovieclip...

    Phew!!!...

  4. #24
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    I'm not a programmer...ah my....
    That is no excuse.

    Anyways you got it.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  5. #25
    Member
    Join Date
    Jun 2004
    Posts
    94

    Not an excuse...

    Just a fact...

    thanks again...

  6. #26
    Member
    Join Date
    Jun 2004
    Posts
    94

    Oh my, it's him again...:D

    Is there a way, using the above code, to load a xxx.txt file, and have the asfunction load a graphic, without clicking on something?...barring this, can I call the asfunction from the frame and have it load the graphic?

    Thanks!

  7. #27
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Then you don't need the asfunction any more. just put the loadMovie function within the onLoad event function.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  8. #28
    Member
    Join Date
    Jun 2004
    Posts
    94

    Well...

    Here's what I ended up doing...I couldn't get anything else to work...in the frame that I need the graphic to load, I place the code without the use of the array variables...


    _root.createEmptyMovieClip ("a", 1);
    a._x = 90;
    a._y = 187;
    var mc:MovieClip=_root.a.createEmptyMovieClip ("mc", 1);
    mc._lockroot = true;
    mc._alpha = 0;
    mc.loadMovie ("igaf.jpg");
    //
    _root.onEnterFrame = function ()
    {
    var speed:Number = 8;
    if (mc._alpha < 100)
    {
    mc._alpha += speed;
    }
    else
    {
    delete this.onEnterFrame;
    }
    };

    Anything more elegant would be appreciated...

  9. #29
    Member
    Join Date
    Jun 2004
    Posts
    94

    Another asfunction question...

    how would I go about placing a link on the text page that would use asfunction to point me to a page? as in gotoandplay?

  10. #30
    Member
    Join Date
    Jun 2004
    Posts
    94

    Gave up on dynamic text and moving to imported SWFs...

    Now, here's my question...using the asfunction code provided, how can I modify this for use in an SWF that replaces the dynamic text?...

    As always, thanks!

  11. #31
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    You want to use the dynamic text to replace itself or text in another textfield?
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  12. #32
    Member
    Join Date
    Jun 2004
    Posts
    94

    text to swf...

    I want to paste the text into a static text box...add the necessary links (select text and, I believe, place the asfunction info in the URL box)...then publish this into a SWF...then use the SWF instead...using static text will allow the text to line up correctly...

    So I won't be calling the myText anymore, but want to still use the array in an asfunction call from linked text...

    make sense?

  13. #33
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    I never heard you can use the asfunction in a static textbox. However, then everything is easier. Create a movieclip, name it myBut, put it over the text to use as a link, in the property inspector set alpha of the clip to 0. Then put this script on the main timeline:

    myBut.onPress = function ()
    {
    all the function here
    }

    and that's it.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  14. #34
    Member
    Join Date
    Jun 2004
    Posts
    94

    Pretty simplistic

    I was going to use CSS text decoration as a rollover, but I guess I can jusr colorize the text...unless you have an idea how to animate the link...?

  15. #35
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    You cannot use CSS on static text. Just colorize. You can make the whole thing including the button a movieclip and animate.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  16. #36
    Member
    Join Date
    Jun 2004
    Posts
    94

    Ok...

    Sounds like a plan...thanks again!

  17. #37
    Member
    Join Date
    Jun 2004
    Posts
    94

    Makes no sense...

    according to the Adobe site, concerning using the URL field for selected static test...
    Sure can - you use asfunction.

    Enter this in the Property inspector: asfunction:traceIt

    Enter this code in the Actions panel:

    function traceIt() {
    trace("hey there");
    }

    Ctrl+Enter to test!

    I do so, publish, and am unable to import to stage/library(though with just the static text and no URL, it imports)...would I have to load this into an emptymovie clip for it to work?...and how would that affect the swf scrollbar?

  18. #38
    Member
    Join Date
    Jun 2004
    Posts
    94

    The button approach...

    So I create a button, place it over the text...name it to myBut...alpha to zero...publish...now, when I test the SWF, it shows, but the button is off center from the text by a number of characters...when I try to import it, it does import, but only shows the button!...



    The button position is fixed...now, when I test the SWF, the finger shows when I rollover the button, but when imported, it does not show as a button...
    Last edited by Motty99; 06-29-2006 at 04:40 PM.

  19. #39
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    according to the Adobe site, concerning using the URL field for selected static test...
    Sure can - you use asfunction.
    That is only for urls and not asfunctions.

    the button, but when imported
    Why you need to import? i don't understand what exactly you are doing.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  20. #40
    Member
    Join Date
    Jun 2004
    Posts
    94

    let's see if I can explain more clearly...

    I create a static text box...paste in my text...select a portion of the text and place the asfunction:xxx into the link box (again, per Adobe, this will work)...publish it...try to import it into my project...it won't (any time I have something other than just text, I't won't import)...so I create an empty movie clip...and call the movie from there...it does come into the empty clip, but when the link is clicked upon, I get an undefined error...

    Over to the button theory...static text box...paste text...create a button...place it over text...alpha 0...name the button myBut...on the main timeline place...

    myBut.onRelease = function ()
    {
    _root.clip.loadMovie ("test.swf")
    }

    test it...it shows the link...when imported into the emptymovieclip, it does not show the link!...

    I believe that I will go back to the dynamic text method...it works with the links needed, can use CSS for the text decoration...only drawback it the monospaced fonts that won't line up in antialias for readability...

    Drinks all around!!

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