1
                                                                    EXHIBIT 2.2

                             STOCK OPTION AGREEMENT


      This STOCK OPTION AGREEMENT (the "AGREEMENT") is made and entered into as
of January 16, 2001, between Allaire Corporation, a Delaware corporation
("COMPANY"), and Macromedia, Inc., a Delaware corporation ("PARENT").

                                    RECITALS

      A. Concurrently with the execution and delivery of this Agreement,
Company, Parent and Alaska Acquisition Corporation, a Delaware corporation and a
wholly owned subsidiary of Parent ("MERGER SUB"), are entering into an Agreement
and Plan of Merger (the "MERGER AGREEMENT"), that provides, among other things,
upon the terms and subject to the conditions thereof, for the merger of Merger
Sub and Company (the "MERGER"). Capitalized terms used in this Agreement but not
defined herein shall have the meanings ascribed to such terms in the Merger
Agreement.

      B. As a condition to Parent's willingness to enter into the Merger
Agreement, Parent has required that the Company agree, and the Company has
agreed, to grant to Parent an option to acquire shares of Company Common Stock
("COMPANY SHARES"), upon the terms and subject to the conditions set forth
herein.

      In consideration of the foregoing and of the mutual covenants and
agreements set forth herein and in the Merger Agreement and for other good and
valuable consideration, the receipt and adequacy of which are hereby
acknowledged, the parties agree as follows:

      1. Grant of Option. Company hereby grants to Parent an irrevocable option
(the "OPTION"), exercisable following the occurrence of an Exercise Event (as
defined in Section 2(a)), to acquire up to a number of Company Shares equal to
19.9% of the Company Shares issued and outstanding as of the date, if any, upon
which an Exercise Notice (as defined in Section 2(b) below) shall have been
delivered (the "OPTION SHARES"), in the manner set forth below by paying cash at
a price of $5.75 per share (the "EXERCISE PRICE"). All references in this
Agreement to Company Shares issued to Parent hereunder shall be deemed to
include any associated Rights.

      2.    Exercise of Option; Maximum Proceeds.

            (a) For all purposes of this Agreement, an "EXERCISE EVENT" shall
mean the occurrence of any of (i) a Triggering Event (as such term is defined in
the Merger Agreement), (ii) the amendment by Company of the Rights Agreement or
the taking by Company of any corporate action which removes any applicable
restrictions under Section 203 of the Delaware Law or under any other Takeover
Statute, in each case, in connection with any Acquisition Proposal; (iii) (A)
the public announcement of an acquisition or purchase by any person or "group"
(as defined under Section 13(d) of the Exchange Act and the rules and
regulations thereunder) of more than a 15% beneficial ownership interest in the
total outstanding voting
   2

securities of Company or any of its subsidiaries; (B) the public announcement or
commencement of any tender offer or exchange offer that if consummated would
result in any person or "group" beneficially owning 15% or more of the total
outstanding voting securities of Company or any of its subsidiaries; (C) the
public announcement of a bona fide proposal or offer by a person or entity
reasonably able to consummate any of the following: a merger, consolidation,
business combination or similar transaction involving Company pursuant to which
the stockholders of Company immediately preceding such transaction hold less
than 85% of the equity interests in the surviving or resulting entity of such
transaction; or a sale, lease, exchange, transfer, license (other than in the
ordinary course of business), acquisition, or disposition of any material assets
of Company; or (iv) the commencement of a solicitation within the meaning of
Rule 14a-1(l) by any person or entity other than Company or its Board of
Directors (or any person or entity acting on behalf of Company or its Board of
Directors) seeking to alter the composition of Company's Board of Directors.

            (b) At any time following the occurrence of an Exercise Event,
Parent may deliver to the Company a written notice (an "EXERCISE NOTICE")
specifying that it wishes to exercise its rights to acquire Company Shares under
the Option and close a purchase of Option Shares and specifying the total number
of Option Shares it wishes to acquire. Unless such Exercise Notice is withdrawn
by Parent, the closing of a purchase of such Option Shares (a "CLOSING") shall
take place at the principal offices of Company upon such date (which shall be no
earlier than three business days following the delivery of the Exercise Notice)
and at such time prior to the termination of the Option as may be designated by
Parent in the Exercise Notice.

            (c) The Option shall terminate upon the earliest to occur of (i) the
