Re: [Flashcoders] Testing display object if its MovieClip or BitMap?

2010-12-02 Thread Karim Beyrouti
Hopefully the line breaks here wont be too bad, pasting the code:

CODE

package {

import flash.utils.describeType;
import flash.utils.getQualifiedClassName;

/**
 * @author karim @ kurst.co.uk
 */
public class ClassUtils {

public static  function getSuperClass( obj : Object ):String {

var superClass  : String= 
describeType(obj)@base;
var isBase  : Boolean   =  ( superClass 
== '' )

if ( isBase )
return getClassName( obj );
else 
return replaceChar(superClass, '::', '.')


return '';
}

public static function getFullClassPath( obj : * ) : String {

var className : String = getQualifiedClassName( obj );

if ( className != null ){

if ( className.indexOf( '::' ) == -1 ){

return className;

} else {
return replaceChar(className, '::', '.')


}
} else {
return '';

}

}


public static function getClassName( obj : * ) : String {

var className : String = getQualifiedClassName( obj );

if ( className != null ){

if ( className.indexOf( '::' ) == -1 ){

return className;

} else {

return className.substr( 
className.indexOf( '::' ) + 2 , className.length )

}
} else {
return '';

}

}



public static function replaceChar( str : String, charToRemove 
: String , charToReplace : String) : String {

var temparray:Array = str.split(charToRemove);
return temparray.join(charToReplace);   

}


}
}



/CODE
On 2 Dec 2010, at 03:21, Micky Hulse wrote:

 Hi Karim! Many thanks for the reply and code sample! I really
 appreciate the help. :)
 
 On Wed, Dec 1, 2010 at 5:19 PM, Karim Beyrouti ka...@kurst.co.uk wrote:
 attached a class that does that, hope it helps...
 
 Doh! Looks like the Flash Coders List does not allow attachments! :(
 
 Do you have a server you could upload the AS file to? Maybe you could
 post it on GitHub, or create a Gist? I would love see your class. :)
 
 https://gist.github.com/
 
 Thanks Karim!
 
 Cheers,
 Micky
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Deep diving into playerglobals.swc

2010-12-02 Thread Henrik Andersson
I am sure that most people here know what playerglobals.swc is, but I 
might as well explain it anyway.


The playerglobals.swc file is used by the compiler to know how the flash 
player api looks like. It lists all the classes, packages and so on.


What may not be immediately obvious is that it includes everything, not 
just the documented features. But it also exposes some code that is real 
normal actionscript code.


By unpacking the swc (just a renamed zip) and decompiling the contained 
swf you can see all of this.


Some of the highlights are the ExternalInterface class and the URLLoader 
class. They are nearly completely made out of normal actionscript code.


But there is also several plain undocumented features. Let me list what 
I know of:


* adobe.utils.ProductManager - AIR application manager thing, also 
related to the flash player self updating.
* flash.trace.Trace - No idea what this is, but the source code to the 
class is in the tamarin repository.
* Object._propertyIsEnumrable, Object._setPropertyIsEnumrable - 
Prototype inheritance stuff.
* flash.automation.* - My guess is that this is related to the 
colaboration with google regarding automated spidering of swf files.
* flash.display.AVM1Movie - It has some unusable features to actually 
talk to the movie.
* flash.display.MovieClip - I hope that you all know of the 
addFrameScript method by now.
* flash.system.Security - The disableAVM1Loading and sandboxType 
properties. Rather self explanatory properties.
* flash.system.System - The nativeConstructionOnly method. No idea what 
this one is for. But it seems to want something constructible.

* flash.system.Capatibilites - The _internal property.
* flash.ui.MouseCursorData - A new one for 10.2 I believe. It allows you 
to provide your own real os level mouse cursor. Also see the new 
Mouse.registerCursor method. It is rather self explanatory how to use it.

* flash.utils.SetIntervalTimer - Not sure what the point is for this one.

I wonder if there is anything else that I may have missed. In any case, 
it would be fun to have some clarity in the less understood parts.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] (From a PDF?) Getting bitmap data successfully

2010-12-02 Thread lists-09
I need to pull in a PDF and be able to show thumbnails of the larger graphics 
to the user.
They check off a couple and those are then saved as PNG or JPG files.

I am ok on saving graphics as PNG/JPG (given a bitmap) and doing the UI piece, 
but can’t seem to find anything on how to manipulate the PDF to pull the 
bitmaps.

Is there anything available short of Acrobat-SDK, and that is AS3-based?


There are a few utilities to do this*, but nothing code-based to glean from. 

*Existing tools:
  a-pdf.com
  verypdf.com
  sobolsoft.com
  somepdf.com
  dawningsoft.com

