foundamental issues on .swf application using kr

  • Hello to everybody.

    this is my first 3d Here. I guess some questions could be easy.
    but.
    If I can't solve both issue I won't be able to use KR in our future apps.
    I've already tried to load a pano with some hotspots [.swf files]. I'm able to manage event on them, and access to .swf hotspot main timeline to use method and get/set property.

    Now I'm trying to load the pano in a "wrapper", that is THE application. so I need that the pano stays behind other items [eg: decorative objects, sliding menus, etc] that partially overlaps the pano.
    BUT
    I red that embeddedstartup function must be called using stage as first parameter.
    In this way the panorama always stays over every other stuff. is there a way to skip this kind of behaviour, that in not compliant for me?
    I tried to swap the childIndex between the "wrapper" and the stage. The display list seem to be re-arranged: the elements "decorative" are displayed over the pano.
    BUT there are another problem. I some case I need to "freeze" the event on pano. Usually [ie using the current panorama player] a protection layer appears, so the pano can't trigger any event, or drag.
    I need to replies this behaviour.
    is it possible?

    Many thanks to all can answer o show me the ways. *smile*

    otherwise I won't use KR...

    zeno.

  • Many Thanks Klaus,

    I've found the answer from my memory after wrote the 3D and turned-off the pc on the back-home way *wink*

    Is there any tips about the display-object order (ie the pano behind the "wrapper"), differs by swap (stage) child index values?

    regards.

    zeno

  • getting all the movieclips on the stage:

    Code
    for (var i:uint = 0; i < stage.numChildren; i++){
    	trace ('\t|\t ' +i+'.\t name:' + stage.getChildAt(i).name + '\t type:' + typeof (stage.getChildAt(i))+ '\t' + stage.getChildAt(i));
    }

    you then could easily add all the stuff in the right order. you should use addChildAt(child, index) instead of addChild. So you always know where your children are.

  • hi guys

    Klaus
    the "wrapper" is usually placed on the stage before the pano components. Because we always displays an intro, navigations step before loading the "panorama movieclip".
    so, inspired by your answer, I've tried - in a very very simple demo app - to embed the pano (.swf obect as interface) before everything else. In the embeddedstartup function there's a call to a function that does to next root frame, then get the right xml variable and then load the panorama (images, actions, hotspots, etc). in this frame there are placed all the "wrapper" stuff, instanced after the pano: so, I guess with the display list over the pano itself.
    nothing changes. the pano stay over everything. *cry*

    Zephyr
    nice to meet again... *thumbup*
    your solution goes in the same direction, setting the order position of the stuff. It's a bit complicated to do in our case: because the stuff are designed, not placed via code.

  • the stuff you design, can have an instance name. Then you can alter the posistion in actionscript by using setChildIndex or swapChildren.
    look at this: http://www.smithmediafusion.com/blog/?p=435

    Alsoo If I design using the Flash IDE (or import png using the IDE) It goes to the library. If you rightmouse click on the library item you can set the "linkage"

    For example, you create a red rectangle, set the linkage to RedRectangle, and you keep the rectangle in the library (not on the stage). You can do like:

    var redr:RedRectangle = new RedRectangle
    container.addChildat(RedRectangle, 1); //or numChildren - 1 to always set it on top within the container.

    or you put everything in the container movieclip, without worrying about the depths, but when you are done, set the container movieclip ontop of krpano using numChildren - 1 method.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!