Effective Time (as such term is defined in the Merger Agreement), (ii)
termination of the Merger Agreement pursuant to Section 7.1(a) thereof, (iii)
termination of the Merger Agreement pursuant to Section 7.1(f) thereof if prior
to such termination no Triggering Event shall have occurred; (iv) termination of
the Merger Agreement pursuant to Section 7.1(b), 7.1(c) or 7.1(d) thereof if
prior to such termination no Exercise Event shall have occurred or (v) 12 months
following the termination of the Merger Agreement under any other circumstances;
provided, however, that if the Option is exercisable but cannot be exercised by
reason of any applicable government order or because the waiting period related
to the issuance of the Option Shares under the HSR Act shall not have expired or
been terminated, or because any other condition to closing has not been
satisfied, then the Option shall not terminate until the tenth business day
after all such impediments to exercise shall have been removed or shall have
become final and not subject to appeal, and provided, further that if,
subsequent to exercise of the Option, but prior to any other termination of the
Merger Agreement, the Merger Agreement is terminated by Company pursuant to
Section 7.1(f) thereof, then (1) the Option, to the extent it has not been
exercised, shall terminate and (2) to the extent the Option has been exercised,
Company may repurchase for cash all Option Shares then held by Parent at a per
Option Share price equal to the Exercise Price.

            (d) If the sum of (i) any Termination Fee received by Parent under
Section 7.3(b) of the Merger Agreement plus (ii) the proceeds received by Parent
for any sales or other

                                       2
   3

dispositions of Option Shares (including pursuant to Company's exercise of its
rights to purchase Option Shares under Section 7(a) and Section 10 hereof) or
the Option (including pursuant to Parent's exercise of its rights to surrender
the Option pursuant to Section 9 hereof), plus (iii) any dividends or
distributions received by Parent declared on Option Shares is, in the aggregate,
greater than the sum of (x) $13,800,000 plus (y) the product of (1) the Exercise
Price multiplied by (2) the number of Company Shares purchased by Parent
pursuant to the Option (the sum of clauses (x) and (y), the "PROFIT CAP"), then
all such proceeds received by Parent in excess of the Profit Cap shall be
promptly remitted in cash by Parent to Company.

      3. Conditions to Closing. The obligation of Company to issue Option Shares
to Parent hereunder is subject to the conditions that (a) any waiting period
under the HSR Act applicable to the issuance of the Option Shares hereunder
shall have expired or been terminated; (b) all material consents, approvals,
orders or authorizations of, or registrations, declarations or filings with, any
Governmental Entity, if any, required in connection with the issuance of the
Option Shares hereunder shall have been obtained or made, as the case may be;
and (c) no preliminary or permanent injunction or other order by any court of
competent jurisdiction prohibiting or otherwise restraining such issuance shall
be in effect. It is understood and agreed that at any time during which Parent
shall be entitled to deliver to Company an Exercise Notice, the parties will use
their respective reasonable efforts to satisfy all conditions to Closing, so
that a Closing may take place as promptly as practicable.

      4. Closing. At any Closing, (a) Company shall deliver to Parent a single
certificate in definitive form representing the number of Company Shares
designated by Parent in its Exercise Notice consistent with this Agreement, such
certificate to be registered in the name of Parent and to bear the legend set
forth in Section 10 hereof, against delivery of (b) payment by Parent to the
Company of the aggregate Exercise Price for the Company Shares so designated and
being purchased by delivery of a certified check, bank check or wire transfer of
immediately available funds.

      5. Representations and Warranties of the Company. Company represents and
warrants to Parent that (a) Company is a corporation duly organized, validly
existing and in good standing under the laws of the State of Delaware and has
the corporate power and authority to enter into this Agreement and to carry out
its obligations hereunder; (b) the execution and delivery of this Agreement by
Company and consummation by Company of the transactions contemplated hereby have
been duly authorized by all necessary corporate action on the part of Company
and no other corporate proceedings on the part of Company are necessary to
authorize this Agreement or any of the transactions contemplated hereby; (c)
this Agreement has been duly executed and delivered by Company and constitutes a
legal, valid and binding obligation of Company and, assuming this Agreement has
been duly executed and delivered by Parent, is enforceable against Company in
accordance with its terms, except as enforceability may be limited by bankruptcy
and other similar laws affecting the rights of creditors generally and general
principles of equity; (d) except for any filings, authorizations, approvals or
orders required under the HSR Act and the applicable blue sky laws of any state,
and the rules and regulations promulgated thereunder, or by the Nasdaq Stock
Market, Company has taken all

                                       3
   4

