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

How to add a jpeg to CS6/AS3....unable to resolve XXX.jpeg for transcoding

New Here ,
Apr 15, 2013 Apr 15, 2013

Hi all,

Im having problems adding jpeg images to my code, i thought i could just drag them into the library, this worked because they are now in the library however i keep getting:

Scene 1, Layer 'Action', Frame 81, Line 14unable to resolve 'xxx.jpg' for transcoding
Scene 1, Layer 'Action', Frame 81, Line 14Unable to transcode xxx.jpg.

I tried looking online but i couldnt find a solution!

my code is:

[Embed (source="xxx.jpg")]

var xxxImage: Class;

thanks in advance!

TOPICS
ActionScript
836
Translate
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

correct answers 1 Correct answer

Community Expert , Apr 15, 2013 Apr 15, 2013

embed code directives should be used in class files.

for timeline coding, assign a class to your jpg (eg, JPG1), and use code similar to:

var jpg1:JPG1=new JPG1();

var bmp:Bitmap=new Bitmap(jpg1);

addChild(bmp);

Translate
Community Expert ,
Apr 15, 2013 Apr 15, 2013

embed code directives should be used in class files.

for timeline coding, assign a class to your jpg (eg, JPG1), and use code similar to:

var jpg1:JPG1=new JPG1();

var bmp:Bitmap=new Bitmap(jpg1);

addChild(bmp);

Translate
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
New Here ,
Apr 15, 2013 Apr 15, 2013

Thanks very much! the problem I have is that im comfortable with as2 but not so much as3 yet.

Translate
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 ,
Apr 15, 2013 Apr 15, 2013
LATEST

you're welcome.

Translate
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