To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Reply
 
Thread Tools Search this Thread Display Modes
Old 12-11-2006, 06:59 PM   #1
swrzzzz
Steve R
 
swrzzzz's Avatar
 
Join Date: Jan 2005
Location: Leicestershire,UK
Posts: 195
extend the movieClip object?

Hi

I am trying to create a new object which extends the MovieClip.

I have modelled this code on some MM examples but I don't see the hello world

Can anyone tell me what I have done wrong? (probably loads :-( )

Ta

Steve

My fun file has only this actionscript.....

#initclip

function SWR_Tree()
{
this.createTextField("tf",100,20,20,200,200);
tf.text="hello world";
}

SWR_Tree.prototype = new MovieClip();

Object.registerClass("SWR_Tree",SWR_Tree);

#endinitclip

attachMovie("SWR_Tree","tree", 101);
swrzzzz is offline   Reply With Quote
Old 12-26-2006, 11:31 AM   #2
swrzzzz
Steve R
 
swrzzzz's Avatar
 
Join Date: Jan 2005
Location: Leicestershire,UK
Posts: 195
Hi

This one has sat for a while and I am still stuck...

Does anyone have a simple example of how to write an object which is a MovieClip in KM? I have tried to work it out from the KC8 and MM examples but nothing I try seems to work.

Thanks as usual

Steve
swrzzzz is offline   Reply With Quote
Old 12-26-2006, 01:44 PM   #3
w.brants
Senior Member
 
w.brants's Avatar
 
Join Date: Dec 2002
Location: Netherlands
Posts: 1,466
Maybe #initclip isn't supported in the main timeline
How I get your code to work is like this ...

Add a movieclip to the symbol library with link name SWR_Tree and add this part of the code to it's first frame.
Code:
#initclip

function SWR_Tree()
{
this.createTextField("tf",100,20,20,200,200);
this.tf.text="hello world";
}

SWR_Tree.prototype = new MovieClip();

Object.registerClass("SWR_Tree",SWR_Tree);

#endinitclip
Now add
Code:
attachMovie("SWR_Tree","tree", 101);
to the first frame of the main timeline.

That should do it.
w.brants is offline   Reply With Quote
Old 12-26-2006, 03:53 PM   #4
swrzzzz
Steve R
 
swrzzzz's Avatar
 
Join Date: Jan 2005
Location: Leicestershire,UK
Posts: 195
Thank you! yes that works

I have been working n a tree type nav bar. Now I can run it as a movie clip from the symbol table I will pop it on KoolExchange in the next day or so

Cheers

Steve
swrzzzz is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:03 AM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.