squemish

Author Topic: TypeError: Error #1006: value is not a function.  (Read 2069 times)

ladyrider12

  • Guest
TypeError: Error #1006: value is not a function.
« on: February 18, 2013, 05:28:13 pm »
Hi Everyone,

I hope someone can help I added this actionscript 3 in my first frame of my main timeline to call a movie clip to play in its entirety. Once it is done playing it goes direstly to the homepage.

// Create a new MovieClip
var myMovieClip:MovieClip = new Splashpage_mc();

// Add the new MovieClip to the MainTimeline
addChild(myMovieClip);

// Set the location of the new MovieClip
myMovieClip.x = 490;
myMovieClip.y =325;

myMovieClip.gotoAndPlay(1);
myMovieClip.totalFrames(461);


It goes to the home page of the website like wanted with this script at the end of the movie clip and stop it from looping:

stop();
MovieClip(parent).gotoAndPlay(2);

My problem is that I am getting the following output error code and I cannot figure out what I did wrong.

This is the full error message:

TypeError: Error #1006: value is not a function.
   at W5A1_fla::MainTimeline/frame1()

Help!

Thank-you for your time.
Tammy

« Last Edit: February 18, 2013, 05:36:42 pm by ladyrider12 »

JennaSetticasi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 492
Re: TypeError: Error #1006: value is not a function.
« Reply #1 on: February 19, 2013, 08:35:33 am »
Hi Tammy,

totalFrames is a property not a function, so
Code: [Select]
myMovieClip.totalFrames(461); doesn't really make sense. What are you trying to do with this line of code? Perhaps you can simply remove it. Here's a good example of how totalFrames can be used: http://mds.scaleviz.com/as3/looping-frames-with-currentframe-totalframes-as3-snippet/
 
Jenna
Jenna Setticasi
The Art Institute of Pittsburgh | Online Division
Associate Professor, Web Design and Interactive Media

ladyrider12

  • Guest
Re: TypeError: Error #1006: value is not a function.
« Reply #2 on: February 24, 2013, 06:18:36 am »
Hi,

Thank you for your reply. I am trying to play a movie clip in it's entirety in the main timeline. I don't want it to loop. It is the splachpage for a website. It needs to play then go to the second frame on the timeline, which is the first page of the website. Yes, I am still having this issue.

Thanks,
Tammy

JennaSetticasi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 492
Re: TypeError: Error #1006: value is not a function.
« Reply #3 on: February 25, 2013, 07:19:05 am »
Hi Tammy,

Please attach your .fla here or upload the .fla to your student Webspace and post a link to it here.

Jenna
Jenna Setticasi
The Art Institute of Pittsburgh | Online Division
Associate Professor, Web Design and Interactive Media