The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:38 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 3 posts ] 
[Question] Is this Code Right? 
Author Message

Joined: Sat Oct 03, 2009 4:09 am
Posts: 40
Gender: Anime Girl
IS IT!
Code:
onClipEvent (enterFrame)
{
    if (_root.p1, hitTest(_root.char1))
    {
        _root.text = "Mario";
    } else {
        _root.text = "";
    }
}
onClipEvent (enterFrame)
{
    if (_root.p1, hitTest(_root.char1))
    {
        p1Movie.attachMovie("MARIO_IDLE", newname1, 1);
    }
}
onClipEvent(mouseDown)
{
    if(this.hitTest(_root.xmouse, _root.ymouse, true))
    {
        this.startDrag(this);
    }
}
onClipEvent(mouseUp)
{
    this.stopDrag(this);
}

_________________
^.^


Sun Oct 04, 2009 11:36 am
User avatar

Joined: Fri Mar 27, 2009 8:55 pm
Posts: 282
Location: Why do you want to know you perv!
Gender: Male
Skype: lomeli1241
Currently Playing: Kingdom Hearts Re:Coded (JP)
why i believe it is, a simple code one stretched out.

_________________
Image
Image
Give cred 2 Doromac
Mes Amis: show
BICURIOUS GEORGE
daniel
King Master X12
Neo_Fire_Sonic
Racerx52
Sora
Tycron
Tyli
User Avatar
yoh
Envoyez-moi un message pour ĂȘtre mon ami! Ha! That's French 4 Pm to be Friends


Mon Oct 05, 2009 8:47 pm
WWW
User avatar

Joined: Tue Oct 27, 2009 11:00 am
Posts: 6
Gender: Male
poophead wrote:
IS IT!
Code:
onClipEvent (enterFrame)
{
    if (_root.p1, hitTest(_root.char1))
    {
        _root.text = "Mario";
    } else {
        _root.text = "";
    }
}
onClipEvent (enterFrame)
{
    if (_root.p1, hitTest(_root.char1))
    {
        p1Movie.attachMovie("MARIO_IDLE", newname1, 1);
    }
}
onClipEvent(mouseDown)
{
    if(this.hitTest(_root.xmouse, _root.ymouse, true))
    {
        this.startDrag(this);
    }
}
onClipEvent(mouseUp)
{
    this.stopDrag(this);
}

Hmm...why are you using a comma after an instance name for the hitTest?
I believe that it should be like this:-
Code:
if (_root.p1.hitTest(_root.char1))


Tue Oct 27, 2009 11:13 am
Display posts from previous:  Sort by  
 [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.