necessary corporate and other action to authorize and reserve for issuance and
to permit it to issue upon exercise of the Option, and at all times from the
date hereof until the termination of the Option will have reserved for issuance,
a sufficient number of unissued Company Shares for Parent to exercise the Option
in full and will take all necessary corporate or other action to authorize and
reserve for issuance all additional Company Shares or other securities which may
be issuable pursuant to Section 8(a) upon exercise of the Option, all of which,
upon their issuance and delivery in accordance with the terms of this Agreement
and payment therefor by Parent, will be validly issued, fully paid and
nonassessable; (e) upon delivery of the Company Shares and any other securities
to Parent upon exercise of the Option, Parent will acquire such Company Shares
or other securities free and clear of all Encumbrances, excluding those imposed
by Parent; (f) the execution and delivery of this Agreement by Company do not,
and the performance of this Agreement by Company will not, (i) violate the
Certificate of Incorporation or Bylaws of the Company, (ii) conflict with or
violate any order applicable to the Company or any of its subsidiaries or by
which they or any of their material property is bound or affected or (iii)
result in any breach of or constitute a default (or an event which with notice
or lapse of time or both would become a default) under, or give rise to any
right of termination, amendment, acceleration or cancellation of, or result in
the creation of a material Encumbrance on any material property or assets of
Company or any of its subsidiaries pursuant to, any material contract or
agreement to which Company or any of its subsidiaries is a party or by which
Company or any of its subsidiaries or any of their material property is bound or
affected, except to the extent that any such breach, default, right of
termination, amendment, acceleration or cancellation or creation of a material
Encumbrance would not prevent or materially delay the performance by Company of
Company's obligations under this Agreement; and (g) the execution and delivery
of this Agreement by Company does not, and the performance of this Agreement by
Company will not, require any consent, approval, authorization or permit of, or
filing with, or notification to, any Governmental Entity, except pursuant to the
HSR Act and except for any filings required under the blue sky laws of any state
and the rules and regulations promulgated thereunder or by the Nasdaq Stock
Market.

      6. Representations and Warranties of Parent. Parent represents and
warrants to Company that (i) the execution and delivery of this Agreement by
Parent and the consummation by it of the transactions contemplated hereby have
been duly authorized by all necessary corporate action on the part of Parent and
this Agreement has been duly executed and delivered by a duly authorized officer
of Parent and will constitute a legal, valid and binding obligation of Parent
and, assuming this Agreement has been duly executed and delivered by Parent, is
enforceable against Company in accordance with its terms, except as
enforceability may be limited by bankruptcy and other similar laws affecting the
rights of creditors generally and general principles of equity; and (ii) Parent
is acquiring the Option, and, if and when the Parent exercises the Option, it
will be acquiring the Option Shares issuable upon the exercise thereof for its
own account and not with a view to distribution or resale in any manner which
would be in violation of the Securities Act.


                                       4
   5


      7.    Registration Rights.

            (a) Following the termination of the Merger Agreement, Parent
(sometimes referred to herein as the "HOLDER") may by written notice (a
"REGISTRATION NOTICE") to Company (sometimes referred to herein as the
"REGISTRANT") request the Registrant to register under the Securities Act all or
any part of the Option Shares acquired by the Holder pursuant to this Agreement
(such Option Shares, together with any other shares of the Company's capital
stock issuable in lieu of or with respect to such Option Shares, the
"REGISTRABLE SECURITIES") in order to permit the public sale or other
disposition of such shares in accordance with the intended method of sale or
other disposition stated by the Holder; provided, however, that any such
Registration Notice must relate to a number of shares equal to at least 2% of
the outstanding Company Shares and that any rights to require registration
hereunder shall terminate with respect to any shares of the Company's capital
stock that may be sold pursuant to Rule 144(k) under the Securities Act or at
such time as all of the Registrable Securities may be sold in any three month
period pursuant to Rule 144 under the Securities Act. Upon receipt of a
Registration Notice, the Registrant will have the option exercisable by written
notice delivered to the Holder within ten business days after the receipt of the
Registration Notice, irrevocably to agree to purchase all or any part of the
Registrable Securities for cash at a price (the "OPTION PRICE") equal to the
product of (i) the number of Registrable Securities so purchased and (ii) the
per share average of the closing sale prices of the Registrant's Common Stock on
the Nasdaq Stock Market for the twenty trading days immediately preceding the
date of the Registration Notice. Any such purchase of Registrable Securities by
the Registrant hereunder will take place at a closing to be held at the
principal executive offices of the Registrant or its counsel at any reasonable
date and time designated by the Registrant in such notice within five business
days after delivery of such notice. The payment for the shares to be purchased
will be made by delivery at the time of such closing of the Option Price in
immediately available funds.

            (b) If the Registrant receives a Registration Notice and does not
