dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8] Can't find a solution for this. Wheel... FLA included.

  1. #1
    ASs 2.0
    Join Date
    Feb 2003
    Location
    Istanbul / Turkey
    Posts
    140

    [F8] Can't find a solution for this. Wheel... FLA included.

    Hi,

    First of all i'm using cs3 but saved the fla as F8 format so you can open it... I'm also attaching a gif shot in case your flash version rejects to open the file...

    I'm making something similar to Wheel of Fortune but slightly different...

    There are 8 equal pieces(pies) on the wheel... and let's say pie1, pie2, pie3 and soon...

    when the user clicks the pie6 the wheel should rotate and stop when the 6th(or any other one which the user selects) pie hits the red screener(?). You better have a look at the FLA to get the idea...

    I created nearly all the clips dynamically... i was succesful with rotating the wheel with the amount of the angle between 360 and the chosen pie but there is still an error when you second, third or any other time activate it.

    i tried to make a hitTest between each pie and the red screener but that didin't work also...

    ANY IDEAS WILL BE APPRECIATED...
    THANK YOU,
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    From what I can see you are referencing movieclips that do not exist and that's why everything is returning "no". Your hittest is invalid because "this.mytrig" does not even exist. I don't understand half the language in your code because it's probably turkish but I think you need to start by fixing your broken references.

    I think a little better structure could be this:

    PHP Code:
    for (i=0i<myEtiket.lengthi++) {
        
    myPiecePro _root.myWheel.attachMovie("piePiece","pieceNew"_root.myWheel.getNextHighestDepth());
        
    _root.myWheel.pieceNew.attachMovie("mytrig","mytrig"_root.myWheel.pieceNew.getNextHighestDepth());
        
    myPiece _root.myWheel.pieceNew.duplicateMovieClip("piece"+ii);
        
    myPiece._rotation 45*i;
        
    myPiece.textim.text myEtiket[i];
        
        
    myPiece.onRelease = function(){
            
    denemeDokun(this);
        }
        
    //donusMove(this.don);
        
    denemeDokun(myPiece);
    }

    function 
    denemeDokun(obj) {
        
    trace(obj.mytrig);
        if(
    obj.mytrighitTest(_root.mytester)) {
            
    dondur.stop();
            
    //getURL("http://www.aveamuzik.com", "_blank");
            
    trace("no");
        }else{
            
    dondur = new Tween(_root.myWheel"_rotation"Strong.easeInOut_root.myWheel._rotation_root.myWheel._rotation+451true);
            
    trace("yes");
        }

    But you still need to fix the object references.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center