For continuity at \( x = 0 \), the limit of \( f(x) \) as \( x \to 0 \) must equal \( f(0) \). We evaluate the limit: \[ \lim_{x \to 0} \frac{\sin^2(ax)}{x^2}. \] Using the approximation \( \sin(x) \approx x \) for small \( x \), we have \( \sin(ax) \approx ax \). Squaring this gives \( \sin^2(ax) \approx a^2 x^2 \). Substituting this into the limit: \[ \lim_{x \to 0} \frac{a^2 x^2}{x^2} = a^2. \] For continuity, this limit must equal \( f(0) = 1 \). Therefore: \[ a^2 = 1, \quad a = \pm 1. \] The values of \( a \) for which the function is continuous at \( x = 0 \) are \( \pm 1 \).