I have contacted them; but they only offer command-line, no-source, 
alternatives.

Thanks

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] (From a PDF?) Getting bitmap data successfully

2010-12-02 Thread Glen Pike
We used xpdf to generate jpgs / text of all our pdf files - that's 
opensource.


Unfortunately this is command line too, so might not be any good to you, 
but it might be easier to generate thumbs for your PDF statically if 
you are re-using the same PDF's each time?


http://www.foolabs.com/xpdf/about.html

HTH

Glen

On 02/12/2010 16:59, lists...@fo.com wrote:

I need to pull in a PDF and be able to show thumbnails of the larger graphics 
to the user.
They check off a couple and those are then saved as PNG or JPG files.

I am ok on saving graphics as PNG/JPG (given a bitmap) and doing the UI piece, 
but can’t seem to find anything on how to manipulate the PDF to pull the 
bitmaps.

Is there anything available short of Acrobat-SDK, and that is AS3-based?


There are a few utilities to do this*, but nothing code-based to glean from.

*Existing tools:
   a-pdf.com
   verypdf.com
   sobolsoft.com
   somepdf.com
   dawningsoft.com

I have contacted them; but they only offer command-line, no-source, 
alternatives.

Thanks

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] (From a PDF?) Getting bitmap data successfully

2010-12-02 Thread Gregory Boland
best way to do it is to convert the PDF to a SWF and then work with it as a
SWF.

Something like this will do it

http://www.swftools.org/

You can load the swf and each page of the pdf will be a frame of the swf



On Thu, Dec 2, 2010 at 11:59 AM, lists...@fo.com wrote:

 I need to pull in a PDF and be able to show thumbnails of the larger
 graphics to the user.
 They check off a couple and those are then saved as PNG or JPG files.

 I am ok on saving graphics as PNG/JPG (given a bitmap) and doing the UI
 piece, but can’t seem to find anything on how to manipulate the PDF to pull
 the bitmaps.

 Is there anything available short of Acrobat-SDK, and that is AS3-based?


 There are a few utilities to do this*, but nothing code-based to glean
 from.

 *Existing tools:
  a-pdf.com
  verypdf.com
  sobolsoft.com
  somepdf.com
  dawningsoft.com

 I have contacted them; but they only offer command-line, no-source,
 alternatives.

 Thanks

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Deep diving into playerglobals.swc

2010-12-02 Thread John McCormack

Henrik,

flash.automation.*

This sounds interesting.

I wonder if the spiders might eventually pick up on frame labels.
I guess it's too much to hope for given that we also like to encrypt SWFs.

John

On 02/12/2010 11:30, Henrik Andersson wrote:
I am sure that most people here know what playerglobals.swc is, but I 
might as well explain it anyway.


The playerglobals.swc file is used by the compiler to know how the 
flash player api looks like. It lists all the classes, packages and so 
on.


What may not be immediately obvious is that it includes everything, 
not just the documented features. But it also exposes some code that 
is real normal actionscript code.


By unpacking the swc (just a renamed zip) and decompiling the 
contained swf you can see all of this.


Some of the highlights are the ExternalInterface class and the 
URLLoader class. They are nearly completely made out of normal 
actionscript code.


But there is also several plain undocumented features. Let me list 
what I know of:


* adobe.utils.ProductManager - AIR application manager thing, also 
related to the flash player self updating.
* flash.trace.Trace - No idea what this is, but the source code to the 
class is in the tamarin repository.
* Object._propertyIsEnumrable, Object._setPropertyIsEnumrable - 
Prototype inheritance stuff.
* flash.automation.* - My guess is that this is related to the 
colaboration with google regarding automated spidering of swf files.
* flash.display.AVM1Movie - It has some unusable features to actually 
talk to the movie.
* flash.display.MovieClip - I hope that you all know of the 
addFrameScript method by now.
* flash.system.Security - The disableAVM1Loading and sandboxType 
properties. Rather self explanatory properties.
* flash.system.System - The nativeConstructionOnly method. No idea 
what this one is for. But it seems to want something constructible.

* flash.system.Capatibilites - The _internal property.
* flash.ui.MouseCursorData - A new one for 10.2 I believe. It allows 
you to provide your own real os level mouse cursor. Also see the new 
Mouse.registerCursor method. It is rather self explanatory how to use it.

* flash.utils.SetIntervalTimer - Not sure what the point is for this one.

I wonder if there is anything else that I may have missed. In any 
case, it would be fun to have some clarity in the less understood parts.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] (From a PDF?) Getting bitmap data successfully

2010-12-02 Thread wdb
You should be able to use ImageMagick to get the image.
See:
http://bytes.com/topic/php/answers/867585-convert-pdf-image-imagemagick-ghostscript
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders