PDA

Click to See Complete Forum and Search --> : flash without embed



catbert303
05-04-2004, 06:18 PM
during some unrelated browsing I just stumbled across a new (to me anyway) method of displaying flash in a page without the embed tag, courtesy of W3C/opera guy Ian Hickson.

click... (http://ln.hixie.ch/?start=1081798064&order=-1&count=5)

it uses a far more brute force approach than flashsatay (http://www.alistapart.com/articles/flashsatay), so it fails on flashsatay's stated goal of lighter markup. however so far it has worked in browsers where flashsatay died spectacularly (like my old copy of IE 5.5 which would render textfields instead of the flash movie)

does anyone actually use any of these methods in pages, or do you give up on full standards compliance and use the embed tag in pages that use flash?

abyssws
08-12-2004, 01:45 AM
I would use these standards but am trying to find a way for the flash satay method to have the calling movie show the % of the movie its loading but in the "flashmx" part of this forum people are looking but arn't responding to the action script question about that

do you know of any action script way to do it?(the flash satay way)

abyssws
08-12-2004, 01:49 AM
for some reason the msg board is not sending me emails when people have replied..so if i dont reply email me at info@abyss.ws

catbert303
08-14-2004, 06:19 AM
inside the container movie you could use something like this,


loadMovieNum(variableContainingTheFilename, 1);

this.onEnterFrame = function() {
var loaded = _level1.getBytesLoaded();
var total = _level1.getBytesTotal();
if (loaded > 4 && total > 4) {
var percent = Math.round(loaded / total * 100);
// do something to display the percentage - maybe show it in a textfield, or use a movie clip as a loading bar
if (loaded == total) {
_level1.play();
this.gotoAndStop("hideme");
delete this.onEnterFrame;
}
}
};

stop();


the movie being loaded then simply needs to have a blank keyframe on frame 1 (with a stop() action attached so it doesn't play until it's loaded), the frame labelled hideme in the movie that contains the preloader can be just a blank keyframe (the preloader will sit on this blank frame once it has finished loading the main movie)

abyssws
08-14-2004, 06:42 AM
and report back to you

Abyss

ps many thanks if it works

abyssws
08-14-2004, 09:06 PM
but came up with a funny solution with the help of your script


loadMovieNum(FileName, 1);//Grabs the file name from the webpage
this.onEnterFrame = function()
{
_level1.gotoAndPlay(2); //plays movie - the preloader is in the movie it loads
gotoAndStop(2);//blank frame
};

but what the problem is, when the movie is played in level1,
it will not stop @ stop() scripts!

Can you suggest a reason for this? and a way to fix it?

abyssws
08-14-2004, 09:12 PM
this is the new code...the last code played the preloader and then stopped at the end of the scene, the only change is _level1.gotoAndPlay() to _level1.play()
this is where it plays it and doesn't stop

loadMovieNum(FileName, 1); //Grabs the file name from the web page
this.onEnterFrame = function()
{
_level1.play(2); //Play Loaded movie - preloader is in this movie
gotoAndStop(2); //Hide _root
};

catbert303
08-15-2004, 04:48 PM
you need to delete the enterFrame event once the preloader has finished loading the movie, otherwise the enterFrame loop will continually tell the movie to play (hence any stop actions in the movie will be rendered useless)

abyssws
08-15-2004, 07:34 PM
Ha, Ha! It worked! yay! I got to put this on my website :) this is cool. :)

Thanks for your help with this Catbert,:)

I will definatly be acknowledging you foryour help with this :)

Thanks

abyssws
08-15-2004, 08:08 PM
is there anyway to resize the movie after it has loaded?

What I mean by this is I have made the preload file 1px X 1px
and placed it in a directory that every other flash file can get to,
so that I only will ever have to call the one preload movie(instead of having 20 mini preload movies)

but what happens is it loads correctly but the movie it loads is stretchedand only the very top corner of the of the movie that was loaded i s shown (the rest of the movie cannot be seen cause it has been resized so big)


Is there a way to fix this?

abyssws
08-22-2004, 08:08 AM
heya,

any suggestionsabout the 1px problem? or did you have any problems understanding?

abyss