I know it is a pain, i did the same for the new Yahoo maps API.
It takes a while, but at least you can use it in Flash
And check out this http://www.afcomponents.com/components/g_map/
But i didnt see what AS version it utilizes.
Good luck,
Sid
On May 15, 2008, at 5:20 PM, eric e. dolecki wrote:
Its a monumental pain in the ass to load it and extract the classes
out... I
hope Google just releases the classes for non-Flex stuff... but
maybe they
have all kinds of hidden crap in there they don't want people to see?
On Thu, May 15, 2008 at 11:05 AM, Romuald Quantin <
[EMAIL PROTECTED]> wrote:
Or if you have the SWC downloadable you can just copy the file near
the FLA
file, flash will load it automatically.
Romu
www.soundstep.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Sidney de
Koning
Sent: 15 May 2008 15:51
To: Flash Coders List
Subject: Re: [Flashcoders] Question about Google Maps Flash APIs
YUP :)
An swc file is notthing more than a zip file. So when you rename it
to
zip you can extract it, probably there is a library.swf in there.
This is what you do is this you load it in in Flash like this:
import flash.display.Loader;
//
var ClassFileForHoldingGooglesAPIClass:Class;
// Create these for everyclass you want to extract.
//
function loadAssets():void
{
var assetLoader:Loader = new Loader();
assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
assetLoaderComplete);
assetLoader.load(new URLRequest("library.swf"));
}
When the library.swf is done loading it calls the assetLoaderComplete
handler that handles the
request and utilizes the getDefinition() method to get the class
definition by a string.
function assetLoaderComplete(evt:Event):void
{
// remove your listener
evt.target.removeEventListener(Event.COMPLETE, assetLoaderComplete);
var appDomain:ApplicationDomain = evt.target.applicationDomain;
ClassFileForHoldingGooglesAPIClass =
appDomain.getDefinition("com.google.maps.api.Whatever") as Class;
}
Now can create and instance of the MyOwnButton, simply by calling:
var myNewObject:Class = new ClassFileForHoldingGooglesAPIClass();
Or call functions on the ClassFileForHoldingGooglesAPIClass.
Hope this is what you mean.
Cheers,
Sidney
On May 15, 2008, at 3:41 PM, eric e. dolecki wrote:
They offer up a SWC, any way of using that in the Flash IDE without
using
FlexBuilder?
_______________________________________________
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 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 mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders