dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: game actionscript problems URGENT

  1. #1
    Banned
    Join Date
    May 2005
    Posts
    36

    game actionscript problems dragging


    i know theres probably some simple anwser but i got a headache from this so go to this page and see my game
    Click Here
    av a go and as u can see when you drag the red object into the inventory and then click on the money or anything else it goes to that position i have a feeling thats its todo with another boolean value but some1 give a a hand
    ps. i used the dragging object tutorial for this thanks
    pls help me im only 12 years old :-(
    peter.
    ------
    Last edited by pkmnpeter; 05-22-2005 at 02:45 PM.

  2. #2
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745

    welcome to FK!

    howdy pkmnpeter,

    difficult to guess, in this case, without seeing the scripts. you may be correct that a boolean needs toggling.

    Can you attach the .fla to a reply in this thread? Posting the .fla allows everyone to see what you are describing, likely resulting in a more rapid solution. (The "attach file" option is at the bottom of the reply panel.)

    If the .fla file is too large to attach, can you zip it up? Maybe create a dummy copy of the fla ("Save as" with different name) and remove large sound files and images, then attach the stripped-down fla here...

    ...or, can you at least post the parts of the script that are moving the red circle?

    btw - seeing the word "urgent" in a title usually results in me not opening a thread; i was just curious today how it is that a post becomes "urgent" (and i still do not see evidence of 'urgency' - suggest dropping that word from thread titles; unless you're on a deadline, with a mega-client - but then expect me to ask for a cut of the profits!)
    __azwaldo__

  3. #3
    Banned
    Join Date
    May 2005
    Posts
    36

    Fla File

    Here is the flash file
    Attached Files Attached Files

  4. #4
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745
    why is the user dragging the circle?
    what will dragging the circle result in?

    as far as getting the circle to stay in the inventory area: the solution that works best for you depends on why (and when) the user will drag the red circle.

    as you have it scripted now, the circle clip will sit and monitor the mouse events forever. this is not necessary, unless the red circle is to be the main interactive element on the screen.

    try replacing the red circle script with this:
    Code:
    on (press) {
    	this.startDrag();
    }
    on (release) {
    	this.stopDrag();
    	//here, you could write a conditional (if/then) statement to test if the 
    	//clip is being dropped over the inventory area; either use x/y ranges or 
    	//make the inventory area a clip itself and use hitTest
    }
    __azwaldo__

  5. #5
    Banned
    Join Date
    May 2005
    Posts
    36
    the user is dragging the ball to become part of the inventory for further actions to be caried out

  6. #6
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745

    demo

    here's something to work with, at least. test it first to see the effect, then check out the script attached to the red circle. i stripped most of the graphics out of this file, to keep the file size down (to go easy on the FlashKit server); so, you'll just want to copy/paste anything you decide to use...
    __azwaldo__

  7. #7
    Banned
    Join Date
    May 2005
    Posts
    36

    wow thx

    thats really good if you have anything else game related pls post it and that would be good

  8. #8
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745

    PMs

    have you openned your private messages here at FlashKit??
    (use the 'user cp' button near top of page to open the control panel, then you'll see the private messages option)
    __azwaldo__

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