• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Filename in a text file

Community Beginner ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

Ok, so I have written some png files in a .txt file...

"Bracelet.png"

"Boston.png"

"Camera.png"

I would like to know how I can turn them into URLRequests using Actionscript3.

I already know how to load them.

Views

368

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2024 Mar 15, 2024

Copy link to clipboard

Copied

this was already answered in loadImage() function.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2024 Mar 15, 2024

Copy link to clipboard

Copied

Oh thats right. Can I use that function with FileReference?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2024 Mar 15, 2024

Copy link to clipboard

Copied

what are you trying to accomplish that was answered previously?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2024 Mar 15, 2024

Copy link to clipboard

Copied

What I was trying to accomplish was loading an image that was described in a textfile.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2024 Mar 15, 2024

Copy link to clipboard

Copied

Written in a textfile, sorry.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2024 Mar 16, 2024

Copy link to clipboard

Copied

copy and paste the first few lines your text file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 18, 2024 Mar 18, 2024

Copy link to clipboard

Copied

It worked! Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 18, 2024 Mar 18, 2024

Copy link to clipboard

Copied

So, the original code worked, but this was a code I used.

 

var myLoader: URLLoader = new URLLoader(new URLRequest("Slides/round1/slide1.txt"));
var myArray: Array = new Array();
 
myLoader.addEventListener(Event.COMPLETE, loadComplete, false, 0, true);
 
function loadComplete(e: Event): void {
myArray = myLoader.data.split("&prize:");
 
var loaderA = []; // this will contain the loaders that load the above bitmaps
var index: int = 0;
load_nextF();
 
function load_nextF(): void {
var loader: Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, load_completeF);
prizeslide.load(new URLRequest("Prizes/" + myArray[index]));
loaderA.push(loader);
}
 
function load_completeF(e: Event): void {
index++;
if (index < myArray.length) {
load_nextF();
// and you may, or may not want to do something here
} else {
// all loading is complete. 
}
}
}
 
And I got this error...
Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: 
 
I don't know if I'm doing something wrong?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 18, 2024 Mar 18, 2024

Copy link to clipboard

Copied

you have the prizes folder/file names?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 18, 2024 Mar 18, 2024

Copy link to clipboard

Copied

Prizes/3-Wheeler.png

Prizes/Acapulco.png

Prizes/Air Conditioner.png

Prizes/San Diego.png

 

Just to name a few.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 19, 2024 Mar 19, 2024

Copy link to clipboard

Copied

that's not what the code is expecting.

 

it looks like the bitmaps should be in Prizes, but the name listing is supposed to be

 

3-Wheeler.png&Acapulco.png&Air Conditioner.png&San Diego.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

There it is! That's the code I'm trying to do.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

LATEST

that's late, but good to hear.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines