Splice9 – Bitmap Window Resizer Component 0.1b

“Wow! This is so nice. I finish my 2 weeks work in a day”, was from a phrase of one happy e-mail we received long back during the early third quarter of the year 2004. The e-mail was from a client who doubles up as a Graphic UI Layout Designer. We did a JSFL command panel for chopping and resizing windows for a heavy windows intensive Enterprise Flash Application. Its basic function was to chop up a selected bitmap into desired slices of 3×3, 3×1, 1×3 according to the type of windows our code was to apply resizing to graphically themed windows.

Splice9

What does it do?
Splice9 crops a selected bitmap into 9 pieces and put them inside a MovieClip. Once the cropping is done, it creates assets (movieclips of 9 pieces) in library with a linkage name in a folder named Splice9 and brings the MovieClip to the stage and

  • names those instances,
  • create layers,
  • writes required actionscript,
  • saves the file,
  • publishes it.

And what you get a ready-made resizeable window!

Preview | Download (MXP and Sample File)

“Wow! This is so nice. I finish my 2 weeks work in a day”, was from a phrase of one happy e-mail we received long back during the early third quarter of the year 2004. The e-mail was from a client who doubles up as a Graphic UI Layout Designer. We did a JSFL command panel for chopping and resizing windows for a heavy windows intensive Enterprise Flash Application. Its basic function was to chop up a selected bitmap into desired slices of 3×3, 3×1, 1×3 according to the type of windows our code was to apply resizing to graphically themed windows.

Splice9

What does it do?
Splice9 crops a selected bitmap into 9 pieces and put them inside a MovieClip. Once the cropping is done, it creates assets (movieclips of 9 pieces) in library with a linkage name in a folder named Splice9 and brings the MovieClip to the stage and

  • names those instances,
  • create layers,
  • writes required actionscript,
  • saves the file,
  • publishes it.

And what you get a ready-made resizeable window!

Preview | Download (MXP and Sample File)

How to use it?

  1. Create a reverse oinam.com domain class util package; “com.oinam.util”
  2. Install Splice9 class (Splice9.as) in “com.oinam.util” folder
  3. Install the Spilce9.mxp
  4. Run command Splice9 inside Flash IDE; Commands > Splice9

You can use the Splice9 class anywhere you like, in that case, change the class Splice9 and the generated codes in the Window MC.

