A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] Control Load Element

  1. #1
    Member
    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    47

    resolved [RESOLVED] Control Load Element

    Hi, I wanna know how can I make to a Load Element load a swf file only when I press a button.
    Is aways load the swf when the movie begin, but I want to make this load when a button is pressed.

    How can I made this?

    Sorry my bad english.
    Thanks
    []'s
    leocavalcante.com

  2. #2
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126

    Use script to do it

    Don't use the load swf element...

    for the simplest method...

    1) add a blank layer called object holder, or whatever you want... we will call it "holder" for now...

    2) add the button you want to do the loading with

    3) add the following script to the button...

    element ("holder").loadMovie("your_movie.swf");

    this should work...

    if you want to load the movie to take the place of your root, don't bother with the "holder" layer. just add this to the button...

    root.loadMovie("your_movie.swf");
    //this works to
    loadMovie("your_movie.swf");

    Zoranan

  3. #3
    Member
    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    47
    Thank you very much Zoranan.
    []'s
    leocavalcante.com

  4. #4
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    Glad to help

    Zoranan

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