|
INTERVIEW QUESTIONS
WEB
ACTION SCRIPT
DETAILS
Question: I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr?
Answer: File is already there , we need to register our ip address to flicker’s crossdomain.xml Since the images are located on a flickr server like farm1.static.flickr.com and there is no crossdomain.xml file on that server (there is a crossdomain.xml for api.flickr.com so you can use the api) that means you can’t get access to the bitmapData of the loaded images when you load them from flickr. This is dumb, but that’s the way it is. So you can load images just fine, but the reflection class copies the bitmapData of the image, so that doesn’t work if you load them straight from the flickr server. I also wanted to set bitmap smoothing to true on the images so the thumbnails don’t look as pixelated, and that also requires access to the bitmapData of the loaded image.
So the answer is to create a proxy that loads the flickr image so it appears to come from the same domain
|
|
|
Category |
Action Script Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7559 users |
Added on |
9/22/2014 |
Views |
71358 |
Rate it! |
|
|
Question:
I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr?
Answer:
File is already there , we need to register our ip address to flicker’s crossdomain.xml Since the images are located on a flickr server like farm1.static.flickr.com and there is no crossdomain.xml file on that server (there is a crossdomain.xml for api.flickr.com so you can use the api) that means you can’t get access to the bitmapData of the loaded images when you load them from flickr. This is dumb, but that’s the way it is. So you can load images just fine, but the reflection class copies the bitmapData of the image, so that doesn’t work if you load them straight from the flickr server. I also wanted to set bitmap smoothing to true on the images so the thumbnails don’t look as pixelated, and that also requires access to the bitmapData of the loaded image.
So the answer is to create a proxy that loads the flickr image so it appears to come from the same domain Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Is it possible to make httpService Requests synchronous in adobe flex?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Action Script Interview Questions & Answers - Exam Mode /
Learning Mode
|