Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: swf swapping???

  1. #1
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    swf swapping???

    Hi everybody, I need your help!

    Is is possible to embed a flash movie (movie1.swf) to play for a set period of time (say 15 secs) then replace or swap it for another flash movie (movie2.swf)?

    Hoping you can help...
    Torg.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can't you do that from within the flash movie - add a load command at the right point in the timeline?
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #3
    New Coder
    Join Date
    Sep 2003
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: swf swapping???

    Originally posted by torg
    Is is possible to embed a flash movie (movie1.swf) to play for a set period of time (say 15 secs) then replace or swap it for another flash movie (movie2.swf)?
    Paste this code onto a movieclip.

    Code:
    //this script makes the clock countdown from 15 to 0
    onClipEvent(load){
    //get current time
    var startTime= getTimer();
    //the amount of seconds to countdown
    var countAmount=15;
    //keep track of how much time is left
    var elapsed=0;
    }
    onClipEvent(enterFrame){
    //see how much time has elapsed
    elapsed=getTimer()-startTime;
    //do stuff
    if(elapsed < countAmount*1000){
     counterOutput=countAmount-Math.floor(elapsed/1000);
     }else{
     loadMovie("blah.swf", _level0);
     }
    }
    http://www.dotdragnet.com
    http://www.kevinleitch.co.uk

  • #4
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'll give it a try...
    Thanx!

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    why would you want to do that? just load both into twodiffern't scenes
    photoshop too expensive? use the GIMP! www.gimp.org

  • #6
    New Coder
    Join Date
    Sep 2003
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by whackaxe
    why would you want to do that? just load both into twodiffern't scenes
    Never use scenes

    They suck so much they blow

    1- name/value pairs have a tendency to get lost.

    2- Unnecessary filesize when placeholders can be created with 1 line of code.

    3- Stupid amounts of coding necessary to talk across them accurately.
    http://www.dotdragnet.com
    http://www.kevinleitch.co.uk


  •  

    Posting Permissions

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