ActionScript 3.0 :: Flash - TypeError: Error #1006: Value Is Not A Function?
Dec 28, 2011
This is my code: I have 4 buttons that are named btn1, btn2, btn3, btn4. if I do only trace(my_btn) it returns btn1, btn2, btn3, btn4. But when I try to tell them to stop on frame, it returns TypeError: Error #1006: value is not a function. atroject_fla::MainTimeline/frame1()This is my code
for (var i:int = 1 ; i <= 4 ; i++ ) {
var my_btn = "btn"+i;
trace(my_btn);
[code]........
View 6 Replies
Similar Posts:
Nov 24, 2011
I have a class that holds an object from another class. When I want to call some function from this class, I get the above errorMainMenu.as
package portfolioSource {
public class MainMenu extends MovieClip {
private var movieContainer:MoviePlayerContainer;
[code]....
View 1 Replies
Feb 24, 2012
when pressing on a button that error comes up in the OUTPUT tabthe file is in the linkError #1006.rarThis is the navigation_actions code where are the codes of the navigation bar (the buttons)
var buttonArray:Array = new Array( );
var currentButton:Object = new Object;
var navContainer:Sprite=new Sprite ;
[code].....
View 1 Replies
Sep 24, 2009
I read online, and I understand kinda what the error is stating. Though, I can't find out why.So basically what I understand is that I am calling a function that is not a function?ere is the error and code portions that are required.Quote:TypeError: Error #1006: value is not a function.at VideoPlayer_fla::MainTimeline/startVideoPlayer()at VideoPlayer_fla::MainTimeline/frame1()
View 3 Replies
May 1, 2011
Basically I have a movieclip with a load of buttons in it which will all eventually lead to different movieclips. When a button is pressed I want a movieclip to appear and play. The movieclip is on the stage.The problem i have is that when i click the link, this error message appears in the Output tab:Quote:TypeError: Error #1006: value is not a function.at plumonicconsonants_fla:ulmonicconsonants_1/buttonClick()
View 21 Replies
Jul 7, 2010
I'm getting this error: TypeError: Error #1006: value is not a function. at project_fla::MainTimeline/createMap
heres the actionscript:
[A]
function createMap(target:Object, map:Array, tilesize:Number): [code].........
View 12 Replies
Mar 21, 2012
I trying to make a contact us form run, but I reciving this error message:
TypeError: Error #1006: value is not a function. at main_fla::theContactus_17/SubmitFunction()
View 9 Replies
Nov 9, 2009
I've been trying to load an external SWF but keep getting this error:
TypeError: Error #1006: loadMovie is not a function.
This is the code I have:
Code:
location.loadMovie("video.swf");
"location" is the mc that loads "video.swf"
This used to work in other versions of flash but for some reason now it doesn't in these higher versions of flash?
View 3 Replies
Oct 30, 2011
ActionScript Code:
import flash.events.Event;
import flash.display.Sprite;
import flash.display.Shape;
import flash.display.Graphics;
[code]...
View 3 Replies
Sep 10, 2009
Im having problems with this code. Im getting this error at compile
TypeError: Error #1006: value is not a function.
at smart_o_meter_test_fla::map_1/smart_o_meter_test_fla::frame1()
Code below:
Code:
var countries:Array = ["india", "china", "sri_lanka"];
for ( var i:int = countries.length - 1; i >=0; i--){
countries[i].addEventListener(MouseEvent.MOUSE_OVER, MouseOver, false, 0, true);
countries[i].addEventListener(MouseEvent.MOUSE_OUT, MouseOut, false, 0, true);
[Code].....
View 1 Replies
Oct 12, 2009
I ahev this code with a datepicker, but in the output from flash i have the following error.
[code]...
View 3 Replies
May 21, 2010
I have a "setter" function in a class
PHP Code:
public function set(date:Date):void {
_targetDate = date; //...etc
When I try to access this from my Document class by this syntax:
PHP Code:
var targetDate:Date = new Date();
targetDate.setTime( Date.UTC(2010, 4, 28, 20, 00) );
clock.set(targetDate);// where clock is instance name of a MovieClip placed on stage
- I get this: TypeError: Error #1006: set is not a function.
View 6 Replies
Oct 8, 2009
#1006: value is not a function. at MethodInfo-43() I don't know what the problem is, or where could it be, here is the problem code, but first a brief description: Every 3 seconds 3 enemies will be created with a random position, the enemies can't be appearing on top of the other so I check if they collide with any previously added enemies, if they do I assign other random coordinates and check again until there is no collision (I'm using the collision detection kit CDK for the collisions[URL]..the first 3 enemies appear correctly but afterwards the error appears and the next time the program enters the generation part the enemies begin appearing in ridiculous numbers.
[Code]...
View 1 Replies
Jan 18, 2011
var pntClk:int = -1;
for(var t:int=0;t<tab1PointsArray.length;t++) {
tab1PointsArray[t].addEventListener(MouseEvent.CLICK, tab1PointClicked); <Problem code i think. Error points to line 117
trace("Event listener added to " + tab1PointsArray[t].name);
}
[Code]...
View 5 Replies
Mar 11, 2011
I am using this on a container mc
e.target.loader.content.getData(this.currentLibraryName, this.definitionsArray); // this info is passed to the getData in the game e.target.loader.content.getDataHigh(this.level, this.lesson);
[code].....
View 4 Replies
Jul 29, 2010
I'm having a difficult time working on my flash application. Everytime I run my code, this error bumps at me. TypeError: Error #1006: myInitializer is not a function.I am quite sure that my myInitializer() function is indeed a function:
public class newClass extends MovieClip {
public function newClass() {
this.width = this.width;
[code].....
View 1 Replies
Feb 3, 2009
TypeError: Error #1006: functionName is not a function. at MethodInfo-147() I'm basically getting this error message everytime I try to call a function from another SWF. I followed FrodoBaggins example to Access a loaded SWF, I have two files. In the first one (lets call it a.FLA, there's a function called functionName in the first frame of the timeline. The second file is a class (lets call it b.AS, which taget is b.FLA), from where I want to call functionName from a.FLA... this is what I did:
[Code]....
View 3 Replies
Dec 15, 2009
I don't get any compiler errors, but I do however get the message: TypeError: Error #1006: hitTestObject is not a function. does anyone no the common cause of this? If you need me to post my code I can do that to.
View 1 Replies
Apr 6, 2010
i added this code but i get an error
function frameloop(evt:Event):void {
if(gadgets.hitTestPoint(character.x,character.y)){
character.rotation = -90;
}
}
this is the error that i get:
TypeError: Error #1006: hitTestPoint is not a function.
at catchgame_fla::MainTimeline/frameloop()
View 5 Replies
Mar 29, 2011
I'm making a hang man app in AS3 and when I try to run or debug it I get this error.
TypeError: Error #1006: charAt is not a function.
at Hangman_fla::MainTimeline/loadingText()[Hangman_fla.MainTimeline::frame1:93]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
I'm not entirely sure what it all means since I'm extremely new to AS3. So can someone please help me. Also I pasted the code function that charAt is a part of below.
if(words.charAt(i)!= " ")
{
underline = new Underline();
underline.x = tempText.x + tempText.width/3;
[code]...
View 7 Replies
Nov 10, 2009
Basically I have a movieclip with a load of buttons in it which will all eventually lead to different movieclips. When a button is pressed I want a movieclip to appear and play. The movieclip is on the stage.The problem i have is that when i click the link, this error message appears in the Output tab:
Quote:
TypeError: Error #1006: value is not a function.
at plumonicconsonants_fla:ulmonicconsonants_1/buttonClick()
So far my code is
Code:
import flash.events.MouseEvent;
pbtn.addEventListener(MouseEvent.CLICK,buttonClick);
function buttonClick(e:Event):void
[code]...
View 1 Replies
Sep 9, 2009
I have this movie with 5 button (movie clips) that load 5 swf files/ I cannot get them to load. I can only load one movie. I am getting this error. TypeError: Error #1006: value is not a function.
[Code]....
View 3 Replies
Jan 8, 2010
I have 2 classes with a draw function in them, my Background class and VideoDisplay class. I'm not done with the VideoDisplay class, but I put simple traces in it to test. I call both the Background and VideoDisplay the same way in my document class, but when I try to call the draw function of the VideoDisplay class I get this error:
Error #1006: draw is not a function.
My Document class code:
//this is inside of onBulkLoadComplete which is called from init
drawBackground();
drawVideo();
[code]...
View 3 Replies
Sep 9, 2009
I am new to Flash and Action Scripts. I am trying to put together some Mortgage Calculators for a client and am having issues getting the syntax for the formula correct. Below is my code could someone look it over and give some pointers on how to structure the formula. It is a standard mortgage payment calculator. num1 is Loan Amount num2 is interest rate and num3 is loan term they are the instance names of the unput text boxes.
equels_btn.addEventListener(MouseEvent.CLICK,equel sClick);
num1.border = true;
num2.border = true;[code]........
I get the folowing error when I click the equels_btn
TypeError: Error #1006: value is not a function. at LoanPayment_fla::MainTimeline/equelsClick()
View 4 Replies
Jun 19, 2011
am trying to call a function from my child to the main swf, but I receive error Error #1006: restartSlideShow is not a function.
restarter is the function in the main swf which I want to run. This is my code:
Code:
function restartSlideshow(Event:MouseEvent):void{
MovieClip(root.parent.parent).restarter();
}
View 4 Replies
Jul 6, 2010
I have followed a tutorial for a email validation contact form perfectly (to my knowledge) but I keep getting an error when the form is filled in correctly or correctly apart from the email input:
TypeError: Error #1006: value is not a function.
at roberts_fla::contactForm_46/SubmitFunction()
This obviously points to the SubmitFunction() in the AS3 but I don't know why
Code:
/*To Define The Main Varibles*/
var urlLoader:URLLoader = new URLLoader();
var imgLoader:Loader = new Loader();
[Code]....
View 2 Replies
Feb 3, 2011
The gallery used to have a document class of:
com.alexrindo.flashview.Flashview
I changed it to:
com.wooden.flashview.Flashview
After renaming the 'alexrindo' folder in the project and changing all of the import references, etc. in the class files accordingly, when I try to compile in the Flash IDE I get the following message:
TypeError: Error #1006: resizeElements is not a function.
at com.wooden.flashview::Flashview/createLayout()
at com.wooden.flashview::Flashview()
The 'Flashview' class file referred to is:
Actionscript Code:
/*** @author Alexander Rindo* @project Flashview* @version 0.4* @function Document Class**/package com.wooden.flashview { import com.wooden.flashview.contextmenu.ImageContextMenu; import
[Code]....
View 1 Replies
Oct 11, 2010
I have a real headscratcher, I am getting the following error:
TypeError: Error #1006: value is not a function. at touchscreen::MapConnectionSuccess() at touchscreen::MapTemp() at flash.display::Sprite/constructChildren() at flash.display::Sprite() at flash.display::MovieClip()
This seems to be relating to where I am passing in parameters to a new instance of a class highlighted below. I have done this so many times without problem. The class is setup to receive a displayobject and a movieclip. The first object passed is an instance of the Umap component, but tried just passing two simple movieclips and still got the error.
[Code].....
View 1 Replies
Sep 6, 2011
I'm working on the animation that plays 4 video clips depending on which button is pressed. After each movie is done playing, 3 buttons appear:
Replay, Close and More info My question is, how do i target the correct button, or, how do I tell the button which movie just got done playing, so it can play it again..
I tried using: event.target.name.PlayVideo. however I get an error: 1006 value is not a function.
View 2 Replies
Mar 14, 2011
I have an array of integers called indArray and a function called addCommas where the array is cycled through and commas are added to the thousands i.e. 9,000 instead of 9000.
Now, this works perfectly fine, however, I try calling addCommas on a different variable and it gives me this error.
Here is my code:
var string = personData[personID - 1];
var indArray = string.split("|");
var targetTotal = int(indArray[0]) + int(indArray[2]) + int(indArray[4]) + int(indArray[6]);
[Code].....
View 1 Replies