View Full Version : Smoke FX
tolk
August 3rd, 2006, 03:51 PM
Here's a little smoke effect i made a few days ago, i did an optomized version that lowers the cpu usage a bit and a version that produces random generated lightning bolts but not on this comp. If people want ill post them up tommorow when i get access.
HERE (http://www.mchugh.btinternet.co.uk/emitter.swf) - you'll need to right click, save as or it will be full screen and cause slow down
HERE (http://img130.imageshack.us/my.php?image=lightningstormfi8.swf) - lightning storm version
also:
newsCube(xml) (http://www.mchugh.btinternet.co.uk/newsCube.html)
fullPreloadXmlGallery (http://www.mchugh.btinternet.co.uk/xmlgallery4.html)
GPP
August 3rd, 2006, 04:00 PM
Very nice and theres 1% CPU Usage - fullscreen
audiotheory
August 3rd, 2006, 04:19 PM
Very nice!
boohaha
August 3rd, 2006, 04:57 PM
we want lightning bolts!!! :azn:
very cool indeed bro!
tolk
August 4th, 2006, 04:33 AM
we want lightning bolts!!! :azn:
very cool indeed bro!
HERE (http://img130.imageshack.us/my.php?image=lightningstormfi8.swf) you go
designer007
August 4th, 2006, 04:45 AM
nice :)
digitaldivide
August 4th, 2006, 05:03 AM
*lol* haha! Just giving them what they want, huh! I like the gallery as well, but the pictures do not seem to scale to the exact size of the thumbs. I got a code somewhere, which works with imageAspectRatio, so the imag will always be scaleed in such a way, that it fits the best, but it's original proportions are (allmost) not changed. I havn't written this script and I am very sorry to see, that I cannot recall the name of the two guys at flashkit who helped eachother on this one. One of them was to be found here regularly, but lately he is not very much around, I believe. It was ment for a backround, but maybe you can do something eith it. Here it is:
Stage.scaleMode = "noScale";
Stage.align = "LT";
// BG has been removed from stage in project file... It is created here...
// I find it difficult to manipulate 'empty' movieclips in the authoring system
// so I'll just create it here...
_root.createEmptyMovieClip("bg", 1);
// Here we create a child clip 'bg.bgLoad' which will be used for loading
// This prevents the resize handler from
// getting wiped out
bg.createEmptyMovieClip("bgLoad", 1);
// This insures the content sits on top of bg
inhoud.swapDepths(2);
Stage.addListener(bg);
bg.onResize = function()
{
var imageAspectRatio = this.bgLoad._width/this.bgLoad._height;
var stageAspectRatio = Stage.width/Stage.height;
if (stageAspectRatio >= imageAspectRatio)
{ // long skinny stage - match image width and adjust height to fit
this._width = Stage.width;
this._height = Stage.width / imageAspectRatio;
}
else { // tall narrow stage - match image height and adjust width to fit
this._height = Stage.height;
this._width = Stage.height * imageAspectRatio;
}
// center the background
this._x = -(this._width - Stage.width)/2;
this._y = -(this._height - Stage.height)/2;
}
inhoud.onResize = function()
{
// a little debugging
trace('content resized called');
this._x = (Stage.width-this._width)/2;
this._y = (Stage.height-this._height)/2;
};
Stage.addListener(content);
content.onResize();
var mclListener:Object = new Object();
mclListener.onLoadStart = function(bg:MovieClip) {
trace('started');
};
mclListener.onLoadProgress = function(mc, w, t)
{
trace('progress: '+w+", "+t);
var w = image_mc.getBytesLoaded();
var t = image_mc.getBytesTotal();
};
// THIS IS BRAND NEW
// IT does what you expect onLoadComplete to do...
// - the movie is the final width & height here...
mclListener.onLoadInit = function(mc:MovieClip)
{
trace("complete: " + _root.bg._width + ", " + _root.bg._height);
// NOW we can call _root.bg.onResize()...
_root.bg.onResize();
// do not use 'mc' for the resize, resize the parent.
}
mclListener.onLoadComplete = function(mc:MovieClip)
{
trace("loaded: " + _root.bg._width + ", " + _root.bg._height);
content.gotoAndPlay(2);
// do NOT call _root.bg.onResize here - the width and height will still be 0,0
};
mclListener.onLoadError = function(mc:MovieClip, errorCode:String) {
trace('not loaded');
};
var image_mc1:MovieClipLoader = new MovieClipLoader();
image_mc1.addListener(mclListener);
// Here I load the movie into bg.bgLoad, not just bg
image_mc1.loadClip("backround.swf", bg.bgLoad);
tolk
August 4th, 2006, 05:12 AM
Sorry but the images do scale to the exact size of the thumbnail. It's just those images contain white space around them in the actual image file, hence why you see white space in the flash file.
i.e. I am using this image: image (ok its hard to see on that but if you drag over it you will see the white space around the image). (http://www.mchugh.btinternet.co.uk/images/t1.jpg)
Everything scales on the gallery, the main image and thumbs, don't worry iv'e tested it. It also keeps the images in proportion i.e. doesn't distort them but maintains their aspect.
buckcee
August 4th, 2006, 11:04 AM
smoke effect looks real nice.
tolk
August 9th, 2006, 06:43 AM
thanks
digitaldivide
August 9th, 2006, 07:07 AM
ok, then ignore my previous posting. Very nice!
tolk
August 9th, 2006, 10:19 AM
Thanks also :}
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.