SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2003
    Location
    CT
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Preloading in macromedia flash MX

    hello all!

    view my current project http://www.naruto-online.com/work/po...sh/splash.html

    at the end of my scene one i did put
    ifFrameLoaded ("Scene 2", 141) {
    gotoAndPlay("Scene 2", 1);
    }
    though, when i open the swf on internet, as you will see, the under the sea picture fade in isn't working properly because it has not been loaded.

    Did the actionscript to preload in Flash MX is different than in Flash 5?

    Thanks in advance.

    Josh

  2. #2
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ifFrameLoaded is Flash 4 syntax which was deprecated in Flash 5, at the moment it works with the Flash 6 player but may not with future releases.

    Macromedia recommend using the _framesloaded property instead.

    eg.

    Code:
    if (_root._framesloaded == _root._totalframes) {
    	// movie loaded
    gotoAndPlay("Scene 2", 1);
    } else {
    gotoAndPlay(1);
    }
    You can also you it for testing if a specific frame is loaded. As your using Scene's you'll need to total up the amount of Frames in each scene.

    in your example this would be the total frames in Scene 1 + 141

    which could look like...

    if (_root._framesloaded == 151) {
    // scene 2 frame 141 loaded
    gotoAndPlay("Scene 2", 1);

    }

  3. #3
    SitePoint Evangelist j0n's Avatar
    Join Date
    Apr 2003
    Location
    uk
    Posts
    545
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aslo check http://www.t0v3.com for a preloading tut step by step.


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
  •