Embedding an image works only for a few times, then I need to resize.
Hi all
I am trying to use an image and I am having the following problem:
- the image is a png, 2000x2464 pixels
- I embed the image
- Everything works OK during the first few tries
- After some debugging session, without changing anything in the image embedding, the image isn't loaded anymore, or better, it seems loaded ( in the variables I see the istance of my class and it is not null) but the bitmapdata of the image is null, width and height are 0.
- Now, I resize the image to something smaller and i start again. Everything works fine again and the cycle begins again !
Here's the code:
In the declarations of the class containing the image:
[Embed(source = "images/italyMapZOUT.png")]
[Bindable]
var mapClass:Class;
var map:Bitmap;
In the initialization method that i call after construction:
map = new mapClass();
var bdata:BitmapData = map.bitmapData;
var myRatio:Number = someNumber / map.width;
It seems to me that I am embedding the image as described in zillions of sites and it is actually working... for some times ! Then , after say 5 or 6 debugging sessions, I get an error evaluating "someNumber" because width is zero, and checking the local variable I see that bitmapData is null.
Resizing to a smaller image , saving said image and restarting solves the issue temporarily.
Any idea what's happening ?
Thank you very much !
Wentu
The backlight still seems to be working (so goes from lit to darkened), but it sounds like the LCD is not working.
If you did a Restore and the problem is not resolved, it is likely to be a hardware-related problem, unfortunately.
Similar Messages
-
My magic mouse behaves erratically with intermittent problems - slows down, right click doesn't work, disconnects for a few seconds then reconnects. Anyone suggest what I could do to fix this?
I just figured out the print quality issue for my wife with her new iMac and new printer.
She replaced both at once and she couldn't understand why her Artisan 730 was lower quality then her Epson R280 when they had the same specs.
Turns out the newer printer had the option to connect via wifi which we used during setup.
The driver options are completely different depending on how you connect.
Once I connected via USB the correct options were available and the print quality was better.
Looking at the R2400 it dies not have wifi, but while researching the problem for my wife someone esle was having an issue updating to the latest printer driver.
If you go into the print utility from the Printer and Scanner system preference and under the general tab you should have driver 5.5.
One user had to delete the old printer driver before Software Update loaded the newer printer driver.
https://discussions.apple.com/message/15947486#15947486
On my MacBook Pro (w Snow Leopard) I always had to reconnect my wifi at home when it woke up. I upgraded my router from an old Netgear to a newer N D-Link and stopped having to do that.
I would be surprised you would have that problem with an Airport Extreme, you might check to see if there is a firmware update for it. -
Why is my iPhone 5c's home button not working at all it didn't work once for a few minutes then it was normal again now it won't work at all. HELP
The screen repair was botched. Take iPhone back to place of screen repair, and have them get the home button working again.
-
I did put it in rice the first and second night. I also have plugged it into iTunes and restored it. Now it won't sync.
Plugging it in and trying to turn it on before it was completely dried probably fried it.
Take it to an Apple Store, but warranty won't cover it, so be prepared to buy a new phone. -
Help! We set up family share a few weeks ago, and it was working fine with the organizer and two additional members. The three of us could see each other on app and iTunes stores and could view each other's purchased items. Then ... All of that disappeared. We cant see each other's profiles any more and we definitely can't view any purchased items. In addition, when we try to go in and jump start by downloading a free app or logging out and back of itunes, nothing works. It seems to show we have family sharing in the iCloud settings, and when we click the Apple ID it asks us to confirm, and we confirm, and are asked if we want to change accounts because then we trigger the 90 day freeze period. And we aren't changing any accounts - just trying to confirm the same accounts to get family share to work! We are all on the same ios 8.1.3 and os, so I don't know what else to try!
No, I am a media professional who uses his MacBook Pro to connect to external monitors, and needs to continue to do so. I don't want Apple TV. I want my laptop to work again, like it's supposed to. Like it used to.
I have a demonstration this week at work that requires me to plug into an LCD screen and I am hoping to have this resolved by then. I am trying to convince my department to buy a Retina Mac and thousands of dollars worth of video software for live shows, and if I can't make it work, then I can't exactly convince them (or myself) to buy what I have been researching.
Again, I don't want wireless video or Apple TV. I don't want to buy any more stuff. I want to know why my Thunderbolt to HDMI cable stopped working after my update, and how to fix it...preferably before this meeting. -
My iphone 4s cannot join a public unsecured network, but my ipad and macbook can with no problems. I have reset the network settings on the iphone twice. Both times that fixed the problem but only for a few minutes, then I get the "cannot join network" message again. Please help! What can I do?
Anyone have any ideas or information to help with this? Any help and consideration is MUCH appreciated.
-
i bought an ipod in 2006 and used it only for a few days, and i lost it when it fell two times from my hand and it wasn`t working, help me regarding this.
REGARDS
RISHABH AULIYAApple - Support - iPod - Repair pricing - http://www.apple.com/support/ipod/service/prices/
ipod repair options - https://discussions.apple.com/thread/3900047 and https://discussions.apple.com/message/18867033
Service Answer Center - iPod - http://support.apple.com/kb/index?page=servicefaq&geo=US&product=ipod <-- enter correct country once on page. -
I got definition of a word by tapping twice on a word. But it only works for a few times. Ater i tap a word for speak, the feature for definition does not appear anymore?
I got definition of a word by tapping twice on a word. But it only works for a few times. Ater i tap a word for speak, the feature for definition does not appear anymore?
-
A couple of days ago, I connected to the Internet as usual & opened Firefox, only to be greeted by an almost blank screen with a Google-type search box in the middle & this message from McAfee:
"Your default search settings have changed. This may pose a security risk. Would you like to restore them to McAfee Secure Search to provide a safer searching experience?"
instead of my usual home page (BT Yahoo). I naturally clicked on the "Yes" option in the message, but rather than restoring my BT Yahoo home page, all that did was to insert the McAfee logo to the left of the search box in the top right-hand corner of the screen. The first time it happened, I had to search for the BT Yahoo page & then followed the standard procedure for setting it again as my home page. It worked only for that session: each time I shut down Firefox or restarted my computer after that, all I got was the blank "search page" & restoring the previous session was the only way to get back to BY Yahoo. How on earth do I make the home page setting permanent?
As far as I'm aware, I have done nothing to alter my search settings. However, I am anything but computer-literate, so I may have done/pressed something without realising it, but trying to understand what is now happening is far beyond my limited IT skills.See McAfee support to find out how to disable that McAfee feature - that isn't part of the normal Firefox installation.
-
My mum has an iPad 1, the email programme will not open properly. If you click on the icon it opens only for a few seconds but then shuts. In that few seconds you cant select anything that you see on screen. Any ideas? Thanks
If the Reset Ian mentioned doesn't work...
Shut down and restart the Mail app...
- From any Home Screen, double tap the home button to bring up the Recents List
- Tap and hold any icon in this list until they wiggle
- Press the red to delete the Mail app from this list.
- Press the home button twice when done.
- Restart the Mail app -
i downloaded an album but one of the songs only plays for a few seconds then skips to the next song. how do i fix this?
Depending upon what country that you are in (music can't be re-downloaded in all countries) then try deleting that track from your iTunes library and redownload it via the Purchased link under Quicklinks on the right-hand side of the iTunes store home page on your computer's iTunes
If you aren't in a country where you can re-download music or if it re-downloads with the same problem then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption -
problem with photoshop CS6 I have an imac intel 10.6.8...when I try to launch photoshop the icon bounces a few times then the adobe app manager tries to open then they both quit. they keep doing this over and over again but won't launch. worked fine for a few days after install.
problem with photoshop CS6 I have an imac intel 10.6.8...when I try to launch photoshop the icon bounces a few times then the adobe app manager tries to open then they both quit. they keep doing this over and over again but won't launch. worked fine for a few days after install.
-
I loaded mozilla 6 on my hp laptop and it was working fine for a few weeks, but now it will not launch at all wheather I clip on the icon or type in the site. there is no message or warning, it just does not start up. I am a long time firefox user.
Hi Gamon,
Do you see any error message on your screen when you open up Acrobat? What happens when you open Acrobat?
Regards,
Rahul -
my 80gb IPod doesn't boot up this morning. Worked great last nite. The apple logo keeps coming up for a few seconds then you hear it "wind down" and got blank. Tried reseting multiple time - doesn't work. Ideas?
my 80gb IPod doesn't boot up this morning. Worked great last nite. The apple logo keeps coming up for a few seconds then you hear it "wind down" and got blank. Tried reseting multiple time - doesn't work. Ideas?
-
My Ipod touch is in recovery mode but when I go into Itunes to restore it, it will only stay connected for a few seconds then ejects itself from itunes. How do I keep my Ipod connected long enough to go through the restore process?
Error 1611
This error typically occur when security software interferes with the restore and update process. FollowTroubleshooting security software issues to resolve this issue. In rare cases, this error may be a hardware issue. If the errors persist on another computer, the device may need service.
Maybe you are looking for
-
Language Selection to print scripts
Hi Friends, I have a custom dialog program . On the screen I have following parameters . Print Immediately : No of Copies : I want to add a language option to it . The default should be the logon language . Which table contains the logon language and
-
[ODBC Microsoft Access Driver] Syntax error (missing operator)
Aello' - as you can see in my database table their are two records to delete based on the HISTORY_ID of 1. This was working just fine when I was using a MS SQL Server database but when I switched to the MS Access database I get this error now. Is the
-
Design issue with threads ...
Hello, I need your thoughts in how to proper use java threads in solving this issue: * I have an application that query a database for a list of users, and for each row retrieved from the database as a result the application should process that user
-
Linking expressions to central Controller
I'm trying to link up my expressions to one central Controller layer so that that one expression is shared across all objects in my project which require it. I have "// Controller" composition with "Expression_Source (tK-logo_anim)" text layer. Its s
-
My sisters iPod classic will not hold anything. It tells her to reset it all the time and when she does it tells her to again. No matter what it will not keep music on her iPod. Any suggestions? Thanks! My sister has iTunes 10 running windows 7.