İçeriğin rss beslemesi kullanımda değil Soru - Cevap Bölümü / Kategori: Programlama

14/08/2008 - 17:04:52 cevap (2) Okunma : 433 Bu yazıyı 1 kişi tuttu.

Flash'la Klasörden Resim Yükleme

Ekte gönderdiğim resimde kırmızı ok ile gösterdiğim bölüme klasörden resim okutamıyorum. Daha önceki resimleri için yazdığım kod aşağıdadır.

import mx.transitions.Tween;
import mx.transitions.easing.*;

picList = false;
picBig = false;
_randomEx = 0;

var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {

picture.kloading.removeMovieClip();
target_mc._visible = false;

var maskClip:MovieClip = target_mc.createEmptyMovieClip("mask_mc", 20);
with (maskClip) {
// Draw a mask that is the same size as the loaded image.
beginFill(0xFF00FF, 100);
moveTo(0, 0);
lineTo(target_mc._width, 0);
lineTo(target_mc._width, target_mc._height);
lineTo(0, target_mc._height);
lineTo(0, 0);
endFill();


//trace(target_mc._width+" "+target_mc._height);
}

target_mc.setMask(maskClip);
target_mc._visible

var mask_tween:Tween = new Tween(maskClip, "_xscale", Strong.easeOut, 0, 100, 1,);

};



function bgResize(){
//this.back.swapDepths(_parent.getNextHighestDepth());
this.back._x = 0-this._x;
this.back._y = 0-this._y;
this.back._width = Stage.width;
this.back._height = Stage.height;
trace(this.back);

}

function resizeAction(){
bgResize();
var menuBg_Tween:Tween = new Tween(picture, "_x", Strong.easeOut, picture._x, ((Stage.width-picture._width)/2)-this._x, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picture, "_y", Strong.easeOut, picture._y, ((Stage.height-picture._height)/2)-this._y, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picIns, "_x", Strong.easeOut, picture._x+5, ((Stage.width-picture._width)/2)-this._x+5, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picIns, "_y", Strong.easeOut, picture._y+5, ((Stage.height-picture._height)/2)-this._y+5, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picContainer, "_x", Strong.easeOut, picContainer._x, ((Stage.width-530)/2)-(this._x+picContainer._width+10), 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picContainer, "_y", Strong.easeOut, picContainer._y, ((Stage.height-360)/2)-this._y, 5.000000E-001,);

}

this.back.useHandCursor = false;
this.back.onRollOver = function() {

}

function loadPic(resim:String, enbuyuk:Boolean){
var pic:MovieClip = this.createEmptyMovieClip("picIns",picture.show.getNextHighestDepth());
with (pic) {
moveTo(0, 0);
lineTo(picture.show._width, _0);
lineTo(picture.show._width, picture.show._height);
lineTo(0, picture.show._height);
lineTo(0, 0);
endFill();
_x = picture._x+picture.show._x;
_y = picture._y+picture.show._y;

}
if(enbuyuk){
imageText("Birdeneme Sayfası", pic);
}
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mclListener);
img_mcl.loadClip("pics/"+resim+".jpg", pic);

}

function loadlitePic(resim:String, enbuyuk:Boolean, picLite:MovieClip){
var pic:MovieClip = picLite.createEmptyMovieClip("picliteIns",picLite.show.getNextHighestDepth());
with (pic) {
moveTo(0, 0);
lineTo(picLite.show._width, _0);
lineTo(picLite.show._width, picLite.show._height);
lineTo(0, picLite.show._height);
lineTo(0, 0);
endFill();
_x = picLite._x+picLite.show._x;
_y = picLite._y+picLite.show._y;

}
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mclListener);
img_mcl.loadClip("pics/"+acelya+".jpg", pic);

}

function imageText(_text:String, _parentPic:MovieClip){
var imgText:MovieClip = _parentPic.createEmptyMovieClip("txtHeader",_parentPic.getNextHighestDepth());
with (imgText) {
beginFill(0xFF99FF, 100);
moveTo(0, 0);
lineTo(_parentPic.show._width, 0);
lineTo(_parentPic.show._width,50);
lineTo(0, 50);
lineTo(0, 0);
endFill();
}
}

