Skip navigation
cigowie
Currently Being Moderated

embeded swf file

May 14, 2012 1:11 PM

i am using as2 and i want to embed a swf file into another swf project and have the embeded file play once the site is loaded can someone help please.

 
Replies
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    May 14, 2012 1:13 PM   in reply to cigowie

    you can load a swf file into another swf using loadMovie(), loadMovieNum() or loadMovieClip().  is that what you want to do?

     
    |
    Mark as:
  • Currently Being Moderated
    May 14, 2012 4:37 PM   in reply to cigowie

    Just put the code that is inside the function in a frame of the timeline where the movie is...

     

         this.loadMovie("mymovie.swf",moviswf);

     

    the rest of the code is what makes you need to click

     
    |
    Mark as:
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    May 15, 2012 7:12 AM   in reply to cigowie

    do you want to load "mymovie.swf" when your main swf starts or when a button is clicked in your main swf? 

     

    if the former, assign your button an instance name (eg, btn) and attached to a frame (NOT the button or any other object), use:

     

    btn.onRelease=function(){

    moviswf.loadMovie("mymovie.swf"); // assuming moviswf is a movieclip that you want to replace with mymovie.swf.  p.s.  watch your spelling of moviswf.  it's probable that should be movieswf

    }

     

    if the later, just use:

     

    moviswf.loadMovie("mymovie.swf");

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 7:50 AM   in reply to cigowie

    That error is because you are attaching the code to the object, not the timeline.  Click on a frame and enter the code.

     
    |
    Mark as:
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    May 15, 2012 9:15 AM   in reply to cigowie

    click an empty part of the stage (to deselect everything), click your button (to select it) and in the properties panel you'll see a input field where you can type an instance name.

     

    if you don't see a properties panel, click windows > properties.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points