سلام وقتتون بخیر
من تازه کار با سویش3 رو شروع کردم
میخوام ی فایل swf خارجی رو تو main پروژم لود کنم
swf رو در پوشه pages در کنار فایل اصلی قرار دادم
اما موقع آدرس دادن حتما باید آدرس کامل بدم و الا کار نمیکنه و خوب اینجوری که نمیشه رو سی دی رایتش کنم
تو رو خدا به دادم برسین هر چی گشتم مشکلم حل نشد
اینم کدی که پیدا کردم واسه لودش :
من تازه کار با سویش3 رو شروع کردم
میخوام ی فایل swf خارجی رو تو main پروژم لود کنم
swf رو در پوشه pages در کنار فایل اصلی قرار دادم
اما موقع آدرس دادن حتما باید آدرس کامل بدم و الا کار نمیکنه و خوب اینجوری که نمیشه رو سی دی رایتش کنم
تو رو خدا به دادم برسین هر چی گشتم مشکلم حل نشد
اینم کدی که پیدا کردم واسه لودش :
PHP:
onSelfEvent (load)
{
var mcLoader : MovieClipLoader = new MovieClipLoader();
var mcListener : Object = new Object();
mcListener.onLoadStart = function(target_mc : MovieClip) //When loading begins.
{
trace("onLoadStart");
};
mcListener.onLoadProgress = function(target_mc : MovieClip, bytesLoaded : Number, bytesTotal : Number) : Void //Invoked every time the loading content is written to the hard disk during the loading process
{
trace("onProgress with bytesLoaded: " add bytesLoaded add " bytes of " add bytesTotal);
}
mcListener.onLoadComplete = function(target_mc : MovieClip) //When a file completes downloading,
{
trace("onLoadComplete");
};
mcListener.onLoadError = function(target_mc : MovieClip, errorCode : String, httpStatus : Number) //If the clip cannot be loaded.
{
trace("onLoadError with errorcode: " add errorCode add " httpStatus: " add httpStatus)
};
mcListener.onLoadInit = function(target_mc : MovieClip) //handler is invoked after the actions in the first frame of the clip have executed, so you can begin manipulating the loaded clip.
{
trace("onLoadInit");
// my_mc._x = Stage.width/2 - target_mc._width/2;
// my_mc._y = Stage.height/2 - target_mc._height/2;
my_mc._x = 90;
my_mc._y = 120;
}
mcLoader.addListener(mcListener);
mcLoader.loadClip("F:\\cd\\final\\pages\\passive.swf", my_mc); //url from file, name from movieclip to display the image
// mcLoader.loadClip("http://www.swishzone.com/max4-homepage-banner-animation.swf", my_mc1); //url from file, name from movieclip to display the movie
// Use mcListener.unloadClip() to remove movies or images loaded with this method or to cancel a load operation that is in progress.
}
onFrame (1) {
stop();
}