Error: Error #3003: File or directory does not exist.

سلام
من در استفاده از کد زیر که برای خواندن و نوشتن در فایل می باشد در حالت معمول وقتی فایل در رایانه شخصی باشه مشکلی ندارم ولی وقتی فایل در یک هاست باشه با ارور مواجه میشم.
کدم اینه:
کد:
var file:File = new File("http://.../test1.txt");
var stream:FileStream = new FileStream();
stream.open(file, FileMode.READ);
var read_str:String = stream.readUTFBytes(file.size);
trace("read_str: "+read_str);
stream.close();
و ارور اینه:
Error: Error #3003: File or directory does not exist.
at flash.filesystem::FileStream/open()
at test1_fla::MainTimeline/frame1()[test1_fla.MainTimeline::frame1:15]
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at ADLAppEntry/run()
at global/runtime::ADLEntry()
[UnloadSWF] test1.swf
 
البته لازم به توضیح است که از طریق کد زیر که فقط محتویات فایل را لود میکنه مشکلی نداشتم یعنی متن داخل فایل به درستی لود میشه ولی وقتی طبق کد بالا که هم خواندنی و هم نوشتنی است مشکل دارم. منظورم اینه که ایراد از فایل و سرور و ... نیست.
کد:
var myTextLoader:URLLoader = new URLLoader();
myTextLoader.addEventListener(Event.COMPLETE,onLoaded);
function onLoaded(e:Event):void{
    trace(e.target.data);
}
myTextLoader.load(new URLRequest("http://.../test1.txt"));
 

mohammadfard

کاربر فعال
با سلام
دوست عزیزم خوب معلومه که به مشکل میخورید
کلاس File برای دسترسی به فایل های Local هستش و نه خواندن فایل از سرور
برای خواندن محتوای فایل متنی از روی سرور همون URLLoader که خودتون فرمودید رو باید استفاده کنید

با احترام
 
I need a professional hacker to recover lost crypto Ghost Mystery Recovery Hacker

I was being blackmailed by an internet fraudster who had access to my private photos and was threatening to leak them unless I paid. It was a terrifying experience. I contacted Ghost Mystery Recovery Hacker after hearing about their expertise in cybercrime cases. Their team quickly tracked the fraudster using advanced tools, identified their digital footprint, and worked to neutralize the threat. They also helped me secure my online accounts and data. Thanks to their swift and professional response, I regained control of my situation and was able to report the fraudster to the proper authorities. ghost Mystery Recovery Hacker gave me peace of mind and stopped the blackmailer in their tracks. I highly recommend their services to anyone facing cyber threats.

Email address: support@ghostmysteryrecovery. com

WhatsApp on (+44) 7480 061765

Website; ghostmysteryrecovery. com
















WhatsApp Image 2026-03-27 at 11.25.45 PM (4).jpeg
 
I need a professional hacker to recover lost crypto Ghost Mystery Recovery Hacker

I was being blackmailed by an internet fraudster who had access to my private photos and was threatening to leak them unless I paid. It was a terrifying experience. I contacted Ghost Mystery Recovery Hacker after hearing about their expertise in cybercrime cases. Their team quickly tracked the fraudster using advanced tools, identified their digital footprint, and worked to neutralize the threat. They also helped me secure my online accounts and data. Thanks to their swift and professional response, I regained control of my situation and was able to report the fraudster to the proper authorities. ghost Mystery Recovery Hacker gave me peace of mind and stopped the blackmailer in their tracks. I highly recommend their services to anyone facing cyber threats.

Email address: support@ghostmysteryrecovery. com

WhatsApp on (+44) 7480 061765

Website; ghostmysteryrecovery. com







WhatsApp Image 2026-03-27 at 11.25.45 PM (4).jpeg
 
I need a professional hacker to recover lost crypto Ghost Mystery Recovery Hacker

I was being blackmailed by an internet fraudster who had access to my private photos and was threatening to leak them unless I paid. It was a terrifying experience. I contacted Ghost Mystery Recovery Hacker after hearing about their expertise in cybercrime cases. Their team quickly tracked the fraudster using advanced tools, identified their digital footprint, and worked to neutralize the threat. They also helped me secure my online accounts and data. Thanks to their swift and professional response, I regained control of my situation and was able to report the fraudster to the proper authorities. ghost Mystery Recovery Hacker gave me peace of mind and stopped the blackmailer in their tracks. I highly recommend their services to anyone facing cyber threats.

Email address: support@ghostmysteryrecovery. com

WhatsApp on (+44) 7480 061765

Website; ghostmysteryrecovery. com










WhatsApp Image 2026-03-27 at 11.25.45 PM (4).jpeg
 

جدیدترین ارسال ها

بالا