You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, March 11th 2009, 3:23pm

Flex Components in Plugin

The combobox plugin I believe was created using the flex combobox, my question is how is this accomplished? The source code for this plugin is not included with krpano. Basically, what would a mxml file that defines a plugin need to look like?

Regards,

Adam

2

Wednesday, March 11th 2009, 10:47pm

Hi,

the combobox plugin was made with Flash CS3, the source is included (.fla),

I'm not sure at moment about the usage of Flex as Plugin, needed to be tested...

best regards,
Klaus

nick

Beginner

Posts: 3

Location: Bielefeld

  • Send private message

3

Thursday, April 16th 2009, 3:25pm

flex plugins

I tried to develop some plugins with the full flex sdk (not only with an action script class) - works well, except for the event handlers.
I did'nt manage to register events like PLUGINEVENT_REGISTER or PLUGINEVENT_RESIZE, no event is fired. Do you have any idea on this?

Thanks for this ´╗┐´╗┐gorgeous player!
Nils

4

Thursday, April 16th 2009, 11:31pm

Hi,

can you show how you have registered these events,
I think they should work in flex too

best regrads,
Klaus

nick

Beginner

Posts: 3

Location: Bielefeld

  • Send private message

5

Friday, April 17th 2009, 9:31am

Hi,

can you show how you have registered these events,
I think they should work in flex too

best regrads,
Klaus
Hi Klaus,

i use the following:

Source code

1
2
krpano = krpano_as3_interface.getInstance();
krpano.addPluginEventListener(this, krpano_as3_interface.PLUGINEVENT_RESIZE, pluginResize);


The corresponding handler:

Source code

1
2
3
private function pluginResize(e:DataEvent):void {
     krpano_trace(1, "resize");
}



since the PLUGINEVENT_REGISTER isn't also fired, i register the events in an init()-function, called from creationComplete in <mx:Application>
Btw: I use the latest Beta of KRPANO.

Thanks,
Nils

6

Monday, April 20th 2009, 9:43pm

This is a guess, but if your mxml uses an Application tag rather than a MovieClip or a Sprite this might be the source of the issue. I am basing my guess on the 'this' parameter that is passed to the addPluginEventListener functions, 'this' if you are using a Application tag will be a different datatype than if you said 'this' with a movieclip or a sprite. Try replacing mx:Application with flash:Sprite or flash:Movieclip. Also add xmlns:flash="flash.display.*" in order for the flash namespace to work. I would be very interested in seeing you mxml if you do not mind sharing...

7

Monday, April 20th 2009, 10:46pm

Hi,

sorry, I have no answer at the moment, I still need to test with "mxml" apps,
it could be possible that it would be nessecry to set the parent or parent or the parent for mx apps:

e.g. - try:

Source code

1
krpano.addPluginEventListener(this.parent, krpano_as3_interface.PLUGINEVENT_RESIZE, pluginResize);

or:

Source code

1
krpano.addPluginEventListener(this.parent.parent, krpano_as3_interface.PLUGINEVENT_RESIZE, pluginResize);


best regards,
Klaus

8

Friday, November 12th 2010, 11:23am


it could be possible that it would be nessecry to set the parent or parent or the parent for mx apps:

Unfortunatelly it's not possible. I've tried many variations using root, parent.parent.parent.parent, and other possibilities.
Please someone solve this problem it would be very very nice to write plugins in Flex unfortunatelly without ability to fetch plugin object defined in krpano xml file (event ON REGISTER) plugins are useless.
Please solve this one.

Zephyr

Professional

Posts: 968

Location: Netherlands

Occupation: Web developer

  • Send private message

9

Thursday, November 18th 2010, 11:48pm

Can't you use Javascript as a intermediar between Flex app and krpano? just write some getters and setters.
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Similar threads