elect to exercise its option to purchase pursuant to Section 7(a), the
Registrant shall use all reasonable best efforts to effect, as promptly as
practicable, the registration under the Securities Act of the unpurchased
Registrable Securities requested to be registered in the Registration Notice;
provided, however, that (i) the Holder shall not be entitled to more than an
aggregate of two effective registration statements hereunder, and provided
further, that if the Registrant withdraws a filed registration statement at the
request of the Holder (other than as the result of a material adverse change in
the Registrant's business or prospects or the Holder's learning of new material
information concerning the Registrant), then such filing shall be deemed to have
been an effective registration for purposes of this clause (i), (ii) the
Registrant will not be required to file any such registration statement or
maintain its effectiveness during any period of time (not to exceed 45 days
after a Registration Notice in the case of clause (A) below or 60 days after a
Registration Notice in the case of clauses (B) and (C) below) when (A) the
Registrant is in possession of material non-public information which it
reasonably believes would be detrimental to be disclosed at such time and such
information would have to be disclosed if a registration statement were filed or
effective at that time; (B) the Registrant is required under the Securities Act
to include audited financial statements for any period in such registration
statement and such

                                       5
   6

financial statements are not yet available for inclusion in such registration
statement; or (C) the Registrant determines, in its good faith, reasonable
judgment, that such registration would materially interfere with any financing,
acquisition or other material transaction involving the Registrant and (iii) the
Registrant will not be required to maintain the effectiveness of any such
registration statement for an aggregate period greater than 180 days. If
consummation of the sale of any Registrable Securities pursuant to a
registration hereunder does not occur within 180 days after the filing with the
SEC of the initial registration statement therefor, the provisions of this
Section 7 shall again be applicable to any proposed registration. The Registrant
shall use all reasonable best efforts to cause any Registrable Securities
registered pursuant to this Section 7 to be qualified for sale under the
securities or blue sky laws of such jurisdictions as the Holder may reasonably
request and shall continue such registration or qualification in effect in such
jurisdictions until the Holder has sold or otherwise disposed of all of the
securities subject to the registration statement; provided, however, that the
Registrant shall not be required to qualify to do business in, or consent to
general service of process in, any jurisdiction by reason of this provision.

            (c) The registration rights set forth in this Section 7 are subject
to the condition that the Holder shall provide the Registrant with such
information with respect to the Holder's Registrable Securities, the plan for
distribution thereof, and such other information with respect to the Holder as,
in the reasonable judgment of counsel for the Registrant, is necessary to enable
the Registrant to include in a registration statement all facts required to be
disclosed with respect to a registration thereunder, including the identity of
the Holder and the Holder's plan of distribution.

            (d) A registration effected under this Section 7 shall be effected
at the Registrant's expense, except for underwriting discounts and commissions
and the fees and expenses of counsel to the Holder, and the Registrant shall use
all reasonable best efforts to: (i) provide such documentation (including
certificates, opinions of counsel and "comfort" letters from auditors) as are
customary in connection with underwritten public offerings and as an underwriter
may reasonably require, (ii) prepare and file with the SEC such amendments and
supplements to such registration statement and the prospectus used in connection
with such registration statements as may be necessary to comply with the
provisions of the Securities Act and (iii) furnish to the Holder and to any
underwriter of such securities such number of copies of the final prospectus and
such other documents as the Holder or underwriters may reasonably request. In
connection with any registration which the Holder requests be underwritten, the
Holder and the Registrant agree to enter into an underwriting agreement
reasonably acceptable to each such party, in form and substance customary for
transactions of this type with the underwriters participating in such offering.

            (e)   Indemnification

                  (i) The Registrant will indemnify the Holder, each of the
Holder's directors and officers and each person who controls the Holder within
the meaning of Section 15 of the Securities Act, and each underwriter of the
Registrant's securities, with respect to any

                                       6
   7

registration, qualification or compliance which has been effected pursuant to
this Agreement, against all expenses, claims, losses, damages or liabilities (or
actions in respect thereof), including any of the foregoing incurred in
settlement of any action or litigation, commenced or threatened (each, a "DAMAGE
CLAIM"), arising out of or based on (A) any untrue statement (or alleged untrue
statement) of a material fact contained in any registration statement,
prospectus, offering circular or other document, or any amendment or supplement
thereto, incident to any such registration, qualification or compliance, (B) any
omission (or alleged omission) to state therein a material fact required to be
stated therein or necessary to make the statements therein, in light of the
circumstances in which they were made, not misleading, or (C) any violation by
the Registrant of any rule or regulation promulgated under the Securities Act,
the Securities Exchange Act of 1934, as amended, any federal or state securities
law or any rule or regulation promulgated under any of them applicable to the
Registrant (each matter in clause (A), (B) or (C), a "VIOLATION"), in each case
in connection with any such registration, qualification or compliance, and the
Registrant will reimburse the Holder and, each of its directors and officers and
each person who controls the Holder within the meaning of Section 15 of the
Securities Act, and each underwriter for any legal and any other expenses
reasonably incurred in connection with investigating, preparing or defending any
such Damage Claim, provided that the Registrant will not be liable in any such
case to the extent that any such Damage Claim arises out of or is based on any
untrue statement or omission or alleged untrue statement or omission, made in
reliance upon and in conformity with written information furnished to the
Registrant by the Holder or director or officer or controlling person or
underwriter seeking indemnification, and provided, further, that the indemnity
agreement contained in this Section 7(e)(i) shall not apply to amounts paid in
settlement of any such Damage Claim if such settlement is effected without the
consent of the Registrant, which consent shall not be unreasonably withheld.

                  (ii) The Holder will indemnify the Registrant, each of the
