Saturday, March 12, 2005

Image Manipulation in Fireworks MX 2004

Is there a way to reduce the size of a picture? I have a pixel resize program but I don't like what it does to my graphics. Can I resize pictures in Fireworks too. Is there a way to do this and make the pictures still look good?


Assuming you use Fireworks MX, though its probably the same in prior versions.

To reduce a picture to the exact size that you want, simply :

Open your image in Fireworks
Then go up to the top menu "modify", scroll down to "transform", and then scroll down to "numeric transform", and then type in either the height or the width percent reduction that you want.

Example: I always use height, so that my pictures are typically consistent in height, regardless of how wide they are.

Make sure that you have both "scale" and "constrain" checked when you do this.

Just experiment, say you have an image that is 1200 pixels tall, and you know that your final image you want to be 200 pixels tall. then type in 16.65% in the height box (leaving the width box untouched). See if it shows exactly 199 pixels. If it does then click okay. If not than try again. (For some reason it always adds one pixel after I click okay so I always choose a final height that is one pixel shorter than I want). Click okay and you should be able continue with a high quality smaller image.

OR

Just grab the lower right corner of the image, hold down the shift key, and drag diagonally towards the left upper corner. That will resize it with little or no loss.

Friday, March 11, 2005

CFOUTPUT Question

How do I get cfoutput to only return a certian number of results? I am trying to make a randomized page.

Setting the maxrows in the query tag is an option.

cfquery ... maxrows="45"

And as far as Randomizing your query, I'd suggest using:

ORDER BY NewId()

This gives a unique order by each execution, and will cause the results to be randomized.

Thursday, March 10, 2005

Favicon - The Image In The Location Line

How do you get the little graphic in the left corner of the URL?

See http://favicon.com

Wednesday, March 09, 2005

Duotone Tip for Photoshop

I found this tutorial online to apply the linear gradient to the text.

http://www.playingwithfire.com/type/duotone.html

Do any of you know how to get this text effect using photoshop 7 or Fireworks MX 04? I need the text with the picture on the bottom and the cutout text on the top.

Here's the answer:
Select the text on the stage.
Select the color selector on the Properties inspector.
Select 'Fill Options'
Select 'Gradient' from the drop down
Select 'Linear' from the new drop down
Select 'Edit'

Adjust your colors accordingly.

Tuesday, March 08, 2005

Coldfusion Delete

When I add a record, the action page displays the variable values for the new record. However, I have an action page that deletes a record. Since the record is deleted, how do I inform the user of the delete form that he just deleted Employee XYZ?

Before you delete the value, query it and store the name in a variable.

<cfquery name="emplname">
select employee_name from employees where id = 12345678
</cfquery>

<cfquery...>
delete from employees where id = 12345678
</cfquery>

Then after you delete it, simply <cfoutput>#emplname.employee_name#</cfoutput>

Monday, March 07, 2005

Transparent Import into Flash MX

I'm importing an image into flash, from photoshop and the image is on a transparent background. I get it onto the flash stage but it's is on a white background. How do I keep the transparent background?

There are two ways to do this:

shift + ctrl + alt + S

OR

Use the PhotoShop "Export for web..." feature, which will let you export the image as a 32 bit png file. To optimize the file, import it into fireworks and reduce the color channels to the minimum necessary colors, and re-export.

You should get a fairly small png file with alpha transparency.

Sunday, March 06, 2005

Get Page Load Time

How can I get the time to load a page. For example when I type google.com in address bar and hit enter, I want to get the total time span from start to finish when I hit enter until the page is fully loaded.

The time depends on the url that you request and how many network nodes seprate you and the other end plus your connection speed. We can suppose that the time is constant and the time that a page loads can be calculated depends on your connection speed. If your are using modem, DSL Cable Modem, or ISDN the time will vary.

I don't think a mesurement tool exists however try this code and use it as a starting point.

<html><head><title>Test</title><head>
<script language="javascript">
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
document.write(seconds);
</script>
</head>

<body>
<script language="javascript">
document.write(seconds);
</script>

</body>
</html>