SWISHmax, a serious competitor for Flash, and affordable

  • SWiSHmax
  • Born
  • Born
  • SWiSHmax
  • Posts: 3

Post 3+ Months Ago

Hi Cuerock,

Of course its absurd, but I still see apparently intelligent people blaming SWiSH for all the evils of the Flash world.
I just found another one: http://www.svachon.com/articles/?ref=2003_09_12

Quote:
I hate to even mention the "s" word, but Flash is not Swish. At least it wasn't before MX 2004. It was nice being able to say "I use Flash, not Swish" to people who think Flash movies are the easiest thing on the planet to create. Soon we'll have thousands of timeline newbies calling themselves "Flash experts" instead of "Swish experts". Swish introduced a wave of terrible Flash sites, and MX 2004 will bring on a new one. So, get ready.

So there you go, its all our fault! I love the "I use Flash, not Swish" bit ... please, Flash ain't rocket science.

I forgot to mention, we also have a SWiSHscript forum for anyone that is interested:
http://www.swishzone.com/forums/index.php?act=SF&f=23

Cheers, David
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • the_real_tisse
  • Graduate
  • Graduate
  • the_real_tisse
  • Posts: 116
  • Loc: Belgium

Post 3+ Months Ago

Hi David

Yep, finally a sensible discussion about it :)

kind regards
Tisse
  • Blackwater1
  • Born
  • Born
  • Blackwater1
  • Posts: 2

Post 3+ Months Ago

Obviously the http://www.blackwaterrock.com site is no longer in Swish. The relationship between it's designer and the band ended. Would love suggestions and thoughts on the HTML sight though.

Best Wishes

Blackwater
  • JLM
  • Newbie
  • Newbie
  • JLM
  • Posts: 5
  • Loc: Oxford

Post 3+ Months Ago

The_real_tisse

Quote:
api drawing


noticed this forum when going through site logs, I think that link is broken now, but you did not mention anything about me :) (JLM-justin moderator Rainbowfly.net specialisation flash/swish design/development).

So I thought I would add to this serious discussion. I started flash first just playing with masks and tweens then slowly learn AS1 and then got the opportunity to test swishMAX at a time when I was getting into OOP so I pushed swishMAX to see how OOP it can be now I use AS2 and am exploring ways to do similar in swishMAX. One benefit I find of swishMAX is I understand flash better by using swish! I have probably been one of the people who has tried to push the boundaries and I must say that swishzone have been very good at improving swishMAX adding things, not always tell us all but the software is always improving regular updates can be downloaded and since my inital tests it has improved no end. I would suggest anyone involved in a site that uses flash4 player should definitely use swishMAX above any version of flash, since it is easier to script more things for flash 4. Not having AttachMovie is one of the biggest let downs about swishMAX, tweens I prefer over effects but I think that is more due to using flash more and longer, and tracebitmap is sorely missed in swishmax, but break into pieces in swish is a create tool that I would like to see extended to breaking a sprite up. Things like the email function and Math.sindeg() just make life easier. I am not a fan of distributed code and must admit swish model does encourage it, although it is better organised and I can see a better more consistant fusion of swishscript into swishAS2. In fact swishMAX can use AS1 and its actual structure allows you to work in a very AS2 manor without the syntax and without inheritance, but after reading Moock's AS2 book I can see that composition works really well in swish, although testing can't normally be done in the internal player and a localconnection to flash to output traces is my prefered technique- not exactly satisfactory! Anyway here is a section of script that shows how a sprite is used like a class for composition.

