Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM flash

date posted 1st October 2002 18:45

Thanks Guys

I'm a total newbie at flash, although I have used the simplest of actions,
where exactly do I insert that code!? is there somewhere in the actions
palette? :c)

Best Regards
D Thomas

-----------------------------------------------------------------
Web: http://www.twdmedia.com
Mail: [EMAIL REMOVED]
Tel / Fax: 07092 308437
-----------------------------------------------------------------
----- Original Message -----
From: "Aral Balkan" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Tuesday, October 01, 2002 3:36 PM
Subject: Re: FN-FORUM flash


frame 1 - label: "check"
if (this.getBytesLoaded() == this.getBytesTotal()) {
gotoAndPlay("start");
}

frame 2:
gotoAndPlay("check");

frame 3 - label "start"
// start your movie here


This is the simplest way. There are much more complicated ways and I have an
over 500-line movie loader class to prove it :)

If you'd like something a bit more advanced, use an enterFrame listener:

_root.onEnterFrame = function() {
if (this.getBytesLoaded() == this.getBytesTotal()) {
gotoAndPlay("start");
}
}

This will basically get rid of your frame loop and allow all the code to be
in one place. If you're feeling more adventurous, don't overwrite the
_root's onEnterFrame but either create an empty movie clip (Flash MX only)
or create an empty clip on the stage (lets call it frameEvent_mc) and have
its onClipEvent(enterFrame) call your load check function:

eg. on the frameEvent_mc movieClip:

onClipEvent (enterFrame) {
_root.testLoaded();
}

_root.testLoaded = function() {
if (this.getBytesLoaded() == this.getBytesTotal()) {
gotoAndPlay("start");
}
}

Of course the best way, is to have a frame event engine of some sort (FLEM
is overkill for MX but good for Flash 5, as is ACK!) and load your movies
into movie clips instead of _levels or the main timeline and preload that
way. I'm going to be releasing my Flash MX ActionScript library soon that
has classes that handle all this very elegantly. If you'd like me to send
you a copy beforehand, let me know.

hth,
Aral :)
--
Aral Balkan
Director, Bits And Pixels Ltd.
http://www.BitsAndPixels.co.uk
24 Claremont Heights, 70 Pentonville Road,
London, N1 9PR, United Kingdom.
(t) +44 (0) 20.7278.1825 (m) +44 (0) 07986.124219




Messages by Day
October 31st 2002
October 30th 2002
October 29th 2002
October 28th 2002
October 27th 2002
October 26th 2002
October 25th 2002
October 24th 2002
October 23rd 2002
October 22nd 2002
October 21st 2002
October 20th 2002
October 19th 2002
October 18th 2002
October 17th 2002
October 16th 2002
October 15th 2002
October 14th 2002
October 13th 2002
October 12th 2002
October 11th 2002
October 10th 2002
October 9th 2002
October 8th 2002
October 7th 2002
October 6th 2002
October 5th 2002
October 4th 2002
October 3rd 2002
October 2nd 2002
October 1st 2002


Messages by Month
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000