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

Jpeg exporter source file download

Participant ,
Apr 08, 2013 Apr 08, 2013

Does anyone has the source file for exporting jpeg from a movie clip that is actually working?

the movie clip is just a still image with 2 or 3 layers in it, it's not even mobile.

source file that I can look at the sample that is working would be Great!

Thank you

TOPICS
ActionScript
4.9K
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 08, 2013 Apr 08, 2013

i saved the fla for cs3.

you can dl the source files at:  http://www.kglad.com/Files/forums/jpeg/jpegCreate.rar

Translate
Community Expert ,
Apr 08, 2013 Apr 08, 2013

download mario klingemann's bitmapexporter from the link here: http://www.quasimondo.com/archives/000572.php

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
Participant ,
Apr 08, 2013 Apr 08, 2013

hi, thank you for the quasimondo link,

I tried the demo but it give me onSave dialgue failed to open.

I actually tried the other demos from the site, all of them seem have that problem

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
Participant ,
Apr 08, 2013 Apr 08, 2013

ok, I found this

http://xoax.net/blog/saving-a-screen-capture-to-a-jpeg-image-file-in-actionscript/comment-page-1/#co...

can someone tell me what I suppose to do under Edit>Preference? I got lost there.

Does it work?

I gor error message: 1061: Call to a possibly undefined method save through a reference with static type flash.net:FileReference.

I tried to add > import flash.net.FileReference;  ; I thought I might need this for calling FileReference, it still the same thing

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 08, 2013 Apr 08, 2013

that's actionscript 3.0.

are you using as2 or as3?

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
Participant ,
Apr 08, 2013 Apr 08, 2013

3.0, but then I'm with CS3..

does it work with you?

what i get lost on is this line "..

you will need the JPGEncoder file which you can get here: https://github.com/mikechambers/as3corelib. To use the source file, select Edit->Preferences->Actionscript->Actionscript 3.0 Settings . . . and add the folder where you put “mikechambers-as3corelib-release.93-8-g24c6c16\mikechambers-as3corelib-24c6c16\src” to the src paths. Then you should be able to compile and execute the Actionscript code.."

i don't understand how to add the src path

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 08, 2013 Apr 08, 2013
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
Participant ,
Apr 08, 2013 Apr 08, 2013

can you post your source file please??? I do really need to know this   also what version of flash you on?

Thankyou

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 08, 2013 Apr 08, 2013

i saved the fla for cs3.

you can dl the source files at:  http://www.kglad.com/Files/forums/jpeg/jpegCreate.rar

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
Participant ,
Apr 09, 2013 Apr 09, 2013

i think my life just got saved by this, so thanks a lot , going to try it out now

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 09, 2013 Apr 09, 2013

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
Participant ,
Apr 10, 2013 Apr 10, 2013

hi, kglad

so I made this out from your code, it gave me undefined jpegDat. Does jpgDatGenerate(mc) actually pass 'mc' clip to the function I wonder? any idea

jpgDatGenerate(mc);

function jpgDatGenerate (target) {

var bmpd:BitmapData=new BitmapData(target.width,target.height);

bmpd.draw(target);

var jpegEnc:JPEGEncoder =  new JPEGEncoder(75);

var jpegDat:ByteArray = jpegEnc.encode(bmpd);

}

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 10, 2013 Apr 10, 2013

yes, if mc exists.

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
Participant ,
Apr 10, 2013 Apr 10, 2013

hi kglad

it debuged jpegDat undefined, may be its because jpegDat is defined inside function? in your original script, jpegDat defined in the main body and that works fine

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 10, 2013 Apr 10, 2013

where's your trace()?

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
Participant ,
Apr 10, 2013 Apr 10, 2013

hi kglad

my function jpgDatGenerate seem to door closed on the others, I tried create a few new var in it, they all not recognized in localSave();

may be there something I could do to make those var created in my function become globalized somehow?

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
Participant ,
Apr 10, 2013 Apr 10, 2013

trace().. hmm going to research that now

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 10, 2013 Apr 10, 2013

if you're seeing an error message copy and paste if after click file>publish settings and ticking "permit debugging".

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
Participant ,
Apr 10, 2013 Apr 10, 2013

I added var jpegDat:ByteArray; outside the function, it debug , but it doesnt create the jpeg..

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
Participant ,
Apr 10, 2013 Apr 10, 2013

I did what you said, it will generate the swf even when it debugged errors.

uploaded to server, cannot generate the jpeg

jpgDatGenerate(mc);

function jpgDatGenerate (target) {

var bmpd:BitmapData=new BitmapData(target.width,target.height);

bmpd.draw(target);

var jpegEnc:JPEGEncoder =  new JPEGEncoder(75);

var jpegDat:ByteArray = jpegEnc.encode(bmpd);

}

something must be not right in this function

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
Participant ,
Apr 10, 2013 Apr 10, 2013

this is the error:

1120: Access of undefined property jpegDat.

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
Participant ,
Apr 10, 2013 Apr 10, 2013

may be i should pack the function into .as and make it a public?...

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 10, 2013 Apr 10, 2013

copy and paste the output from the following AFTER: clicking file>publish settings and ticking "permit debugging".

jpgDatGenerate(mc);

function jpgDatGenerate (target) {

var bmpd:BitmapData=new BitmapData(target.width,target.height);

bmpd.draw(target);

var jpegEnc:JPEGEncoder =  new JPEGEncoder(75);

trace(jpegEnc);

var jpegDat:ByteArray = jpegEnc.encode(bmpd);

trace(jpegDat)

}

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
Participant ,
Apr 10, 2013 Apr 10, 2013

hi Kglad,

I put the trace codes in there,  checked "permit debugging" under file>publish settings,

then go control>test movie.

the 'control' broad shows nothing, just blank..  (btw you missed ';' next to trace(jpegDat), i added that one, made no difference)

error report shows "1120: Access of undefined property jpegDat.".

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
Participant ,
Apr 10, 2013 Apr 10, 2013

on additional note, I added trace("hello world");  outside the function just on the second line,

crtl-enter, still blank in the output!   I did allow the 'permit debugging'!

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