Registrant's directors and officers and each underwriter of the Registrant's
securities covered by such registration statement and each person who controls
the Registrant within the meaning of Section 15 of the Securities Act, against
all Damage Claims arising out of or based on any Violation in connection with
any such registration, qualification or compliance, and will reimburse the
Registrant, such directors, officers or control persons or underwriters for any
legal or any other expenses reasonably incurred in connection with
investigating, preparing or defending any such Damage Claim, in each case to the
extent, but only to the extent, that such Violation occurs in such registration
statement, prospectus, offering circular or other document in reliance upon and
in conformity with written information furnished to the Registrant by the Holder
expressly for use therein, provided that in no event shall any indemnity under
this Section 7(e) exceed the gross proceeds of the offering received by the
Holder and provided, further that the indemnity agreement contained in this
Section 7(e)(ii) shall not apply to amounts paid in settlement of any such
Damage Claim if such settlement is effected without the consent of the Holder,
which consent shall not be unreasonably withheld.

                  (iii) Each party entitled to indemnification under this
Section 7(e) (the "INDEMNIFIED PARTY") shall give notice to the party required
to provide indemnification (the "INDEMNIFYING PARTY") promptly after such
Indemnified Party has actual knowledge of any claim

                                       7
   8

as to which indemnity may be sought, and shall permit the Indemnifying Party to
assume the defense of any such claim or any litigation resulting therefrom,
provided that counsel for the Indemnifying Party, who shall conduct the defense
of such claim or litigation, shall be approved by the Indemnified Party (whose
approval shall not unreasonably be withheld), and the Indemnified Party may
participate in such defense at such party's expense; provided, however, that the
Indemnifying Party shall pay such expense if representation of the Indemnified
Party by counsel retained by the Indemnifying Party would be inappropriate due
to actual or potential differing interests between the Indemnified Party and any
other party represented by such counsel in such proceeding, and provided,
further that the failure of any Indemnified Party to give notice as provided
herein shall not relieve the Indemnifying Party of its obligations under this
Section 7(e) unless the failure to give such notice is materially prejudicial to
an Indemnifying Party's ability to defend such action. No Indemnifying Party, in
the defense of any such claim or litigation shall, except with the consent of
each Indemnified Party, consent to entry of any judgment or enter into any
settlement which does not include as an unconditional term thereof the giving by
the claimant or plaintiff to such Indemnified Party of a release from all
liability in respect to such claim or litigation. No Indemnifying Party shall be
required to indemnify any Indemnified Party with respect to any settlement
entered into without such Indemnifying Party's prior consent (which shall not be
unreasonably withheld).

                  (iv) If the indemnification provided for in this Section 7(e)
is held by a court of competent jurisdiction to be unavailable to an Indemnified
Party with respect to any Damage Claim, then the Indemnifying Party, in lieu of
indemnifying the Indemnified Party, shall contribute to the amount paid or
payable by such Indemnified Party with respect to such Damage Claim in the
proportion that is appropriate to reflect the relative fault of the Indemnifying
Party and the Indemnified Party in connection with the statements or omissions
that resulted in such Damage Claim, as well as any other relevant equitable
considerations. The relative fault of the Indemnifying Party and the Indemnified
Party shall be determined by reference to, among other things, whether the
untrue or alleged untrue statement of material fact or the omission to state a
material fact relates to information supplied by the Indemnifying Party or by
the Indemnified Party, and the parties' relative intent, knowledge, access to
information and opportunity to correct or prevent such statement or omission. In
any such case, (A) the Holder will not be required to contribute any amount in
excess of the aggregate public offering price of all such Registrable Securities
offered and sold by the Holder pursuant to such registration statement; and (B)
no person or entity guilty of fraudulent misrepresentation (within the meaning
of Section 11(f) of the Securities Act) will be entitled to contribution from
any person or entity who was not guilty of such fraudulent misrepresentation.

      8.    Adjustment Upon Changes in Capitalization; Rights Plans

            (a) In the event of any change in the Company Shares by reason of
