Problem in the incorporation of a file png for the skin to a button

I'm trying to incorporate a PNG in the form of a skin of a button using actionscript for a custom component class. It has an error: "unable to resolve 'btn.png' for transcoding" - see the code in method 1 below. However, it works very well in method 2. Code are all shown belown. Someone can help about why this happens and how to make method 1 work?

Received the error in the method 1:

package net.abc.free
{

Import mx.core.BitmapAsset;

public class myComp extends Canvas {}

[Embed(source="assets/btn.png")]
[Bindable]
public var clasBtn: Class;

public void myComp() {}
Super();
}
}
}

Success in the method 2:

<? XML version = "1.0" encoding = "utf-8"? >
" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"creationComplete =" init () "> "
< mx:Script >
<! [CDATA]
Import mx.core.BitmapAsset;

[Embed(source="assets/btn.png")]
[Bindable]
public var clasBtn: Class;
[]] >

< / mx:Script >
< mx:Panel id = "main" width = "400" height = "300" backgroundAlpha = "0" >
< mx:HBox width = "100%" height = "100%" horizontalAlign = "center" horizontalGap = "100" >
< mx:Button id = upSkin 'myBtn' = "{clasBtn}" / >
< / mx:HBox >
< / mx:Panel >
< / mx:Application >

Add a "/" in front of the path from the folder root 'src '.

[Embed(source="/assets/btn.png")]

Tags: Flex

