Hello all, I have a simple question.
I have a software which allow me to build my own swf loader, is it possible to change the default loader and replace it with the one i build ?
Thanks for your reply.
Steph'
Hello all, I have a simple question.
I have a software which allow me to build my own swf loader, is it possible to change the default loader and replace it with the one i build ?
Thanks for your reply.
Steph'
Hi all,
can someone please answer me ?
Klaus can you tell me if it's possible tu use personnal preloader.
Thanks.
Steph'
not in that way *YET*
you could make a png and use the built in loaders, and use wait(LOAD) to remove the png, after its loaded :)
Hi,
it would be possible to write a plugin (flash, as3) that draws a custom loading bar,
(use krpano 1.0.8 beta 8)
e.g. AS3 code for Flash CS3:
import krpano_as3_interface;
var krpano:krpano_as3_interface = null;
this.addEventListener(Event.ADDED_TO_STAGE, startplugin);
function startplugin(evt:Event):void
{
// get interface to krpano
krpano = krpano_as3_interface.getInstance();
// first - disable the build-in progressbar
krpano.set("progress.showload","none");
krpano.set("progress.showwait","none");
// check every frame if krpano is loading something
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
function enterFrameHandler(event:Event):void
{
if( krpano.get("progress.isloading") == true )
{
// bytesloaded/bytestotal are the number of bytes currently loaded and total
// note - for tiled and multiresolution panoramas these value can vary quickly!
// better use the "progress" value in this case!
var bytesloaded:Number = Number( krpano.get("progress.bytesloaded") );
var bytestotal:Number = Number( krpano.get("progress.bytestotal") );
// "progress" is a value between 0.0 and 1.0
var progress:Number = Number( krpano.get("progress.progress") );
// draw/scale something with this value
...
}
}
Alles anzeigen
include this plugin in the xml and set "preload" to "true"!
xml:
best regards,
Klaus
Hi,
I mean you could draw or scale something based on the progress value,
e.g.
if want a image as progress bar, scale the width of the image with the progress value,
as3/cs3 code:
var progressbarwidth:Number = 300;
// calc left offset of image:
image.x = stage.stageWidth/2 - progressbarwidth/2;
// calc width (depending on the progress):
image.width = progress * progressbarwidth;
I will provide a .fla example in the next release
best regards,
Klaus
Thank's for the code
But I can't make anything in as3, sorry
there will be a xml only way soon too
Greats Shanti thank's a lot
I try to understand as3
Great thanks for all.
I use to build my own loader with a simple software which save it directly in swf, so can i insert it easily in the xml file using a plugin function or is it more difficult ?
Steph'
I use to build my own loader with a simple software which save it directly in swf, so can i insert it easily in the xml file using a plugin function or is it more difficult ?
yes, that's "all"
the example from Shanti is great to start (thanks )
best regards,
Klaus
Thank you Shanti... great example..
Hi,
For a preloader is there any way just to have a stationary logo, loading bar underneath and then a % counter under the bar?
Using the FLA example, I tried to add a logo above the 'loadimg' movie clip but for some reason it remains visible after the bar has loaded 100% and then disappeared.
I then tried adding the logo inside the actual 'loadimg' movie clip (made the stage a little bigger) but when it works the logo is stretched along with bar and looks odd.
I see that Job.1 mentioned making one with xml but the link is dead so I've no idea what code to use although I did see one in action on the main website but the code is encrypted
Look forward to any advice please.
Thanks,
Andrew
Thanks Klaus. That did the trick. It now appears and goes when it should
Seem to be having some alignment issues with the logo appearing way left above the loading bar but will attack that at the weekend.
All the best,
Andrew
Hello,
I'm coding an AS3 plugin for my project.
I have already code personal loader for one panorama, but, now i'm coding for a virtual tour ( more than 10 panos)
I have use your sample code, an modify it for the multiple resolution percent support.
In my code, i'm use this code for deactivate the integrated loading bars :
function startup_plugin(event:Event):void
{
// first krpano calls - disable default progressbar
krpano.set("progress.showload","none");
krpano.set("progress.showwait","none");
// here, other code...
}
In my virtual tour, the two progress bar are desactivate for the first pano, but if i load another one (by clicking on xml hotspot, no AS3 loading function at this time)
the krpanos loading bar are reactivate.
i have insert my plugin like this in the xml :
it is a KRpano bug ? or do you have a specific function for desactivate theses bar all the time ?
Thanks
Hi,
it is a KRpano bug ? or do you have a specific function for desactivate theses bar all the time ?
use the MERGE or KEEPALL or KEEPPROGRESS flags in the loadpano() call,
without one of these flags the <progress> settings will be reset back to default
when there are no new settings in the new xml,
see here:
https://krpano.com/docu/actions/#loadpano
best regards,
Klaus
Hello,
Ok i have completely forget theses flags.
I'm sure, i knows theses but, in the panic, i don't have search about it.
Thank for your help
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!