Wednesday, January 12, 2011

Comic Demo

This is a demo of how the comic will work. All that needs to be done is replacing the placeholders with actual comic panels and maybe add a few fancy effects. But this is the bones of it.

It's done so the flash file will call the images which are stored separately. This should be useful where if there is another comic, you don't have to change the flash file, just make a new page with the swf embedded and have your set of images in the same folder as the swf with the names a.png, b.png etc...

Just download it from [here], extract all files and run testComic.swf.

.fla file is in there too. The actionscript is pretty bad but it works.

-T.J.

Tuesday, December 21, 2010

Coding possibility

Below is a rough outline of how jQuery will be used to handle the image switching, where variable i is set depending on which button is clicked.

Note: This doesn't detail on how buttons will be handled, i.e. displayed and subsequently hidden.
This is just for image loading.

1st Choice
Button 1 - i = 2
Button 2 - i = 3

2nd Choices
Button 3 - i = 4
Button 4 - i = 5

Button 5 - i = 6
Button 6 - i = 7



Each button will have the same class of "button" so as to call the same click method.

$("button").click(function (i) { //where i is received from the method responsible for setting var i.
    
    switch (i){
        case 2:
             $("#choice1").load(/images/02.jpg); //#choice1 is an empty div where images will be placed
   
        case 3:
         .....
//so on and so forth for each possibility of i (2 - 7)

   }
)};


- T.J.