A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Attahing an AcrtionScript to a movieClip!

  1. #1
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    Attahing an AcrtionScript to a movieClip!

    i want to attach an external ActionScript that is in a file on the server,
    to a movieClip that is on my timeLine!
    is it possible to load an external actionScript and then to attach it to a movieClip?


    how can i put the action script in an swf file,and load it and attach to a movieClip?
    thnaks in advance
    Peleg

  2. #2
    Sonic the FlashHog geoffp08's Avatar
    Join Date
    May 2002
    Location
    Orlando
    Posts
    237
    yes you can. I just read this last night. but i left my book at home. something to do with ".as" and it has to be in a text file. you can then load external actionscript onto certain frames or objects in your movie... Ill think about this one a little longer and get back to you if i find something out.
    geoff
    Moving at the speed of Flash

  3. #3
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    you only need to post your question once...

    http://www.flashkit.com/board/showth...hreadid=422942

  4. #4
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    http://www.google.com/search?q=server+side+actionscript

    may I ask why you need to do this?

  5. #5
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789

    Re: Attahing an AcrtionScript to a movieClip!

    Originally posted by pelegku
    how can i put the action script in an swf file,and load it and attach to a movieClip?
    load the movieclip onto the _root timeline. make the actionscript refrence your movieclip using the dot syntax _root._mc.submc.etc

  6. #6
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    Originally posted by geoffp08
    yes you can. I just read this last night. but i left my book at home. something to do with ".as" and it has to be in a text file. you can then load external actionscript onto certain frames or objects in your movie...
    Unless using flash remoting, that is done client side only, when the movie is published. not dynamically on the server...

  7. #7
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    ok so i will load the swf file

    that contains the code, but how can i attach t to a movie clip?
    do u have a working example?

  8. #8
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    explain attach...

  9. #9
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    ok this is what i mean:

    i want to load a jpg into an empty movieClip that i create using the function :
    createEmptyMovieClip() !
    then i want to take an ActionScript (a code ) that i wrote in advance, and is sitting in a text file on a server with the name for example : mycode.as !
    then i want to load the code into my movie, and to attach (to make the code work as it was written from the beggining on the movieClip that i have created!

    thanks in advance
    Peleg

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