<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Resize image e Smoothed]]></title><description><![CDATA[<p dir="auto">Ciao ragazzi è la prima vota che scrivo sul vostro forum com la sperazna che qualcuno mi aiuti a risolvere il seguente problema!</p>
<p dir="auto">Sto impostando un page flip, che in realta ho scaricato come utilità libera, solo che carico immagini tramite un file xml che però ridimensiono, tramite uno script che ho trovato in internet, perchè ho la necessità di importarle di dimensioni più grandi per poi essere zoomate!<br />
Lo script è il seguente, sono consapevole che è un gran casino perchè non essendo un esperto mi procuro script qua e la e poi cerco di sistemarli secondo le mie esigenze, quindi dovrei far funzionare sia il resize che loadBitmapSmoothed</p>
<pre><code>pages._visible = 0;
debug._visible = 0;
mano._visible = false;
<a class="plugin-hashtag-a" href="https://connect.gt/hashtags/include">#include</a> "import_xml.as"
stop();

//variable declarations to hold the values
var thisWidth:Number;
var thisHeight:Number;
var maximumHeight:Number;//height to which movieclip to be resized
var maximumWidth:Number;//width to which movieclip to be resized
var oldx:Number;
var oldy:Number;
var ratio:Number;
var mclis:Object = new Object();//An object that listens for a callback notification from the MovieClipLoader event handlers.

mclis.onLoadInit = function(target_mc:MovieClip) {//Invoked when the actions on the first frame of the loaded clip have been executed
_root.thisHeight = target_mc._height;//loaded movieclip height
_root.maximumHeight = 1520;
_root.thisWidth = target_mc._width;//loaded movieclip width
_root.maximumWidth = 1057;
ratio = thisHeight/thisWidth;//calculation ratio to which resize takes place
if (thisWidth&gt;maximumWidth) {
thisWidth = maximumWidth;
thisHeight = Math.round(thisWidth*ratio);
}
if (thisHeight&gt;maximumHeight) {
thisHeight = maximumHeight;
thisWidth = Math.round(thisHeight/ratio);
}
target_mc._width = 278;//applying new width
target_mc._height = 400;//applying new height
target_mc._x = 0;//applying new height
target_mc._y = 0;//applying new height
};
var mcl:MovieClipLoader = new MovieClipLoader();//MovieClipLoader class lets you implement listener callbacks that provide status information while SWF, JPEG, GIF, and PNG files are being loaded into movie clips.
mcl.addListener(mclis);//add the object as listener for event handlers
_root.target_mc("target_mc", _root.getNextHighestDepth());//holder movieclip
_root.mcl.loadClip("page07.jpg", _root.pages.p1.page.pf.ph.pic);
_root.mcl.loadClip("page07.jpg", _root.pages.p4.page.pf.ph.pic);
_root.mcl.loadClip("page07.jpg", _root.pages.flip.p2.page.pf.ph.pic);
_root.mcl.loadClip("page07.jpg", _root.pages.flip.p3.page.pf.ph.pic);
_root.mcl.loadClip("page07.jpg", _root.pages.p0.page.pf.ph.pic);
_root.mcl.loadClip("page07.jpg", _root.pages.p5.page.pf.ph.pic);

import flash.display.BitmapData;
import flash.geom.Matrix;
function myCopy(pic) {
    var mc = this.createEmptyMovieClip('mc', this.getNextHighestDepth());
    var bmp = new flash.display.BitmapData(loadListener.myWidth, loadListener.myHeight, true, 0xFFFFFF);
    bmp.draw(pic);
    _root.pages.p4.page.pf.ph.pic.attachBitmap(bmp,0,null,true);
    _root.pages.p4.page.pf.ph._rotation = 0;
}
// create the movieclips
// first the temporary mc where you load the initial image
this.createEmptyMovieClip('temploader', this.getNextHighestDepth());
// then a movieclip where you'll create your canvas
//this.createEmptyMovieClip('picparent', this.getNextHighestDepth());
// finally the actual movieclip where your image will get drawn
//picparent.createEmptyMovieClip('container', this.getNextHighestDepth());
 
var loadListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
loadListener.onLoadStart = function(target_mc:MovieClip):Void {
     // make the temporay mc invisible
     target_mc._alpha=0;
}
loadListener.onLoadInit = function(target_mc:MovieClip):Void  {
    // get the image dimensions
    this.myWidth = 278;
    this.myHeight = 400;
    
    // when the image is fully loaded copy it with smoothing to the final container
    myCopy(temploader);
    
};
function preload(myClip) {
    //loding fumction
    mcLoader.loadClip(myClip,temploader);
}
//Start loading your image
preload("page07.jpg");
 
```Confido in voi!!</code></pre>
]]></description><link>https://connect.gt/topic/119682/resize-image-e-smoothed</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 05:28:45 GMT</lastBuildDate><atom:link href="https://connect.gt/topic/119682.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Jan 2010 16:09:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Resize image e Smoothed on Fri, 22 Jan 2010 09:31:14 GMT]]></title><description><![CDATA[<p dir="auto">Tranquillo siamo qui anche per questo. <img src="https://connect.gt/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=4as8rolt52f" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" /><br />
Ora attendiamo solo chi sia in grado di aiutarci.</p>
]]></description><link>https://connect.gt/post/886787</link><guid isPermaLink="true">https://connect.gt/post/886787</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Fri, 22 Jan 2010 09:31:14 GMT</pubDate></item><item><title><![CDATA[Reply to Resize image e Smoothed on Fri, 22 Jan 2010 07:04:32 GMT]]></title><description><![CDATA[<p dir="auto">Hai ragione ma mi sono appena iscritto e non ci avevo capito molto!<br />
Grazie</p>
]]></description><link>https://connect.gt/post/886807</link><guid isPermaLink="true">https://connect.gt/post/886807</guid><dc:creator><![CDATA[marcipp]]></dc:creator><pubDate>Fri, 22 Jan 2010 07:04:32 GMT</pubDate></item><item><title><![CDATA[Reply to Resize image e Smoothed on Thu, 21 Jan 2010 17:17:41 GMT]]></title><description><![CDATA[<p dir="auto">Ciao Marcipp ho spostato il tuo messaggio in un area più consona, l'area dove avevi postato prima era un area per sole presentazioni.</p>
]]></description><link>https://connect.gt/post/886791</link><guid isPermaLink="true">https://connect.gt/post/886791</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Thu, 21 Jan 2010 17:17:41 GMT</pubDate></item></channel></rss>