Code: [ Select ]
//*** class pictureDisplay ***/
onLoad(){
  
  var noPictures:Number;
  var location:Sprite;
  var size:Sprite;
  var maskArea:Sprite;
  var newPicButton:Sprite;
  var status:Boolean;
  var clip:Sprite;
  var oldclip:Sprite;
  var distanceX:Number;
  var distanceY:Number;
  var thisInstance:pictureDisplay;
  var loadInterval;
}
function init(location_:Sprite, size_:Sprite,maskArea_:Sprite,newPicButton_:Sprite,_bar:Sprite,_rotator:Sprite){
  thisInstance=this;
  noPictures=3;
  location=location_;
  
  //setup buttons
  size=size_;
  maskArea=maskArea_;
  newPicButton=newPicButton_;
  rotator=_rotator;
  bar=_bar;
  
  status=true;
  
  // setup control
  newPicButton.onRelease=newPic;
  size.onPress=sizePress;
  size.onRelease=sizeRelease;
  bar.onPress=barPress;
  bar.onRelease=barRelease;
  rotator.onRelease=rotRelease;
  rotator.onPress=rotPress;
   
  //load first Picture
  rescale(size,maskArea);
  newPic(); 
 
}
//load a picture
function newPic(){
  clip.swapDepths(oldClip);
  status=!status;
  var genNum=noPictures.Rnd(noPictures);
  var pic = "Picture"+genNum+".jpg";
  oldClip=clip;
  clip=location.createEmptyMovieClip("clip"+status*1,100);
  //place off screen untill loaded
  clip._x=1000;
  clip._y=1000;
  [clip].loadMovie(pic);
  if(loadInterval!=undefined){ output("recreate");
    clearInterval(loadInterval);
  }
  //Problem line
  //Var
  loadInterval = setInterval(thisInstance, "assessLoad", 40); //setInterval(_root, "assessLoad", 40);

}
function assessLoad() {output("assessload");
  maskArea.beginFill(0xff0000,100);
  maskArea.moveTo(-maskArea._width/2,-maskArea._height/2);
  maskArea.lineTo(maskArea._width*clip.getBytesLoaded()/clip.getBytesTotal()-maskArea._width/2,-maskArea._height/2);
  maskArea.lineTo(maskArea._width*clip.getBytesLoaded()/clip.getBytesTotal()-maskArea._width/2,maskArea._height/2);
  maskArea.lineTo(-maskArea._width/2,maskArea._height/2);
  maskArea.lineTo(-maskArea._width/2,-maskArea._height/2);
  if ((clip.getBytesLoaded()/clip.getBytesTotal() == 1)&&(clip._width>4)) {
    output("fadeIn");
    rescale(size);
    clip._alpha=1;
    clip._visible=true;
    trace(clip);
    clip.onEnterFrame=fadeIn;
    
    clearInterval(loadInterval);
    
  }

}
function fadeIn(){
  if(this._alpha<100){
    this._alpha+=5;
  } else {
    this._alpha=100;
    this.onEnterFrame=null;
  }
}
//position control
function barPress(){
  maskArea._visible=false;
  size._visible=false;
  this.startDragUnlocked();
  this.onEnterFrame=onEFbar;
  distanceY=clip._y-this._y;
  distanceX=clip._x-this._x;
}
function onEFbar(){
  clip._x=this._x+distanceX;
  clip._y=this._y+distanceY;
  size._x=clip._x+clip._width+size._width/2;
  size._y=clip._y+clip._height+size._height/2;
}
function barRelease(){
  this.stopDrag();
  clip._x=this._x+distanceX;
  clip._y=this._y+distanceY;//this._height;
  size._x=clip._x+clip._width+size._width/2;
  size._y=clip._y+clip._height+size._height/2;
  maskArea._x=clip._x+clip._width/2;
  maskArea._y=clip._y+clip._height/2;
  size._x=maskArea._x+maskArea._width/2;
  size._y=maskArea._y+maskArea._height/2;
  size._visible=true;
  maskArea._visible=true;
  this.onEnterFrame=null;
}
//rotation control
function rotPress(){
  this.startDragUnlocked();
  this.onEnterFrame=onEFrot;
}
function onEFrot(){
  rotate2(this);
}
function rotRelease(){
  this.stopDrag();
  rotate(this);
  delete this.onEnterFrame;
}
function rotate(this_){
  var zeroAngle=Math.atan2deg(-maskArea._height,-maskArea._width);
  clip._rotation=360+zeroAngle+Math.atan2deg((-maskArea._y+this_._y),(-maskArea._x+this_._x));
  
  clip._x=maskArea._x-clip._width/2;
  clip._y=maskArea._y-clip._height/2;
  rescale(clip);
  output(clip._rotation);
  clip._x+=math.abs((-clip._height)/2*Math.sinDeg(clip._rotation));
  //clip._y+=-clip._height/2+math.abs((-clip._height)/2*Math.cosDeg(clip._rotation));
  
}
function rotate2(this_){
  var zeroAngle=Math.atan2deg(-maskArea._height,-maskArea._width);
  clip._rotation=360+zeroAngle+Math.atan2deg((-maskArea._y+this_._y),(-maskArea._x+this_._x));
  
  clip._x=maskArea._x-clip._width/2;
  clip._y=maskArea._y-clip._height/2;
  rescale2(clip);
  output(clip._rotation);
  clip._x+=math.abs((-clip._height)/2*Math.sinDeg(clip._rotation));
  //clip._y+=-clip._height/2+math.abs((-clip._height)/2*Math.cosDeg(clip._rotation));
  
}
//size control
function sizePress(){
  maskArea._visible=true;
  this.startDragUnLocked();
  this.onEnterFrame=onEFsize;
}
function onEfsize(){
  rescale(this,_root.myMask)
}
function sizeRelease(){
  maskArea._visible=true;
  this.stopDrag();
  rescale(this);
  size._x=maskArea._x+maskArea._width/2;
  size._y=maskArea._y+maskArea._height/2;
  rotator._x=maskArea._x-maskArea._width/2-rotator._width/2;
    rotator._y=maskArea._y+maskArea._height/2+rotator._width/2;
  this.onEnterFrame=null;
}
function rescale(mc:Sprite){output("rescale");
    maskArea._width=2*Math.abs(mc._x-maskArea._x);
    maskArea._height=2*Math.abs(mc._y-maskArea._y);
    
    scale(clip,maskArea);
    scale(oldClip,maskArea);
    bar._width=maskArea._width;
    bar._x=maskArea._x+maskArea._width/2-bar._width/2;
    bar._y=maskArea._y-maskArea._height/2-bar._height;
    rotator._x=maskArea._x-maskArea._width/2-rotator._width/2;
    rotator._y=maskArea._y+maskArea._height/2+rotator._width/2;
    
    
}
function rescale2(mc:Sprite){output("rescale");
    maskArea._width=2*Math.abs(mc._x-maskArea._x);
    maskArea._height=2*Math.abs(mc._y-maskArea._y);
    
    scale(clip,maskArea);
    scale(oldClip,maskArea);
    bar._width=maskArea._width;
    bar._x=maskArea._x+maskArea._width/2-bar._width/2;
    bar._y=maskArea._y-maskArea._height/2-bar._height;
    //rotator._x=maskArea._x-maskArea._width/2-rotator._width/2;
    //rotator._y=maskArea._y+maskArea._height/2+rotator._width/2;
}
function scale(mc:sprite,m:Sprite){
  //with(mc){
    output("scale "+mc);
    mc._xscale=mc._yscale=100;
    var p=new Object({H:mc._height/m._height,W:mc._width/m._width});
    p=(p.H>p.W) ? p.H : p.W;
    mc._yscale=mc._xscale=100/p;
    mc._x=m._x-mc._width/2, mc._y=m._y-mc._height/2;
  //}
}
onLoad(){
Number.prototype.Rnd=function(){
 
  var num=this;
  var newRnd=Math.round(Math.random()*(num-1)-(-1));
  while((newRnd==this.Rnd.old)||(newRnd==this.Rnd.varyold)){
      newRnd=Math.round(Math.random()*(num-1)-(-1));
    }
    trace( this.Rnd.veryold+ " "+this.Rnd.old+" "+newRnd);
  this.Rnd.veryold=this.Rnd.old;
  this.Rnd.old=newRnd;
  return(newRnd);
 
};
}
  1. //*** class pictureDisplay ***/
  2. onLoad(){
  3.   
  4.   var noPictures:Number;
  5.   var location:Sprite;
  6.   var size:Sprite;
  7.   var maskArea:Sprite;
  8.   var newPicButton:Sprite;
  9.   var status:Boolean;
  10.   var clip:Sprite;
  11.   var oldclip:Sprite;
  12.   var distanceX:Number;
  13.   var distanceY:Number;
  14.   var thisInstance:pictureDisplay;
  15.   var loadInterval;
  16. }
  17. function init(location_:Sprite, size_:Sprite,maskArea_:Sprite,newPicButton_:Sprite,_bar:Sprite,_rotator:Sprite){
  18.   thisInstance=this;
  19.   noPictures=3;
  20.   location=location_;
  21.   
  22.   //setup buttons
  23.   size=size_;
  24.   maskArea=maskArea_;
  25.   newPicButton=newPicButton_;
  26.   rotator=_rotator;
  27.   bar=_bar;
  28.   
  29.   status=true;
  30.   
  31.   // setup control
  32.   newPicButton.onRelease=newPic;
  33.   size.onPress=sizePress;
  34.   size.onRelease=sizeRelease;
  35.   bar.onPress=barPress;
  36.   bar.onRelease=barRelease;
  37.   rotator.onRelease=rotRelease;
  38.   rotator.onPress=rotPress;
  39.    
  40.   //load first Picture
  41.   rescale(size,maskArea);
  42.   newPic(); 
  43.  
  44. }
  45. //load a picture
  46. function newPic(){
  47.   clip.swapDepths(oldClip);
  48.   status=!status;
  49.   var genNum=noPictures.Rnd(noPictures);
  50.   var pic = "Picture"+genNum+".jpg";
  51.   oldClip=clip;
  52.   clip=location.createEmptyMovieClip("clip"+status*1,100);
  53.   //place off screen untill loaded
  54.   clip._x=1000;
  55.   clip._y=1000;
  56.   [clip].loadMovie(pic);
  57.   if(loadInterval!=undefined){ output("recreate");
  58.     clearInterval(loadInterval);
  59.   }
  60.   //Problem line
  61.   //Var
  62.   loadInterval = setInterval(thisInstance, "assessLoad", 40); //setInterval(_root, "assessLoad", 40);
  63. }
  64. function assessLoad() {output("assessload");
  65.   maskArea.beginFill(0xff0000,100);
  66.   maskArea.moveTo(-maskArea._width/2,-maskArea._height/2);
  67.   maskArea.lineTo(maskArea._width*clip.getBytesLoaded()/clip.getBytesTotal()-maskArea._width/2,-maskArea._height/2);
  68.   maskArea.lineTo(maskArea._width*clip.getBytesLoaded()/clip.getBytesTotal()-maskArea._width/2,maskArea._height/2);
  69.   maskArea.lineTo(-maskArea._width/2,maskArea._height/2);
  70.   maskArea.lineTo(-maskArea._width/2,-maskArea._height/2);
  71.   if ((clip.getBytesLoaded()/clip.getBytesTotal() == 1)&&(clip._width>4)) {
  72.     output("fadeIn");
  73.     rescale(size);
  74.     clip._alpha=1;
  75.     clip._visible=true;
  76.     trace(clip);
  77.     clip.onEnterFrame=fadeIn;
  78.     
  79.     clearInterval(loadInterval);
  80.     
  81.   }
  82. }
  83. function fadeIn(){
  84.   if(this._alpha<100){
  85.     this._alpha+=5;
  86.   } else {
  87.     this._alpha=100;
  88.     this.onEnterFrame=null;
  89.   }
  90. }
  91. //position control
  92. function barPress(){
  93.   maskArea._visible=false;
  94.   size._visible=false;
  95.   this.startDragUnlocked();
  96.   this.onEnterFrame=onEFbar;
  97.   distanceY=clip._y-this._y;
  98.   distanceX=clip._x-this._x;
  99. }
  100. function onEFbar(){
  101.   clip._x=this._x+distanceX;
  102.   clip._y=this._y+distanceY;
  103.   size._x=clip._x+clip._width+size._width/2;
  104.   size._y=clip._y+clip._height+size._height/2;
  105. }
  106. function barRelease(){
  107.   this.stopDrag();
  108.   clip._x=this._x+distanceX;
  109.   clip._y=this._y+distanceY;//this._height;
  110.   size._x=clip._x+clip._width+size._width/2;
  111.   size._y=clip._y+clip._height+size._height/2;
  112.   maskArea._x=clip._x+clip._width/2;
  113.   maskArea._y=clip._y+clip._height/2;
  114.   size._x=maskArea._x+maskArea._width/2;
  115.   size._y=maskArea._y+maskArea._height/2;
  116.   size._visible=true;
  117.   maskArea._visible=true;
  118.   this.onEnterFrame=null;
  119. }
  120. //rotation control
  121. function rotPress(){
  122.   this.startDragUnlocked();
  123.   this.onEnterFrame=onEFrot;
  124. }
  125. function onEFrot(){
  126.   rotate2(this);
  127. }
  128. function rotRelease(){
  129.   this.stopDrag();
  130.   rotate(this);
  131.   delete this.onEnterFrame;
  132. }
  133. function rotate(this_){
  134.   var zeroAngle=Math.atan2deg(-maskArea._height,-maskArea._width);
  135.   clip._rotation=360+zeroAngle+Math.atan2deg((-maskArea._y+this_._y),(-maskArea._x+this_._x));
  136.   
  137.   clip._x=maskArea._x-clip._width/2;
  138.   clip._y=maskArea._y-clip._height/2;
  139.   rescale(clip);
  140.   output(clip._rotation);
  141.   clip._x+=math.abs((-clip._height)/2*Math.sinDeg(clip._rotation));
  142.   //clip._y+=-clip._height/2+math.abs((-clip._height)/2*Math.cosDeg(clip._rotation));
  143.   
  144. }
  145. function rotate2(this_){
  146.   var zeroAngle=Math.atan2deg(-maskArea._height,-maskArea._width);
  147.   clip._rotation=360+zeroAngle+Math.atan2deg((-maskArea._y+this_._y),(-maskArea._x+this_._x));
  148.   
  149.   clip._x=maskArea._x-clip._width/2;
  150.   clip._y=maskArea._y-clip._height/2;
  151.   rescale2(clip);
  152.   output(clip._rotation);
  153.   clip._x+=math.abs((-clip._height)/2*Math.sinDeg(clip._rotation));
  154.   //clip._y+=-clip._height/2+math.abs((-clip._height)/2*Math.cosDeg(clip._rotation));
  155.   
  156. }
  157. //size control
  158. function sizePress(){
  159.   maskArea._visible=true;
  160.   this.startDragUnLocked();
  161.   this.onEnterFrame=onEFsize;
  162. }
  163. function onEfsize(){
  164.   rescale(this,_root.myMask)
  165. }
  166. function sizeRelease(){
  167.   maskArea._visible=true;
  168.   this.stopDrag();
  169.   rescale(this);
  170.   size._x=maskArea._x+maskArea._width/2;
  171.   size._y=maskArea._y+maskArea._height/2;
  172.   rotator._x=maskArea._x-maskArea._width/2-rotator._width/2;
  173.     rotator._y=maskArea._y+maskArea._height/2+rotator._width/2;
  174.   this.onEnterFrame=null;
  175. }
  176. function rescale(mc:Sprite){output("rescale");
  177.     maskArea._width=2*Math.abs(mc._x-maskArea._x);
  178.     maskArea._height=2*Math.abs(mc._y-maskArea._y);
  179.     
  180.     scale(clip,maskArea);
  181.     scale(oldClip,maskArea);
  182.     bar._width=maskArea._width;
  183.     bar._x=maskArea._x+maskArea._width/2-bar._width/2;
  184.     bar._y=maskArea._y-maskArea._height/2-bar._height;
  185.     rotator._x=maskArea._x-maskArea._width/2-rotator._width/2;
  186.     rotator._y=maskArea._y+maskArea._height/2+rotator._width/2;
  187.     
  188.     
  189. }
  190. function rescale2(mc:Sprite){output("rescale");
  191.     maskArea._width=2*Math.abs(mc._x-maskArea._x);
  192.     maskArea._height=2*Math.abs(mc._y-maskArea._y);
  193.     
  194.     scale(clip,maskArea);
  195.     scale(oldClip,maskArea);
  196.     bar._width=maskArea._width;
  197.     bar._x=maskArea._x+maskArea._width/2-bar._width/2;
  198.     bar._y=maskArea._y-maskArea._height/2-bar._height;
  199.     //rotator._x=maskArea._x-maskArea._width/2-rotator._width/2;
  200.     //rotator._y=maskArea._y+maskArea._height/2+rotator._width/2;
  201. }
  202. function scale(mc:sprite,m:Sprite){
  203.   //with(mc){
  204.     output("scale "+mc);
  205.     mc._xscale=mc._yscale=100;
  206.     var p=new Object({H:mc._height/m._height,W:mc._width/m._width});
  207.     p=(p.H>p.W) ? p.H : p.W;
  208.     mc._yscale=mc._xscale=100/p;
  209.     mc._x=m._x-mc._width/2, mc._y=m._y-mc._height/2;
  210.   //}
  211. }
  212. onLoad(){
  213. Number.prototype.Rnd=function(){
  214.  
  215.   var num=this;
  216.   var newRnd=Math.round(Math.random()*(num-1)-(-1));
  217.   while((newRnd==this.Rnd.old)||(newRnd==this.Rnd.varyold)){
  218.       newRnd=Math.round(Math.random()*(num-1)-(-1));
  219.     }
  220.     trace( this.Rnd.veryold+ " "+this.Rnd.old+" "+newRnd);
  221.   this.Rnd.veryold=this.Rnd.old;
  222.   this.Rnd.old=newRnd;
  223.   return(newRnd);
  224.  
  225. };
  226. }

sorry it is not perfect yet and a bit messy still. But you can look at the whole movie here

http://www.justinfront.net/swish/pictureDisplay.html
http://www.justinfront.net/swish/pictureDisplay.swi

Now swish does not have components but many serious scripters do not use components (they are just too heavy). Strict typing is allowed but really just ignored by swish internal player. Some things like flash remoting are not built in but you can find ways to do these things, can't export in flash 7 but hex the movie is actually easier than you think. So my conclusion is that swishMAX is a serious alternative to flash when price is taken into account. While flash is generally better there are many aspects of swish that are better (echo bytecode in the debug is cool). For a new user swish is probably easier to get to grips with. Although flash is simpler to use as a vector graphics tool and which ever way you slice it (flash or swish ) proper scripting is not easy to learn.

I wrote something on functions which may help people get to grips with serious swishscripting although the approach above is not yet integrated into the tutorial.

http://www.justinfront.net/functions/


Hope this adds to the discussion.

JLM

Post Information

  • Total Posts in this topic: 34 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.