This is G o o g l e's cache of http://www.flashsandy.org/forum/index.php?showtopic=458&pid=2715&mode=threaded&show=&st=& as retrieved on 28 Aug 2007 12:18:38 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:PfipKorZcjgJ:www.flashsandy.org/forum/index.php%3Fshowtopic%3D458%26pid%3D2715%26mode%3Dthreaded%26show%3D%26st%3D%26+site:www.flashsandy.org/forum&hl=en&ct=clnk&cd=63


Google is neither affiliated with the authors of this page nor responsible for its content.

Welcome Guest ( Log In | Register )

> Mixedskin render faults
rozenrood
post Apr 16 2007, 08:07 PM
Post #1


Newbie
*

Group: Members
Posts: 4
Joined: 4-April 07
Member No.: 1,019



Hi,

I created a 3D world with dynamic placed flowers and bees..
I've plaeced the SWF online > http://www.rozenrood.nl/swf4/

Now the problem is as you can see, when you walk around a bit using the arrows on your keyboard, and you hover you mouse over a flower, sometimes strange things happends... i.e one second you'll see a flower high in the sky, the other second its gone, the same with bee's..
another strange thing is that sometimes the cube that is placed a cross the flower, got's very thick line instead of a nice thine one..

The flowers and bees are movieskins, and the cubes are mixedskins...

how is this possible?? why are these strange things happening?? and how can I fix them (IMG:style_emoticons/default/smile.gif) hope someone can help me (IMG:style_emoticons/default/biggrin.gif)

here is the code that places the flowers and cubes:

CODE
    public function place(p_skin) {
        //places the flower
        var s:Object3D = new Sprite2D();
        s.setSkin(p_skin);
        var tg1:TransformGroup = new TransformGroup();
        var tg2:TransformGroup = new TransformGroup();
        //
        var trans:Transform3D = new Transform3D();
        var rot:Transform3D = new Transform3D();
        //
        trans.translate(this.myValues.posX, 0, this.myValues.posY);
        rot.rot(0, Math.round(Math.random()*0), 0);
        //
        tg1.setTransform(rot);
        tg2.setTransform(trans);
        //
        tg1.addChild(s);
        tg2.addChild(tg1);
        _root.world.bg.addChild(tg2);
        //
        //plaatst de hover/click box
        cube = new Box(12, 12, 12, 'quad');
        cube.setSkin(skinHoverOut);
        var tg3:TransformGroup = new TransformGroup();
        var transBox:Transform3D = new Transform3D();
        transBox.translate(this.myValues.posX-6, 27, this.myValues.posY-6);
        tg3.setTransform(transBox);
        tg3.addChild(cube);
        //
        //actions
        cube.enableEvents(true);
        cube.addEventListener(ObjectEvent.onRollOverEVENT, this, hoverIn);
        cube.addEventListener(ObjectEvent.onRollOutEVENT, this, hoverOut);
        cube.addEventListener(ObjectEvent.onPressEVENT, this, callViewDisplay, this.myValues.contentId);
        // Add the cube as a child to the rootGroup
        _root.world.bg.addChild(tg3);
    }


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
rozenrood
post Apr 17 2007, 03:43 PM
Post #2


Newbie
*

Group: Members
Posts: 4
Joined: 4-April 07
Member No.: 1,019



I've fixed the suddenly appearing flowers and bees by adjusting the camera's angle.. (not realy a fix but it works (IMG:style_emoticons/default/smile.gif) )

I've defined the skins within the class's constructor:
CODE
skinHoverIn = new MixedSkin(0xFF0000, 0, 0x999999, 100, 0.5);
skinHoverOut = new MixedSkin(0xFF0000, 0, 0, 0, 0.5);


both are defined as :
CODE

private var skinHoverIn:Skin;
private var skinHoverOut:Skin;


the hoverIn and -out methods are:
CODE
private function hoverIn(e:ObjectEvent) {
        cube.setSkin(skinHoverIn);
        cube.refresh();
        if (!myHoverOutInt) {
            myHoverOutInt = setInterval(hoverOutInt, 3000, this);
        }
    }
    private function hoverOut(e:ObjectEvent) {
        cube.setSkin(skinHoverOut);
        cube.refresh();
        clearInterval(myHoverOutInt);
        myHoverOutInt = 0;
    }
    private function hoverOutInt(target) {
        target.cube.setSkin(target.skinHoverOut);
        target.cube.refresh();
        clearInterval(target.myHoverOutInt);
        target.myHoverOutInt = 0;
    }


the hoverOutInt is called to be sure the hover is removed after 3 seconds
User is offlineProfile CardPM
Go to the top of the page
+Quote Post



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 28th August 2007 - 11:54 AM
phpMyVisites