function removePic(){
picture.kloading.removeMovieClip();
picIns.unloadMovie();
}

function init(){
this.swapDepths(_parent.getNextHighestDepth());
picList
bgResize();
duplicatePicLite(random(3));
picture_y = picture._y;
picture._x = ((Stage.width-picture._width)/2)-this._x;
var menuBg_Tween:Tween = new Tween(picture, "_y", Strong.easeOut, 0-(picture_y+picture._height), ((Stage.height-picture._height)/2)-this._y, 5.000000E-001,);
picContainer._x = ((Stage.width-picture._width)/2)-(this._x+picContainer._width+10);
var menuBg_Tween:Tween = new Tween(picContainer, "_y", Strong.easeOut, 0-(picture_y+picture._height), ((Stage.height-picture._height)/2)-this._y, 5.000000E-001,);
menuBg_Tween.onMotionFinished = function(){
trace("Width:"+picture._width+" Height:"+picture._height);
picture.attachMovie("kloading", "kloading", picture.getNextHighestDepth(), {_x:(picture._width/2), _y:(picture._height/2)});
loadPic("buyuk/acelya", false);
}
}

function defuse(){
removePic();
var menuBg_Tween:Tween = new Tween(picture, "_y", Strong.easeOut, ((Stage.height-picture._height)/2)-this._y, -100-(picture_y+picture._height), 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picContainer, "_y", Strong.easeOut, ((Stage.height-picture._height)/2)-this._y, -100-(picture_y+picture._height), 5.000000E-001,);
menuBg_Tween.onMotionFinished = function(){

_parent["resimEk"].removePicLite(_randomEx);
_parent["resimEk"].removeMovieClip();
_parent["resimEk"].back._x = -10;
_parent["resimEk"].back._y = -10;
_parent["resimEk"].back._width = 10;
_parent["resimEk"].back._height = 10;
_parent["resimEk"].picList = false;
}
}

picture.onPress = function() {
//trace(picture._width+" "+(picture._x-(785/2)));
//var picBig:MovieClip = picture.duplicateMovieClip("picBig",picture.getDepth());

if(picBig == false){
picBig
picture_xx = (picture._x-((785-picture._width)/2));
picture_yy = (picture._y-((450-picture._height)/2));
removePic();
trace("x:"+picture_xx);
trace("y:"+picture_yy);
var menuBg_Tween:Tween = new Tween(picture, "_x", Strong.easeOut, picture._x, picture_xx, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picture, "_y", Strong.easeOut, picture._y, picture_yy, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picture, "_width", Strong.easeOut, picture._width, 785, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picture, "_height", Strong.easeOut, picture._height, 450, 5.000000E-001,);
menuBg_Tween.onMotionFinished = function(){
loadPic("enbuyuk/acelya",);
trace("Width:"+picture._width+" Height:"+picture._height);
picture.attachMovie("kloading", "kloading", picture.getNextHighestDepth(), {_x:530/2, _y:360/2});
}
}else{
picBig = false;
removePic();
//trace("Küçülüyor "+picBig);
var menuBg_Tween:Tween = new Tween(picture, "_x", Strong.easeIn, picture._x, (picture._x-((530-picture._width)/2)), 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picture, "_y", Strong.easeIn, picture._y, (picture._y-((360-picture._height)/2)), 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picture, "_width", Strong.easeIn, picture._width, 530, 5.000000E-001,);
var menuBg_Tween:Tween = new Tween(picture, "_height", Strong.easeIn, picture._height, 360, 5.000000E-001,);
menuBg_Tween.onMotionFinished = function(){
loadPic("buyuk/acelya");
trace("Width:"+picture._width+" Height:"+picture._height);
picture.attachMovie("kloading", "kloading", picture.getNextHighestDepth(), {_x:picture._width/2, _y:picture._height/2});
}
}
}