[Note:
In order to review in published html page in a browser, the html settings of width and height of emdedded swf movie should be 100%.
It may be noted that the published HTML by Macromedia Flash by default is a Transitional HTML 4.01 Doctype thus it won't make it 100% in browsers like Firefox, just remove the doctype and set it to quark mode and test it.]

What more is coming?

  • A Commercial Version (contact us if you want to be informed or want a copy, it may be free or we may charge a very minimal fee)
  • Use of SWF instead of XUI.
    Because XUI cannot repopulate fields but an swf can have prepopulated numbers and at the same time remember what was the last value. This will help in repetitive splicing.
  • Will not auto-Publish
    Actually if the symbol is created properly there is no need to actually jump into that symbol? Use the symbol to the spliced mc in code and test perhaps, but jumping inside the symbol to see if things work, seems like a debugging feature.
  • Default Resize dimension
    It would be useful to have it scale to an initial dimension, say splice into 3×3 grid, and make its initial size say 400×300, with the splices resized by jsfl.

Actually here’s another idea!
After doing the splicing we have a 3×3(or 3×1,1×3, etc) grid. What if we allow the grid to be resizable with a custom scale-resize tool? Custom tools are possible in flash. So you select the bitmap, click the window resize command, select splice options and you get a spliced mc. Instead of going inside the spliced mc, the symbol on stage could then be made selected with the custom scale-resize tool. So now you can stretch the symbol and it would stretch the inside splices instead of the whole mc. This would be very useful for panel backgrounds, and any other windows. So basically you have an authortime equivalent of the Splice9 class. And this would be useful for designers also!

Etcetera

Well, it may be a wise idea that you add a package folder in your common ActionScript Packages as sources released from Oinam.com will likely go there. And we plan to release useful utility classes and other classes after about 6 months or so. Nonthless, we might modify the same for general public consumption, apply restriction to the license et al. So, if you wish to use our free classes, please have a folder hierarchy in your ActionScript class Repository; com > oinam. You are though free to change the opensource files to your wish.

What is an ActionScript class path?
By default, Flash will read a class located at the same folder root as the FLA or from the classes folder of your Macromedia Flash Installation.

How to custom configure class path?
You need to configure the ActionScript paths in your Flash

Make the current directory (.) in the AS2 settings of Flash to be on top of the default class path. This enables overriding classes in MM’s classpath with local modified versions. Then you can either have your custom class path after that or follow after Macromedia’s path.

A typical order would look like,

.
D:\Repository\AS2Classes
$(LocalData)/Classes

The second one here is the one where you can add com > oinam for your usage. Currently for this source file, add another folder util and put the ActionScript class there.

Preview | Download (MXP and Sample File)


Don't like it? There are lots of published articles, pick a random one.

Brajeshwar posted this article on Sat, Feb 26th, 2005 at 8:34 pm
Categorized under Technology

Prev Article:

Next Article:

Archives: Visit the Archives for more articles.

Comments Post Yours

There are one response so far. You can follow any responses to this entry through the RSS feed. You can skip to the end and leave a response. Pinging is currently not allowed.

  1. Pings & Trackbacks Sites, articles & blog posts linking back to this article.

Post yours

Sidenotes

Quick notes, scribbles, somehow related to this website and to what I do. Or perhaps I'm just plain lazy to make them into a full article.

12 Hottest Geek Girls on Twitter

So, you have seen the 12 Hottest Geek Girls (via Digg). However, they forgot to link them to their, hmmmmmm errrr, Twitter profiles so you can follow them. Or perhaps they felt -- they're popular ...13th Oct, 2009

Great Indian Developer Summit 2009

I got a Press Release of the upcoming GIDS '09 and here is an excerpt. The summit's program covers Java, REST, Unit testing, Groovy, Spring, Struts 2.0, SOA, Cloud Computing, Web Services, JRuby, RoR, Ruby, JVM, ...21st Jan, 2009

The flourishing gun market in Pakistan

VICE Travel: Darra, Pakistanby Top-Notch112 (Via: Deep Green Crystals) 20th Jan, 2009

Angry Ringtone for iPhone and others

[audio:http://audio.brajeshwar.com/angry-ring-ring.mp3] The ANGRY RINGTONE for iPhone. (Click the PLAY button above!) Download * iPhone Ringtone (.m4r) * MP3 Ringtone (.mp3) * Zipped (both .m4r and .mp3) To use it as an iPhone Ringtone; just double click the file "angry-ring-ring.m4r" and it ...15th Jan, 2009

IIM Ahmedabad's Leverage 2009

Leverage, the Venture Capital and Private Equity Club of IIM Ahmedabad and the Centre for Innovation Incubation and Entrepreneurship bring to you the 1st edition of the Venture Capital and Private Equity Conference on the ...12th Jan, 2009

View the Sidenotes Archive

Play the Penguin Game

Recommended

  • Ode to Apple Dedicated to Apple – Mac, iPhone, iPod, iTunes, Quicktime, Apple TV and all the awesome softwares for the Apple Mac.
  • Not Safe for Work Ever clicked a link and felt embarrassed with the content in front of your co-workers? Ever caught unaware because the funny link your friend sent was a little beyond funny? Let’s minimize that with NSWF.
  • AS 2.0 Reference Reference for ActionScript 2.0 Programming Language used in Flash. Primarily stashed here for my own personal reference.
  • Downloads All downloads, Free and Open Source.
  • o! Just Me Of colorful cultures, entertainment, media, life hacks, music, books and movies from hollywood & bollywood.
  • ActionScript 3.0 Reference Flash/Flex ActionScript 3.0 Reference.

Download free Brajeshwar Wordpress Theme

Brajeshwar

Brajeshwar I firmly believe in keeping things simple, easy for users and I envison pushing the technical envelop time and again for the betterment of viable commercial and practical applications. More about me.

Photos

More photos on Flickr

Member of 9rules Network

Since its inception on 11th June, 2001, "Brajeshwar" has 980 Articles and 6,659 comments, contained within 17 categories and 1,593 tags.