SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2001
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    loading movie clip into another movie clip

    hi

    i know this should be simple!

    how do you load a movie clip into another movie clip
    i have a main swf with a movie clip instance named sq and an external swf file named pg1.swf.
    when pg1 btn is clicked i want the pg1 swf to load into the movie clip instance called sq which is in the main swf.

    ive used this code on (release) {
    loadMovie("pg1.swf", "sq");
    }

    but it dont work , the sq instance just seems to disapear and the pg1 swf dosent appear.

    i can get it to work if i load it into a layer but thats not what i was trying to do , im using the target as sq.
    all the files need are in the same folder.

    thanks

    chris

  2. #2
    SitePoint Guru MG315's Avatar
    Join Date
    Mar 2003
    Location
    Houston, Texas
    Posts
    758
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try
    Code:
    on(release){
       _root.sq.loadMovie("pg1.swf");
       }
    theres 2 things that might have needed changing in your code. not that this SHOULD matter, but it does sometimes, instead of putting a ,"sq) put it at the beginning like sq.loadMovie. also it might be looking for the sq inside the button, therefore i used the _root. if you dont want to go all the way up (this is in a swf that has been loaded into another, so all the way up wouldnt target correctly) you can use _parent.

    hope that helps


Bookmarks

Posting Permissions

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