function duplicatePicLite(_random:Number){
//_randomEx = _random;

my_xml1 = new XML();
// load data from an external XML file into "my_xml" object
my_xml1.load("xml/urun.xml");
// what to do when data is loaded ... Call a function ("my_function" in this case)
my_xml1.onLoad = my_function1;
// ignore "white spaces", text nodes that only contain white space are discarded
my_xml1.ignoreWhite = 1;
//
// function contents
function my_function1() {
_randomEx = my_xml1.firstChild.childNodes.length;
if(_randomEx>1){_randomEx=1;}
for(i=0;i<_randomEx;i++){
//var picLite:MovieClip = picContainer.pic.duplicateMovieClip("picLite"+i,picContainer.getNextHighestDepth());
picContainer.attachMovie("pic","pic"+i,picContainer.getNextHighestDepth(),{x:-50});
picContainer["pic"+i]._y = (i*78.8);
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mclListener);
img_mcl.loadClip("pics/lite/lite/acelya.jpg", picContainer["pic"+i].show);
picContainer["pic"+i].onRelease = function(){
trace(_parent["resimEk"] );
loadPic("buyuk/acelya", false);
}
}
}
}
function removePicLite(_random:Number){
for(i=0;i<_random;i++){
//var picLite:MovieClip = picContainer.pic.duplicateMovieClip("picLite"+i,picContainer.getNextHighestDepth());
//picLite._y = (i*78.8)+78.8;
picContainer["picLite"+i].removeMovieClip();
}
}

init();

//bgResize();

MMistanbul Forumları

Ekli Dosyalar

Dosyalara ulaşabilmek için, üye iseniz giriş yapın, değilseniz üye olun.

  • picture.jpg
adres Proclus profilini göster
Veli Süngütay 14.08.2008 23:02:19
En iyi cevap mı ?

Flash programlama yaparken her zaman server uzerinden calisalim. Sanirim problem guvenlik hatasi.

adres DoWai profilini göster
Berk SARMAŞIK 15.08.2008 23:14:45
En iyi cevap mı ?

Çektiğin resim dosyasının uzantısı artı sınıfı da önemli jpg2000 tarzında bir jpg resim dosyasınıda çekmeye çalışıyor olabilirsin. servera tanımladığın klasore bakmandada fayda var.

aç-kapa Bu Yazıyı Tutanlar

yeni üyelik | şifremi unuttum

aç-kapa Yarışma Fikir10000 Dijital Pazarlama Fikir Yarışması

Fikir10000 Dijital Pazarlama Fikir Yarışması

ADTECH tarafından düzenlenen Fikir10000 yarışmasına; dijital pazarlama ile ilgili size ait olan fikrinizle katılabilir ve 10.000 YTL’lik birinci...
Kategori: Yarışma

aç-kapa Toplantı Kahraman ve need4code.com Projesi Connect Toplantısı

Kahraman ve need4code.com Projesi Connect Toplantısı

Selam arkadaslar, Programlama ile uğraşanların hayatlarını kolaylaştıracak desktop ve web tabanlı ortak iki proje ile ilgili 3. toplantımızı 16Aralı...
Kategori: Toplantı

aç-kapa Yarışma 7Dx Demoscene Party

7Dx Demoscene Party

2002 yılından beri amatör bilgisayar kültürü ile ilgilenen insanları bir araya getirmeyi hedefleyen 7DX parti serisinin bu seneki ayağı olan 7D8 Demo ...
Kategori: Yarışma

aç-kapa Eğitim Türkiye'de İnternet Konferansı - Internet Teknolojileri Derneği -22-23 Aralık ODTÜ

Türkiye'de İnternet Konferansı - Internet Teknolojileri Derneği -22-23 Aralık ODTÜ

Etkin Katılım Çağrısı Türkiye’de Internet ile ilgili grupları biraraya getirerek İnternet’i tum boyutlarıyla tanıtmak, gelistirmek, tartı...
Kategori: Eğitim

aç-kapa Konferans Bilgi Güvenliği ve Kriptoloji Konferansı

Bilgi Güvenliği ve Kriptoloji Konferansı

Önemli Tarihler: Etkinlik Tarihi : 24-26 Aralık 2008 Son Bildiri Gönderme Tarihi : 20 Ekim 2008 Bildiri Kabul Tarihi Bildirimi :...
Kategori: Konferans

üyeler Son Kahramanlar...

stats Kimler Burada? web stats

Son 1 dakika içinde MMIstanbul' da 569 (0 kayıtlı, 569 ziyaretçi) kullanıcı varmış. Login durumda olanlar aşağıda:

coldfusion mysql ubuntu
 
sponsor adobe istanbul