dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flash 5 function don't work in MX

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    4

    Post

    Hi FlashExperts,
    I've made a newsscript in flash, it works perfect in flash 5, but in MX it doesn't work!


    This is my generated a href in html:
    asfunction:_root.whichLine,my text comes here

    This is the Flash code:

    Frame 1: (loadlist)
    system.useCodepage = true;
    url = "http://www.mydomain.com/";
    loadVariablesNum(url add "news.asp?action=list", 0);
    play(); // at frame 10

    Frame 10: (list)
    if (news eq "") {
    list = "please wait..";
    gotoAndStop("loadlist");
    } else {
    list = "There are " add count add " comments:<br><br>" add news;
    stop();
    // this is the problem, I think:
    function whichLine(which) {
    var temp = which.split(",");
    title = temp[0];
    gotoAndStop("loadview");
    }
    }

    Thanks,
    Tony

  2. #2
    World Kit Vote Holder Abelius's Avatar
    Join Date
    Feb 2002
    Location
    US
    Posts
    963
    hmmmm...
    I don't see where do you call the whichLine function, and where do you pass the which argument...

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Posts
    4

    Asfunction in MX

    the function is called in the asfunction link and the "which" parameter is also included in the link

    the MX help said this (search on asfunction):

    function MyFunc(arg){
    trace ("You clicked me!Argument was "+arg);
    }
    myTextField.text ="<A HREF=\"asfunction:MyFunc,Foo \">Click Me!</A>";
    When the hyperlink is clicked, the following results are displayed in the Output window:

    You clicked me! Parameter was Foo

    btw sorry for my english

  4. #4
    chatbugs.com ***** flashTampaDotCom's Avatar
    Join Date
    Mar 2002
    Location
    Tampa, Florida
    Posts
    171
    Like the others, I cannot troubleshoot your problem without more information, and maybe even the fla to see whats really going on; BUT, I CAN offer you this link, perhaps just to ensure you are not encountering a problem using the asfunction in flash..

    http://www.flashtampa.com/flashtutorials/asfunction.swf
    http://www.flashtampa.com/flashtutorials/asfunction.fla

    I made this example when answering similar questions for other posts. Just thought I would share it again!

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