stock dividends, stock splits, reverse stock splits, mergers (other than the
Merger), recapitalizations, combinations, exchanges of shares and the like, the
type and number of shares or securities subject to the Option and the Exercise
Price shall be adjusted appropriately, and proper provision shall be made in the
agreements governing such transaction so that Parent shall receive, upon


                                       8
   9

exercise of the Option, the number and class of shares or other securities or
property that Parent would have received in respect of the Company Shares if the
Option had been exercised immediately prior to such event or the record date
therefor, as applicable.

            (b) Prior to such time as the Option is terminated, and at any time
after the Option is exercised (in whole or in part, if at all), the Company
shall not (i) amend (nor permit the amendment of) its Rights Agreement nor adopt
(nor permit the adoption of) a new stockholders rights plan that contains
provisions for the distribution or exercise of rights thereunder as a result of
Parent or any affiliate or transferee being the beneficial owner of shares of
the Company by virtue of the Option being exercisable or having been exercised
(or as a result of beneficially owning shares issuable in respect of any Option
Shares), or (ii) take any other action which would prevent or disable Parent
from exercising its rights under this Agreement or enjoying the full rights and
privileges possessed by other holders of Company Shares generally with respect
to the Option Shares obtained by the Holder upon exercise of the Option.

      9. Surrender of Option. If, at any time prior to the termination of the
Option, any person or "group" (as defined under Section 13(d) of the Exchange
Act and the rules and regulations thereunder) (an "ACQUIRING PERSON"): (a)
becomes the beneficial owner of more than a 50% interest in the total
outstanding voting securities of Company or any of its subsidiaries or (b) shall
have entered into an agreement with Company for, or shall have effected, the
acquisition of Company by merger, consolidation, business combination or similar
transaction involving Company, or any sale, lease, exchange, transfer, license
(other than in the ordinary course of business), acquisition or disposition of
more than 50% of the assets of Company, then, Parent may, at its sole option and
upon Parent's written request to Company, surrender the Option, to the extent
not previously exercised, to Company in exchange for the payment by Company to
Parent in immediately available funds of an amount equal to the product of: (x)
the excess, if any, of (i) the greater of (A) the highest price per share paid
or agreed to be paid by the Acquiring Person for any Company Shares in such
transaction (or, if there is no readily available per share price in such
transaction, the aggregate consideration paid or to be paid by the Acquiring
Person in such transaction, divided by the number of Company Shares then
outstanding (the value of any consideration other than cash to be determined, in
the case of consideration with a readily ascertainable market value, by
reference to such market value and, in any case where the market value of the
consideration is not so ascertainable, by agreement in good faith between Parent
and Company)) or (B) the average closing sale price of Company Common Stock on
the Nasdaq Stock Market during the 20 trading days ending with the trading day
immediately preceding the date of such request over (ii) the Exercise Price,
multiplied by (y) the total number of Option Shares as to which the Option has
not theretofore been exercised. Upon the delivery by Parent to Company of a
surrender request, each party shall take all actions necessary to consummate
such surrender transaction as expeditiously as possible. Upon exercise of its
right to surrender the Option or any portion thereof and full payment therefor
to Parent pursuant to this Section 9, any and all rights of Parent with respect
to the portion of the Option so surrendered shall be terminated.


                                       9
   10


      10. Repurchase of Shares. Company shall have the right to purchase for
cash (the "REPURCHASE RIGHT") all, but not less than all, of the Option Shares
then beneficially owned by Parent at an aggregate price for all such shares
(regardless of the number of such shares) equal to the Adjusted Profit Cap.
Company's right to exercise the Repurchase Right shall expire on the twentieth
business day following the two year anniversary of the termination of the Merger
(the "MERGER TERMINATION DATE"). In the event Company wishes to exercise the
Repurchase Right, Company shall send a written notice to Parent specifying a
date (not later than ten business days and not earlier than the second business
day following the date such notice is given) for the closing of such repurchase
(the "REPURCHASE NOTICE"), provided, however that Company may not repurchase any
Option Shares hereunder prior to the date that is one calendar year following
the date on which the Merger Agreement is terminated. The closing of the
repurchase of the Option Shares shall take place at the principal offices of
Company upon such specified date. Upon exercise of Company's right to repurchase
all outstanding Option Shares and full payment therefor to Parent pursuant to
this Section 10, any and all right of Parent to future exercises of the Option
shall be terminated. Notwithstanding anything to the contrary herein, if
application of the Adjusted Profit Cap formula below yields a number that is
less than zero, Company may exercise its Repurchase Right as provided in this
Section 10, and upon such exercise, Parent shall deliver all Option Shares it
holds to Company for cancellation, and neither Parent nor Company shall pay each
other any amount in connection with such exercise of the Repurchase Right.

      For the purposes of this Agreement, the "ADJUSTED PROFIT CAP" means the
