Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

mds

Fortgeschrittener

  • »mds« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Athens, GA

Beruf: Designer

  • Nachricht senden

1

Mittwoch, 8. Juli 2009, 17:31

call a function after 'lookto'?

how would i go about calling a custom actionscript function after a 'lookto' is complete?



krpano.call("lookat(-145,0,80);"); // <-- would like to call a function after this happens




thanks!
Say "Hi!" on twitter

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »mds« (9. Juli 2009, 07:26)


mds

Fortgeschrittener

  • »mds« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Athens, GA

Beruf: Designer

  • Nachricht senden

2

Donnerstag, 9. Juli 2009, 07:26

anybody????
Say "Hi!" on twitter

mds

Fortgeschrittener

  • »mds« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Athens, GA

Beruf: Designer

  • Nachricht senden

3

Freitag, 10. Juli 2009, 06:53

i figured out a work around using tweener and a delay of six seconds. that was roughly the amount of time it took for the 'lookto' to stop anyways.
Say "Hi!" on twitter

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

4

Freitag, 10. Juli 2009, 09:53

could you also call a defined action that included the lookto and then the next function?

Quellcode

1
2
3
4
5
6
krpano.call("action(my_action);");

<action name="my_action">
    lookat(-145,0,80);
    action(nextaction);
</action>


not sure if all of the syntax is correct... but hopefully the concept might work.

mds

Fortgeschrittener

  • »mds« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Athens, GA

Beruf: Designer

  • Nachricht senden

5

Freitag, 10. Juli 2009, 16:11

well i tried to write in my action after the 'lookto' action but i think since it was a custom function (to show the instructions) that it reads the function at the very beginning as opposed to waiting it's turn like the kr functions.

i thought there would be an easy solution like this:

Quellcode

1
krpano.call(lookto, 150,0,15, onComplete:myfunction(););


but i couldn't get it to work.

instead i used the tweener class like this:

Quellcode

1
2
3
4
5
6
7
8
9
10
function startInstructions():void
{
	Tweener.addTween(instructions, {alpha:1, delay:6, time:.25, transition:"easeOutExpo", onComplete:function(){ instructionsInit(); } });
}

function instructionsInit()
{
	instructions.gotoAndPlay(2);
	instructions.mouse.gotoAndPlay(2);
}


that makes it wait 6 seconds before fading in and then fires instructionsInti(); to begin the animation.
Say "Hi!" on twitter