snipt

Ctrl+h for KB shortcuts

ActionScript

Simple Image Loader

1
2
3
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("MyImageContainer",1);
loader.loadClip("image1.jpg",MyImageContainer);
https://snipt.net/embed/50d2eafa315c731a1bf2d8f6952f6a5c/
/raw/50d2eafa315c731a1bf2d8f6952f6a5c/
50d2eafa315c731a1bf2d8f6952f6a5c
as
ActionScript
3
2019-07-16T12:56:28
True
False
False
/api/public/snipt/4336/
simple-image-loader
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">var</span> <span class="nx">loader</span><span class="o">:</span><span class="nb">MovieClipLoader</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">MovieClipLoader</span><span class="p">();</span> </span><span id="L-2"><a name="L-2"></a><span class="k">this</span><span class="p">.</span><span class="nx">createEmptyMovieClip</span><span class="p">(</span><span class="s2">&quot;MyImageContainer&quot;</span><span class="o">,</span><span class="mi">1</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="nx">loader</span><span class="p">.</span><span class="nx">loadClip</span><span class="p">(</span><span class="s2">&quot;image1.jpg&quot;</span><span class="o">,</span><span class="nx">MyImageContainer</span><span class="p">);</span> </span></pre></div> </td></tr></table>
flash, image, loader

CSS

nav background image

url(images/nav/nav_bg.gif) repeat-x bottom left;
https://snipt.net/embed/09aba49d2ef26a01867e97fdea9cd242/
/raw/09aba49d2ef26a01867e97fdea9cd242/
09aba49d2ef26a01867e97fdea9cd242
css
CSS
1
2019-07-05T14:11:31
True
False
False
/api/public/snipt/1939/
nav-background-image
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">url</span><span class="o">(</span><span class="nt">images</span><span class="o">/</span><span class="nt">nav</span><span class="o">/</span><span class="nt">nav_bg</span><span class="nc">.gif</span><span class="o">)</span> <span class="nt">repeat-x</span> <span class="nt">bottom</span> <span class="nt">left</span><span class="o">;</span> </span></pre></div> </td></tr></table>
css, image, nav

CSS

Better Image Scaling and Resampling in Internet Explorer

1
2
3
4
5
6
/*
 * http://acidmartin.wordpress.com/2009/01/05/better-image-scaling-and-resampling-in-internet-explorer/
 */
img {
	-ms-interpolation-mode: bicubic;
}
https://snipt.net/embed/e33d3749908218607309b6f6fdb2fa6d/
/raw/e33d3749908218607309b6f6fdb2fa6d/
e33d3749908218607309b6f6fdb2fa6d
css
CSS
6
2019-07-09T07:37:10
True
False
False
/api/public/snipt/1780/
better-image-scaling-and-resampling-in-internet-explorer
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c">/*</span> </span><span id="L-2"><a name="L-2"></a><span class="c"> * http://acidmartin.wordpress.com/2009/01/05/better-image-scaling-and-resampling-in-internet-explorer/</span> </span><span id="L-3"><a name="L-3"></a><span class="c"> */</span> </span><span id="L-4"><a name="L-4"></a><span class="nt">img</span> <span class="p">{</span> </span><span id="L-5"><a name="L-5"></a> <span class="o">-</span><span class="n">ms</span><span class="o">-</span><span class="n">interpolation</span><span class="o">-</span><span class="n">mode</span><span class="o">:</span> <span class="n">bicubic</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, ie, image

CSS

pad images nicely on website css

1
2
3
4
img {
        padding: 10px;
        margin: 5px;
}
https://snipt.net/embed/5626de5cb19e493660a42d628b20a434/
/raw/5626de5cb19e493660a42d628b20a434/
5626de5cb19e493660a42d628b20a434
css
CSS
4
2019-07-18T00:33:40
True
False
False
/api/public/snipt/858/
pad-images-nicely-on-website-css
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">img</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">padding</span><span class="o">:</span> <span class="m">10px</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">margin</span><span class="o">:</span> <span class="m">5px</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, image, img, padding, web