PDA

View Full Version : Problem with embedding Panoramas in flash


Kallikanzaros
04-13-2007, 01:03 AM
Hi!
Thanks for a great application.
however, i can't get the embed script to work in flash.

This is the code:
var panorama:MovieClip;
var loader:Loader = new Loader();
loader.load(new URLRequest("rpano.swf"));
addChild(loader);

loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loadComplete);

function loadComplete (e:Event) {
swapChildren(loader, border);
panorama = loader.content;
panorama.setArea(100,50,400,300);
panorama.loadPanorama("rpano.swf?xml_file=rpano.xml");
}


and this is the error message:
"**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: The class or interface 'Loader' could not be loaded.
var loader:Loader = new Loader();

**Error** Scene=Scene 1, layer=actions, frame=1:Line 8: The class or interface 'Event' could not be loaded.
function loadComplete (e:Event) {

Total ActionScript Errors: 2 Reported Errors: 2"


anyone who knows what i am doing wrong? i am using the Flash 9 Public Alpha.

best wishes
k

Kallikanzaros
04-13-2007, 01:40 AM
I just noticed that the document was set to actionscript 2.0 :)
but when i hav echanged it to 3.0, the debug menu disappears, and and i get an error message when choosing "test movie" that says "Error initializing Java Runtime Environment" and then it crashes.

anybody had this problem?

Kallikanzaros
04-13-2007, 02:57 PM
To continuo my monologue:
this seem to be the problem:
(from adobe support site):
"Flash Professional 9 ActionScript 3.0 Preview does not work on Intel-based Macintosh machines, including running in Rosetta emulation. This is due to known issues with the Java-based compiler."

guess i will have to lend an old powerbook or pc :(

Denis
04-14-2007, 07:00 PM
You can use Adobe Flex (or Haxe language).

Or pre-order Flash CS3. :)

Kallikanzaros
04-14-2007, 07:12 PM
thanks, i'll look it up!
I have asked to lend my fathers old powerbook, so either way i am set.

jaaaab
04-16-2007, 10:57 PM
hi Kallikanzaros!

how do you set a document for AS2 or AS3?

i mean in which window of flash?

thanks!

Kallikanzaros
04-16-2007, 11:07 PM
Hi!
In the Properties window where it says "publish" I clicked "settings", and then next to ActionScript Version you can choose actionscript 3.0.

cheers
k

jaaaab
04-16-2007, 11:14 PM
ooook thanks!

just had to set flash version to flash 9 of course before ;)

Kallikanzaros
04-16-2007, 11:20 PM
ah, that is right. forgot to mention that part :-)