difference of (i) the Profit Cap minus (ii) the sum of (A) any Termination Fee
received by Parent under Section 7.3(b) of the Merger Agreement plus (B) the
proceeds received by Parent for any sales or other dispositions of Option Shares
(including pursuant to Company's exercise of its rights to purchase Option
Shares under Section 7(a) hereof) or the Option (including pursuant to Parent's
exercise to surrender the Option pursuant to Section 9 hereof), and any
dividends or distributions received by Parent declared on Option Shares, in each
case, through the date of the closing of the repurchase under this Section 10;
provided that the Adjusted Profit Cap shall never be less than zero.

      11. Restrictive Legends. Each certificate representing Option Shares
issued to Parent hereunder (other than certificates representing shares sold in
a registered public offering pursuant to Section 7) shall include a legend in
substantially the following form:

      THE SECURITIES REPRESENTED BY THIS CERTIFICATE HAVE NOT BEEN REGISTERED
      UNDER THE SECURITIES ACT OF 1933, AS AMENDED, AND MAY BE REOFFERED OR SOLD
      ONLY IF SO REGISTERED OR IF AN EXEMPTION FROM SUCH REGISTRATION IS
      AVAILABLE.

      12. Listing and HSR Filing. The Company, upon the request of Parent, shall
promptly file an application to list the Company Shares to be acquired upon
exercise of the Option for quotation on the Nasdaq Stock Market and shall use
its reasonable efforts to obtain approval of such listing as soon as
practicable. Promptly after the date hereof, upon request by

                                       10
   11

Parent, each of the parties hereto shall file with the Federal Trade Commission
and the Antitrust Division of the United States Department of Justice all
required premerger notification and report forms and other documents and
exhibits required to be filed under the HSR Act ("HSR FILINGS") to permit the
acquisition of the Company Shares subject to the Option at the earliest possible
date. In the event that Parent does not exercise its rights to acquire Company
Shares hereunder before the expiration of the period for which permission has
initially been granted pursuant to the HSR Act, the Company shall, upon request
of Parent in connection with Parent's election to exercise this option, promptly
prepare and file all additional HSR Filings to permit acquisition of the Company
Shares subject to the Option as soon as possible after delivery of the Exercise
Notice and demand by Parent for preparation and filing by Company of such
additional HSR Filings.

      13. Binding Effect. This Agreement shall be binding upon and inure to the
benefit of the parties hereto and their respective successors and permitted
assigns. Except as set forth in Section 7, nothing contained in this Agreement,
express or implied, is intended to confer upon any person other than the parties
hereto and their respective successors and permitted assigns any rights or
remedies of any nature whatsoever by reason of this Agreement.

      14.   Specific Performance; Fees.

            (a) The parties hereto recognize and agree that if for any reason
any of the provisions of this Agreement are not performed in accordance with
their specific terms or are otherwise breached, immediate and irreparable harm
or injury would be caused for which money damages would not be an adequate
remedy. Accordingly, each party agrees that in addition to other remedies the
other party shall be entitled to an injunction restraining any violation or
threatened violation of the provisions of this Agreement or the right to enforce
any of the covenants or agreements set forth herein by specific performance. In
the event that any action shall be brought in equity to enforce the provisions
of the Agreement, neither party will allege, and each party hereby waives the
defense, that there is an adequate remedy at law.

            (b) If any action, suit or other proceeding (whether at law, in
equity or otherwise) is instituted concerning or arising out of this Agreement
or any transaction contemplated hereunder, the prevailing party shall recover,
in addition to any other remedy granted to such party therein, all such party's
costs and attorneys fees incurred in connection with the prosecution or defense
of such action, suit or other proceeding.

      15. Entire Agreement. This Agreement and the Merger Agreement (including
the appendices and exhibits thereto) constitute the entire agreement between the
parties with respect to the subject matter hereof and supersede all other prior
agreements and understandings, both written and oral, between the parties with
respect to the subject matter hereof.

      16.   Further Assurances.  Each party will execute and deliver all such