Similar Questions

  • Problem with the Code/Design view buttons

    (My bad... maybe a clearer title will help you...)

    OK, I work with DW CS4 v.10.0 Build 4117 on a platform of Win XP Pro SP3.

    When you work with files from my site, they open in Code view.  The Split and design buttons are grayed out.  When I click the page layout button, the check mark is sometimes next to the option Code, but sometimes next to Design (even if the page is clearly displayed only in Code view!).

    To view the file in Design view or split view, click the page setup button, click on the Code, click on the button layout again, click Design or split view and then it will display the page in this way file.

    It's SO frustrating!  Is this a bug in CS4?  (I scanned through the other topics and can't seem to find anything about it.)  I don't remember having this problem with CS3 and have spoken with other DW CS3 users who also say that they have never had this happen.

    What can I do?

    Thanks in advance for any help you can provide.

    Susan

    Hi Susan,.

    I might have a solution for this one. I had the same problem. It would be 'reliable' whenever I would create a new PHP file.

    "File" > "New" > "PHP" > Layout 'None' > 'Create' - no buttons 'Split' or 'Design' (grey)

    In 'preferences' under 'File Types/errors', there is a section "open in code view".

    I removed the. The extension PHP from here, tried again and it worked!

    Maybe it will work for you.

    Good luck

    Tony

  • Problem with the skin still video

    I'm still having a problem return to the display of a video skin.

    I know that the skin and the player are:

    < http://www.mikelrouse.com/Sarah mov/Sarah.swf >

    The Flash swf file is 544 x 266

    The same size swf Flash file is located on this page:

    < http://www.mikelrouse.com/sarah.html >

    Not the skin. It drives me crazy. Any step by step help?

    haha - thanks.

    The skin will be fine. They are generic and makes working with video, they are too attached. You can also change the path of the skin for:
    "Unividmov/SteelExternalAll.swf' in your swf file.

  • Problems with the skin appear and publish options on FrameMaker 12

    Hello

    Customize the output using web FrameMaker is problematic.

    1. This is the first number - FrameMaker online help says the following:

    «You can also import WebHelp or compressed WebHelp skins defined in the files .skn or .zkn, respectively.» "To import a skin, click on import and select the .skn or .zkn file in the file system."   (see Adobe FrameMaker 12 * customization of specific output settings)

    However, when you import a skin (publication settings > custom > outings > navigation > selection of the skin > import), the import option allows only a type.skn file and not the tablet *.zkn.

    2. second question - the custom skin is not correctly unhooked in the Webhelp output.

    To be more precise, the required graphic elements were not copied on skin custom. The only way round, it comes to manually copy on the graph of the skin of the files in the output folder, and then refresh the help output. Graphics appear, but unfortunately still the skin does not display 100% correctly.

    3. third question. To create the custom skin, I had to create a new RoboHelp project, and then create a new skin among the galleries of available skin. Preview and generate the RoboHelp project displays correctly the skin. Unfortunately, when using FrameMaker, the skin does not display correctly.

    4th issue - inaccurate information in help online about the ISF import options.

    Online help FM says the following:

    Important: When you import a file from the ISF, RoboHelp parameters included in the file replace the corresponding settings of FrameMaker m files.

    To import a file of the ISF:

    1. In the dialog box publish, click the settings button and choose import file ISF.
    2. In the select an ISF file dialog box, select the settings file.

    Where is this option? There is no option to import ISF on my version of FrameMaker? !!!

    Thank you

    Thank you Jeff,.

    How can I download and install patches 12 FrameMaker?

    Warren

  • problem with the command stop and buttons

    Hello world.

    Here's my scenario

    I have a project where I have 5 buttons (all on separate layers) I want to put a link to the image 2, image 3, image 4, part 5 and part 6.

    Thus, for example, I want my topic is to link to the Framework 2 and last new button, to link to the image 3

    The separate pages are housed on the layer 'layer of page '.

    Please see the image below to see what I mean

    screenshot.jpg

    I'm using the code snippets in cs5 to do this, so I am using the command "click go to frame and play" and change the number of the framework accordingly.

    My problem is when I use the command to stop on the first frame. If I do not use the command the swf allows to select the 6 images constantly, but when I use the command stop buttons do not work because the application has stopped.

    Anyone could shed some light on this problem?

    It may be a case for the use of your gotoAndPlay() where you need gotoAndStop().  If you are on the frame you say to go to play, he can't go anywhere to get there, and stop it is already sold out, so it will play thru to the next stop.

  • Problem with the report as a button link

    Apex 3.2

    I had a relationship with a column of link to another page.

    The user wanted a button instead of one of the standard icons, so I change the link text to

    < button type = "button" > Clean < / button >

    If I use firefox, then this link works very well, but in IE, nothing happens when I click on the button.

    Gus

    Hello

    Perhaps this example help

    https://Apex.Oracle.com/pls/Apex/f?p=39006:35

    I created request report

    SELECT empno,
      ename,
      job,
      APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:37:&APP_SESSION.::&DEBUG.::P37_EMPNO:' || empno,NULL,3) AS linkurl
    FROM emp
    

    Then I change the LINKURL Link Text column

    
    

    Link attributes

    class="hideMe508"
    

    Target URL and URL # (sharp right)

    Kind regards

    Jari

  • Problem with the skin Editor

    I'm not able to see the options available in the skin Editor. All are disabled. Using Captivate 6. Help, please.

    Subtitles are always above the playback bar

    If you want to CC more close the PlayBar, check its settings: default = 3 lines. It's the bottom which is closest to the playback bar line.

  • Why do I get an Error Message When you use "Embed" to access a file png (for an asset class)?

    I use Flash Builder and Starling to create a new project. I created the initial classes for Starling running. Everything works fine.

    However, I created a class of assets (that will manage all the assets of the project) and I get an error message when you reference the png file. This png will serve as the main screen for the project. See below:

    {

    Import starling.textures.Texture;

    public class active

    {

    [Embed (source = ' assets/screenMain_background.png']

    private static var MainScreen: Class;

    public static var MainScreenTexture:Texture;

    Public Shared function init (): void

    {

    MainScreenTexture = Texture.fromBitmap (new MainSreen());

    }

    }

    }

    I have the file in a folder called 'active' which is in the main project folder. Why I get this error?

    In the "Issues" tab it reads as follows:

    "Couldn't find Embed source" assets/screenMain_background.png"

    Capture1.PNG

    you have a path problem.

    Start by adding the current directory in your src directory.  If this fails, experiement.

  • Problem with the play, pause, stop buttons etc on Satellite M30 842

    I have tried pretty much everything I can to get these buttons to work, but it seems that their just their for pleasure. any suggestions?

    I also wonder if anyone knows if it is possible to download the drivers for the sd card reader able to read cards mmc...?

    Hello

    I put t believe that the buttons were eating here just for fun. If the laptop is not preinstalled with recovery CD all tools must be installed correctly. I don't know, but TOSHIBA controls V3.01.0400 tool is responsible for this button.

    To read SD cards, you need to install a tool SD Card Driver Set V2.0.4 and TOSHIBA SD Memory Card Format V2.0.1.1. Try it.

  • problem with the READING of the PNG FILE

    I read a file png - one photo with transperent back polished - READ the PNG file and display them in my program using a function to draw the flattened Pixmap.

    I get a very dark black background color - in the image created.

    How can I solve this problem?

    Please give your suggestions

    Thanks in advance

    RENN

    RENN,

    Probably you monitor is too dark, and you should just increase the brightness a bit?

    Seriously, when you post this question - its always goot to include an example. In this case: picture a) and b) source code snippet - how do you use it?

    Look here--I don't have a big problems:

    The only small problem semitransparent is not taken in charge. You must set the threshold (which amounts to default 127).

    See attached example.

    Kind regards

    Andrey.

  • Hello! I have problems with the Illustrator. Each of them is turning incorporated when I close the file.

    Hello! I have problems with the Illustrator. I link images, close the file, but when I opened again all the links is not respected and turn to the software! Linked images are PSD files, apparently without any problem. Anyone?

    Thank you, but the problem was simple: the box to save the file was with the option 'include linked files' and I do not understand. I never click on this option, but I discovered that my friend had clicked on this (we have both worked with the same campaign files).

    And as for the pdf compatibility, I thought this could be the cause of the problem and I have enabled sometimes and try to save it again, but it wasn't the cause. And Yes, the file remains much better with less than half the original size ():

    Thank you!

  • How to do this: Photoviewer, Windows cannot save changes to the image due to a problem with the properties of the file!

    Hi, I'm trying to post a photo, but whenever I have try rotation to the right, it says something like: can't save changes to the image due to a problem with the properties of the file. My laptop is MS, but the photos were taken on the Iphone. How to do this?

    I don't know if the following links answer your question, but
    they may be worth a visit:

    Good luck and * proceed at your own risk *.

    FWIW... There is a very long discussion (several pages) to the
    following link:

    Cannot change the imported iPhone 4S photo
    https://discussions.Apple.com/thread/3444951?start=0&TSTART=0

    More Discussion

    iPhone 4S image properties is not compartible with Windows?
    Editing can be done on the computer due to the error
    "Windows Photo Viewer cannot save changes to this picture.
    because there is a problem with the properties of the image file".
    Any help?
    https://discussions.Apple.com/message/17291884#17291884

    More Discussion:

    We cannot turn a few photos in Windows 7 (but can turn others)
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/cant-rotate-some-photos-in-Windows-7-but-can/3a809845-9144-4BB1-9bb3-ab4f5b856524

    A simple solution is to open the photos in paint or most other
    digital image editor and modify it.

    Some people have reported success using the following free download
    to remove the metadata.

    Property restrictions stripper iphone 4S (JPEG & PNG Stripper)
    http://www.SteelBytes.com/?mid=30&cmd=download&PID=15

    Here's a way to turn...

    Easily turn locked iPhone 4 and 4 s Photos in Windows 7 with
    the rotator Lossless JPEG free
    http://www.daleisphere.com/easily-rotate-locked-iPhone-4-and-4S-photos-in-Windows-7-with-the-free-JPEG-lossless-Rotator/

    Free download JPEG Lossless rotating
    http://annystudio.com/software/jpeglosslessrotator/

  • photos of the iPhone are on the side and I can not turn because theres a problem with the property file

    Photos imported from my iphone came on the side and when I turn and try to save, it won't let me save it like that saying "windows Photo Viewer cannot save changes to this picture because there is a problem with the pictures of file properties". What should I do?

    I don't know if the following links answer your question, but
    they may be worth a visit:

    Good luck and * proceed at your own risk *.

    FWIW... There is a very long discussion (several pages) to the
    following link:

    Cannot change the imported iPhone 4S photo
    https://discussions.Apple.com/thread/3444951?start=0&TSTART=0

    More Discussion

    iPhone 4S image properties is not compartible with Windows?
    Editing can be done on the computer due to the error
    "Windows Photo Viewer cannot save changes to this picture.
    because there is a problem with the properties of the image file".
    Any help?
    https://discussions.Apple.com/message/17291884#17291884

    More Discussion:

    We cannot turn a few photos in Windows 7 (but can turn others)
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/cant-rotate-some-photos-in-Windows-7-but-can/3a809845-9144-4BB1-9bb3-ab4f5b856524

    A simple solution is to open the photos in paint or most other
    digital image editor and modify it.

    Some people have reported success using the following free download
    to remove the metadata.

    Property restrictions stripper iphone 4S (JPEG & PNG Stripper)
    http://www.SteelBytes.com/?mid=30&cmd=download&PID=15

    Here's a way to turn...

    Easily turn locked iPhone 4 and 4 s Photos in Windows 7 with
    the rotator Lossless JPEG free
    http://www.daleisphere.com/easily-rotate-locked-iPhone-4-and-4S-photos-in-Windows-7-with-the-free-JPEG-lossless-Rotator/

    Free download JPEG Lossless rotating
    http://annystudio.com/software/jpeglosslessrotator/

  • Error: "Canoe Photo window Viewer save the changes to this picture because there is a problem with the property of photo file" when trying to upload photos from the iPhone to the Windows Photo Viewer.

    Original title: saving photos and videos, common sense?

    JW why I can't save a picture to the top of the right way in my windows photo viewer and Media Player (same for video too) so when I download my pictures frim my iphone on the computer a few photos have been taken vertically, and when I go to put the image a gardener would come saying ' canoe photo window Viewer save the changes to this picture because there is a problem with the file of. properties of photos? What can I do to fix this?

    JW why I can't save a picture to the top of the right way in my windows photo viewer and Media Player (same for video too) so when I download my pictures frim my iphone on the computer a few photos have been taken vertically, and when I go to put the image a gardener would come saying ' canoe photo window Viewer save the changes to this picture because there is a problem with the file of. properties of photos? What can I do to fix this?

    =============================================
    I don't know if the following links answer your question, but
    they may be worth a visit:

    Good luck and * proceed at your own risk *.

    FWIW... There is a very long discussion (several pages) to the
    following link:

    Cannot change the imported iPhone 4S photo
    https://discussions.Apple.com/thread/3444951?start=0&TSTART=0

    More Discussion

    iPhone 4S image properties is not compartible with Windows?
    Editing can be done on the computer due to the error
    "Windows Photo Viewer cannot save changes to this picture.
    because there is a problem with the properties of the image file".
    Any help?
    https://discussions.Apple.com/message/17291884#17291884

    More Discussion:

    We cannot turn a few photos in Windows 7 (but can turn others)
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/cant-rotate-some-photos-in-Windows-7-but-can/3a809845-9144-4BB1-9bb3-ab4f5b856524

    A simple solution is to open the photos in paint or most other
    digital image editor and modify it.

    Some people have reported success using the following free download
    to remove the metadata.

    Property restrictions stripper iphone 4S (JPEG & PNG Stripper)
    http://www.SteelBytes.com/?mid=30&cmd=download&PID=15

    Here's a way to turn...

    Easily turn locked iPhone 4 and 4 s Photos in Windows 7 with
    the rotator Lossless JPEG free
    http://www.daleisphere.com/easily-rotate-locked-iPhone-4-and-4S-photos-in-Windows-7-with-the-free-JPEG-lossless-Rotator/

    Free download JPEG Lossless rotating
    http://annystudio.com/software/jpeglosslessrotator/

  • I'm having a problem with the FireFox browser. I have attached two files that describe the problem. I have marked their A &amp; B. A is the way it should lo

    I'm having a problem with the FireFox browser. I have attached two files that describe the problem. I have marked their A & B. A is how it should look like and B what happens once I have, I opened several tabs. I can get it back to normal if I click VIEW, click Customize. When the window customize appears that Firefox returns to its normal state. I have to click on the done button and go back to what I did. I tried to reset FireFox back to the default settings, but that has not fixed the problem.
    It started happening a month. Is there a way I can fix this? Thanks for your help. I don't know how to fix my 2 attachments that shows the problem I'm having.
    [email address removed to protect your privacy and security]

    Try disabling hardware acceleration in Firefox.

Maybe you are looking for

  • With the help of linux deepin and Thunderbird does not pick up time correct system.

    The system time is set correctly for my time zone, but it turns out that no matter what I put the time system; Thunderbird ignores and default time is GMT. I am fully updated both deepin and Thunderbird.

  • Is there any version of Safari for Windows?

    I'm looking for any version of Safari run on Windows. Although I'm not, not when it is mentioned if Safari is only for iOS or if it will work on windows. Any guidance on this? Thank you Rafael

  • HP 15-r017nl Notebook PC: System Fan (90 b) at startup error message

    Hello! When I try to turn on my computer, a black screen appears with this error: "The system has detected that a cooling fan does not work correctly.

  • Help is not open! A proxy issue

    Dear Sir I have a problem. When I put a block and I press "F1". do not open the online help. LabVIEW 1.1 Communication.  to use the system proxy? How do you define a specific proxy? concerning Leo

  • Ventrillo error

    Hello, I recently bought a new laptop, I play world of warcraft and it takes ventrilo to connect with other players. I have the latest ventrilo 3.0.5 and my sound and all other drivers are up-to-date (I checked today). I have a lock-up whenever I try