A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: LOADING A SWF IN A MC.....is it possible

  1. #1
    Senior Member
    Join Date
    Dec 2000
    Posts
    620
    i have a draggable mc and i want to load a swf in that mc so that i drags as well..........

    is this possible....

    thanks,
    mannyme80

  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    515
    sure,
    make your draggable movie clip, mc1.
    then:
    loadMovie("loadable.swf", _root.mc1);

  3. #3
    Senior Member
    Join Date
    Oct 2000
    Posts
    122
    It is indeed. All you do is ---
    Insert a button in the Movie clip.
    Assign the actionscript to the button
    on (press) {
    startDrag ("_root.movieclip");
    }
    on (release) {
    stopDrag ();
    }

    Note -- movieclip is the instance of your movie. Then on the First frame of the movie clip , attach this action script:

    loadMovieNum ("your movie file pointer", "_root.movie clip");

    where... Your movie file pointer is the address of your swf. to be imported
    and.. movie clip is again your instance

    That's it

    [Edited by Mr Mayonnaise on 07-28-2001 at 03:51 PM]

  4. #4
    Senior Member
    Join Date
    Dec 2000
    Posts
    515
    oops. I apologize. right after i sent my last post, i realized that the newly loaded swf would replace the content of the draggable clip, so it would not be draggable anymore the way i set it up.

    you would have to put another empty clip inside the draggable clip, and target the loading swf to that.

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Posts
    620
    ok...i see what youre saying....


    had i done it the first way..it would have replaced the mc1,
    would it not have?

    thanks,
    mannyme80

    i havent the expirence to get creative yet in AS
    i can understand it all and hope to be able to expirement on my own shortly.....hopefully...

    mannyme80

    ps. thanks again

  6. #6
    Senior Member
    Join Date
    Dec 2000
    Posts
    515
    right. it would have replaced the existing mc.

    keep experimenting, reading books and flashkit and having fun. you'll learn a lot.

  7. #7
    Senior Member
    Join Date
    Dec 2000
    Posts
    620
    thanks and i have learned alot...

    everything i know is self taught through turtorials and of course the flashkit message board...

    i owe alot of my flashing to flashkit and kind people such as yourself...

    thanks again,
    i really do appreciate it...
    mannyme80

  8. #8
    Senior Member
    Join Date
    Dec 2000
    Posts
    515
    I've learned a lot here too. But most of what I've learned has come from two books: Foundation Flash Actionscript, and Flash 5 Studio by Friends of Ed. http://www.friendsofed.com
    I can't recommend those books enough.

  9. #9
    Senior Member
    Join Date
    Dec 2000
    Posts
    620
    thanks....ill check 'em out...

    i can use all the help i can get

  10. #10
    Senior Member
    Join Date
    Dec 2000
    Posts
    620
    oh, hey...i had a quick question...

    i cant seem to get why some sites animations run so much smoother than mine.....

    i run at 24fps and even still when i have more than 1 or 2 small animations going it lags up....

    i know i have a weak video card, but on some sites, they run really well.....is there a trick to having small animations running....

    thanks
    mannyme80

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