further documents and instruments and take all such further action as may be
necessary in order to consummate the transactions contemplated hereby.


                                       11
   12


      17. Severability. In the event that any provision of this Agreement or the
application thereof, becomes or is declared by a court of competent jurisdiction
to be illegal, void or unenforceable, the remainder of this Agreement will
continue in full force and effect and the application of such provision to other
persons or circumstances will be interpreted so as reasonably to effect the
intent of the parties hereto. The parties further agree to replace such void or
unenforceable provision of this Agreement with a valid and enforceable provision
that will achieve, to the extent possible, the economic, business and other
purposes of such void or unenforceable provision.

      18. Notices. All notices and other communications hereunder shall be in
writing and shall be deemed given upon delivery either personally or by
commercial delivery service, or sent via telecopy (receipt confirmed) to the
parties at the following addresses or telecopy numbers (or at such other address
or telecopy numbers for a party as shall be specified by like notice):

            (a)   if to Parent or Merger Sub, to:

                  Macromedia, Inc.
                  600 Townsend Street
                  San Francisco, California  94103
                  Attention:  General Counsel
                  Facsimile No.:  415-626-0554

                  with a copy to:

                  Fenwick & West LLP
                  275 Battery Street, 15th Floor
                  San Francisco, California  94110
                  Attention:  Gordon K. Davidson
                              Douglas N. Cogen
                  Facsimile No.: 415-281-1350

            (b)   if to Company, to:

                  Allaire Corporation
                  275 Grove Street
                  Newton, Massachusetts  02466
                  Attention:  President
                              General Counsel
                  Facsimile No.:  617-219-2007


                                       12
   13


                  with a copy to:

                  Foley, Hoag & Eliot LLP
                  One Post Office Square
                  Boston, Massachusetts  02109
                  Attention:  Robert L. Birnbaum
                              William R. Kolb
                  Facsimile No.: 617-832-7000

      19.   Governing Law.  This Agreement shall be governed by and construed
in accordance with the laws of the State of Delaware, regardless of the laws
that might otherwise govern under applicable principles of conflicts of law
thereof.

      20. Counterparts. This Agreement may be executed in one or more
counterparts, all of which shall be considered one and the same agreement and
shall become effective when one or more counterparts have been signed by each of
the parties and delivered to the other party, it being understood that all
parties need not sign the same counterpart.

      21.   Expenses.  Except as otherwise expressly provided herein or in
the Merger Agreement, all costs and expenses incurred in connection with the
transactions contemplated by this Agreement shall be paid by the party
incurring such expenses.

      22. Amendments; Waiver. This Agreement may be amended by the parties
hereto and the terms and conditions hereof may be waived only by an instrument
in writing signed on behalf of each of the parties hereto, or, in the case of a
waiver, by an instrument signed on behalf of the party waiving compliance.

      23. Assignment. Neither of the parties hereto may sell, transfer, assign
or otherwise dispose of any of its rights or obligations under this Agreement or
the Option created hereunder to any other person, without the express written
consent of the other party, except that the rights and obligations hereunder
shall inure to the benefit of and be binding upon any successor or permitted
assign of a party hereto. No consent shall be required in connection with a
merger, consolidation, reorganization, sale of substantially all assets or
similar transaction with respect to a party hereto. Any purported assignment in
violation of this Section shall be void.

      24. Public Announcement. Company shall consult with Parent and Parent
shall consult with Company before issuing any press release with respect to the
initial announcement of this Agreement or the transactions contemplated hereby
and neither party shall issue any such press release prior to such consultation
except as may be required by law.

      25. Waiver Of Jury Trial. EACH OF PARENT AND COMPANY HEREBY IRREVOCABLY
WAIVES ALL RIGHT TO TRIAL BY JURY IN ANY ACTION, SUIT, PROCEEDING OR
COUNTERCLAIM (WHETHER BASED ON CONTRACT, TORT OR OTHERWISE) ARISING OUT OF OR
RELATING TO THIS AGREEMENT OR THE

                                       13
   14

ACTIONS OF PARENT OR COMPANY IN THE NEGOTIATION, ADMINISTRATION, PERFORMANCE AND
ENFORCEMENT HEREOF.




                                    * * * * *








                                       14
   15



      IN WITNESS WHEREOF, the parties hereto have caused this Stock Option
Agreement to be executed by their duly authorized respective officers as of the
date first written above.

                                          ALLAIRE CORPORATION


                                          By: /s/ David J. Orfao
                                              ---------------------
                                          Name: David J. Orfao
                                          Title: CEO


                                          MACROMEDIA, INC.


                                          By: /s/ Robert K. Burgess
                                              -----------------------
                                          Name:
                                          Title: