ActionScript 3.0 :: Wrote The Script And Tested The Movie, Come Up With The 1120 Error?

Apr 6, 2010

i've been trying to make a scrollbar and everything works fine, until i have to connect it with the text. theres an image and a title that i want to scroll with the (static) text so i created a movie clip (instance name cafe_txt), and when i wrote the script and tested the movie, i come up with the 1120 error that cafe_txt is not defined.So i changed the clip(thinking that the problem was the scrollbar had to be in the same instance as the text) so that the scrollbar was inside, and i come up with error 1067(1067: Implicit coercion of a value of type flash.display:MovieClip to an unrelated type flash.text:TextField.)
 
I've tried changing names, double checking that instance names are correct,moving things, changing the text so that its dynamic not static(if the scrollbar is connected to just the dynamic text it works,it just doesnt scroll the full length of the text) here's the code in my stage:
 
scrollbar_mc.textField = cafe_txt
 
and my code from the scrollbar.as file:
 
package com.lynda.ui{ import flash.display.*; import flash.events.*; [code].....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Getting Error 1009 When Navigating Through Tested Files

Aug 4, 2009

I am new to flash. I am experiencing random (at least to me) errors (#1009) while navigating through my tested file. I can't reproduce them everytime. It only happens sometimes. Usually they occur after I have clicked back and forth between different pages (frames). Sometimes the error shows up once, and the file moves on as if nothing bad has happened. Sometimes the error continuosly displays, which really slows down the test.

One example of such:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at About28_fla::MainTimeline/clickResumeFromAbout()

The general structure of my file is this: I have pages laid out on separate frames with movieclips embedded within each other on the frames. Navigational movieclip buttons remain on essentially every frame. Three of them are: 'About', 'Contact', and 'Resume'. I wrote Listeners for each frame that go from that frame to any of the others. For example, to get from my 'Resume' frame from the 'About' frame, I wrote a Listener called 'clickResumeFromAbout', which is what the above error refers to.

The code in context:
mResumeGlow.addEventListener(MouseEvent.CLICK, clickResumeFromAbout);
function clickResumeFromAbout(e:MouseEvent):void {
mBoxAbout.gotoAndPlay(mBoxAbout.totalFrames-mBoxAbout.currentFrame);
mBoxAbout.addEventListener(Event.ENTER_FRAME, enterResume);
function enterResume(event:Event):void {
if (mBoxAbout.currentFrame == 150){
mBoxAbout.stop();
mBoxAbout.removeEventListener(Event.ENTER_FRAME, enterResume);
gotoAndStop("Resume");
}}}

However, the error above occurs when I click 'Resume' from 'Contact' (not from 'About' as the error states). It only occurs after I've been flipping between frames for a bit (I'm assuming I've clicked 'About' at some point).

View 5 Replies

Actionscript 3.0 :: Button Inside A Movie Clip, And Get The "1120" Error

Jul 24, 2009

I have a button inside a movie clip, and i get the "1120" error and says undefined blah blah... So the button doesnt work.

Basicly I have animated buttons and windows with tweenlite, The navigation bar has a products button, when you click it--it opens up a window, which is a movie clip because i want it to fade in with the tweenlite script. The products window has a button to open a window to a more specific category. the button in the window is pbtn02, which is on window01.

How do I make the button work? I keep getting the 1120 error.

Code: Select allimport gs.TweenLite;
btn06.addEventListener(MouseEvent.CLICK,f2);
function f2(e:Event){

[Code]....

View 1 Replies

ActionScript 3.0 :: Ignored When Movie Is Tested?

Mar 14, 2005

i have a 15 frame movie in flash cs4i have a bg layer comprised on inanimate movie clips (so that I can apply drop shadows to the objects)i have 4 layers of animated movie clips that have imbedded bone animations. when i say imbedded i mean that when i double click on them, i can access the bone animation. (i did this so that I can hold the bone animated object in a movie clip that i can apply a drop shadow)i have a hotspot layer that is a transparent rectangle so that when the user moves the mouse over this area, the timeline should play and animations startnow here is the actionscript:Frame 1:

stop();
hotspot.addEventListener(MouseEvent.MOUSE_OVER,animate_family);
function animate_family(e:MouseEvent):void{

[code].....

View 6 Replies

ActionScript 3.0 :: Why Does A Flash Movie Whose Frames Were Just Cut & Pasted On A New Frame Act Funny When Tested

Sep 15, 2011

Why is that whenever I cut a frame, clear the frames in a timeline, paste it in new frame then test the clip, the whole thing starts to act funny?I just don't understand why that happens - it's supposed to run smoothly though it's on a new frame, right? Is there a way to maintain the movie clip when tested though some frames were cut then pasted on a new frame?

View 3 Replies

Professional :: Sound Play One Time When The Movie Is Tested BEFORE The Mouse Is Even Over The Movieclip Object?

Apr 17, 2010

I am using Flash CS4. To illustrate, I created a new flash file and added a short tick sound to the library. I set the properties of the sound to export to Actionscript and named the class "overSound". I added a Movieclip object to the stage to represent a button and gave it an instance name of "overButton". On frame 1 of the main timeline I added the following code:

[Code]...

View 5 Replies

RemoveChild Not Working - 1120 Error?

Nov 2, 2009

I'm working on a simple presentation website in flash that imports swf-banners onto the main page. This works, but I need a backgroundcolor and a border so the banners aren't seethrough. So I create another graphic element that puts itself underneath. All this works, but when I try to write a button to remove the "child" it only removes the imported swf (loader) but it can't remove the box underneath - even if I remove the loader-child completely. I get a "1120: Access of undefined property Kant." error

CODE for buttons & loading the swf:
stop();var Xpos:Number=10;var Ypos:Number=230;var swf:MovieClip;var loader:Loader = new Loader();

[code].....

View 4 Replies

Professional :: Error 1172 And 1120

Jan 21, 2012

I'm VERY new to flash and have recently downloaded a flash photo gallery. It was advertised as CS3 and newer. 'm using CS4. It uses AS3. I simply need to make a couple of design changes, but I'm getting errors when I go to publish the Fla.  All the folders and .as files seem to be in the right place and have the proper names. The gallery has been given good reviews and people seem to like it, so I'm assuming it's fine. Just probably something simple I'm missing. Is anyone able to help me through this?

[Code]...

View 21 Replies

ActionScript 3.0 :: Compiler Error #1120?

Jun 26, 2011

So I've been trying to build a kind of 'weapon generator' using Actionscript 3.0.Yesterday, after creating a large bunch of movieclips, I decided to create a seperate scene where everything would be generated.The way I have it set up is by having each part cycled through a button click (forward and backwards with code to handle just that)The different weapon parts are:StockReciever

Handle
Trigger
Magazine

[code]......

View 2 Replies

ActionScript 3.0 :: Getting Error 1120 Within A Movieclip

Dec 31, 2011

I've created a MovieClip called "GameButtons" and I've given it a class that goes by the same name (gamepley.GameButtons). Within "GameButtons" I have a few other buttons. One button in this movieclip is used as a toggle that moves the timeline foward a frame to show a different set of buttons. Its called "UnsheathBTN" but for the life of me I can't get the class to access it. I've set the instance name and quadruple checked the code. Here's the code in the GameButton class.

ActionScript Code:
package gameplay
{
import flash.display.MovieClip;
import flash.events.Event;

[code]....

View 2 Replies

ActionScript 3.0 :: Error 1120 With Letters But Not Numbers?

Feb 19, 2012

I'm using an array to create a level. When I use numbers in this array, such as in the code below:

Actionscript Code:
if(lvlArray[i] == 1){  //mcCastleWall    var newPlacement1:mcCastleWall = new mcCastleWall(); 

[code].....

View 1 Replies

ActionScript 3.0 :: Error 1120: Undefined Property

Jun 4, 2009

I am not able to figure this one out, it seems quite obvious, but I have checked all my instance names, and they are correct. I am just trying to make a button play its open animation when the hit state is moused over, and i keep being told that my button is not defined...
 
btn_aboutH.addEventListener (MouseEvent.MOUSE_OVER, aboutOver);function aboutOver (e:MouseEvent):void{    btn_about.gotoAndPlay ("aboutOver");}

View 9 Replies

Flash :: Error 1120 After Extending A Class

Dec 29, 2011

I don't how to describe the situation in short, so I am going to describe it in details.

I have created a class, extended from MovieClip. It looks like this:

// Libraries are imported
public class WindowObject extends MovieClip {
public function WindowObject():void {
dragArea_mc.addEventListener(...);

[Code]...

When I clicked on the errors, they redirected me to the WindowObject class.If I don't create new classes, but just write the additional functions on the MovieClip directly, and set back the base class to be WindowObject, it works fine again.

View 2 Replies

ActionScript 3.0 :: Random Loading Mcs --1120 Error?

Sep 16, 2009

I keep getting an 1120 actionscript error for this code

var banners:Array = new Array(mc1,mc2,mc3);
var num:Number = Math.floor(Math.random()*3);
mc.load(banners[num]);

[code]........

View 3 Replies

ActionScript 3.0 :: 1120 Error With Multiple Variables?

Mar 18, 2011

I am getting multiple "access of undefined property" (1120) errors. The code that throws the error is inside a class. From the main timeline, I'm calling a function from within that class (it's a static function) it goes something like this -

Code:
SoundPlayer.playSound()
In the SoundPlayer class, I declare a bunch of variables at the top like this:

[code].....

View 2 Replies

ActionScript 2.0 :: Wrote The _root.clip Part?

Sep 19, 2003

i know its something to do with how i wrote the _root.clip part.. im sure its a quick fix:this is on one:

onClipEvent (load) {
highMax = 100;
lowMax = 30;[code]....

and on the button that calls the function:

on (rollOver) {
_root.test = function() {
_root.test._alpha += speed;[code].....

View 14 Replies

ActionScript 1/2 :: Hen I Tested Out The Movie Again, Only The "test" Static Text Box Words  Show Up?

Feb 25, 2011

I have no  understanding of even the most basic concepts, put it that way. Anyway,  so I have 2 test boxes, one that is static and one that is dynamic. I  made the dynamic one first, and on the same frame, I put the AS: var random:Number = 100; What I do know is that flash now recognizes that whatever dynamic  text box with the variable label of "random" is a number. The output  should also be a #, and when you test out the movie, a 100 should be in  the dynamic text box that you just created, even though you don't see  this on the stage before testing. So I tested it out, and sure enough, a  "100" shows up. Next, I put another text box that is static, and I typed "test" in  it. (Without quotes) The two text boxes should have no relation, but  when I tested out the movie again, only the "test" static text box words  show up, and the 100 in the previously created text box is gone. I've  tried moving the text boxes to different places and changing variables  and such, but nothing works, as far as I know.

View 3 Replies

ActionScript 3.0 :: Error 1120: Access Of Undefined Property Air?

Sep 13, 2009

ir and I've found following code on the net:

code: var file = air.File.applicationStorageDirectory.resolvePath(" test.txt");
var str = "Hello.";
file.addEventListener(air.Event.COMPLETE, fileSaved);

[code]....

View 4 Replies

ActionScript 3.0 :: Simple RemoveChild Not Working - 1120 Error

Nov 2, 2009

I'm working on a simple presentation website in flash that imports swf-banners onto the main page. This works, but I need a backgroundcolor and a border so the banners aren't seethrough. So I create another graphic element that puts itself underneath. All this works, but when I try to write a button to remove the "child" it only removes the imported swf (loader) but it can't remove the box underneath - even if I remove the loader-child completely. I get a "1120: Access of undefined property Kant." error

CODE for buttons & loading the swf:

Code:
stop();
var Xpos:Number=10;
var Ypos:Number=230;

[code]....

Code for "resetting" page:

Code:
removeChild(Kant);
removeChild(loader);

I can't get it to work.

View 2 Replies

ActionScript 3.0 :: Error #1120: Access Of Undefined Property

Mar 2, 2009

I'm just getting started in Flash and actionscript 3.0 I keep getting these error#1120: Access of undefined property After typing in code exactly like it's telling me to do. I'm working on lesson 9 in the Adobe Classroom in a Book and I'm stuck.

View 1 Replies

ActionScript 3.0 :: 1120:Access Of Undefined Property Error?

Apr 12, 2009

I'll try and be clear about my problem. I'm working on a site and have a MovieClip, named "form" on the main timeline that I want to play when a button is clicked. I keep getting this error and it's driving me crazy, I'm obiously missing something. The button instance name is "sub_btn". Below is my code , it's the subscription button code, but not quite sure what's up, I'm not an actionscript guru but am gaining a small understanding of it.Also I have a close button on that movie clip is there a simple close script I can attach

stop();import flash.events.MouseEvent;var getHCSG:URLRequest = new URLRequest("http://www.houstonceliacs.org");var twitter:URLRequest = new URLRequest("http://www.dggrafix.com/glutenfree/twitter.html");

[code].....

View 19 Replies

ActionScript 3.0 :: Error 1120 When Exporting Flash AC3- Xml Gallery

Sep 16, 2009

while trying to exprot a xml supported flash (AC3) gallery I get the following error: Description: xmlLoader.load(new URLRequest("data/images.xml"));

View 6 Replies

Error Code 1120 Access Of Undefined Property

Nov 11, 2009

I am trying to build a click through gallery with small buttons that you click on and it switches the larger image out as you click through. I copied over a gallery I had successfully built with 10 images. The new gallery has 20 images. Basically the movie just runs continuously without being able to click on the thumbnails.

I am getting the following compiler errors Scene1 Layer 'actions', Frame 1, Line 42 1120:Access of undefined property btn11_btn Source - btn11_btn.addEventListener(MouseEvent.CLICK, showimage11); I get this for image 11 through 20

[Code]....

View 3 Replies

ActionScript 3.0 :: Error 1120 - Correct Format For Sub-nesting?

Nov 6, 2010

I have a slideshow (graphicsshow_mc) within a navigation menu (graphicsmenu_mc) - a movieclip nested in a movieclip.  There are previous / next buttons inside the slideshow that work correctly.
 
Example: prev_btn02.addEventListener(MouseEvent.CLICK, navBack02);function navBack02(event:MouseEvent):void {    gotoAndStop("deinonychus")}
 
The navigation menu acts like chapters for a DVD, and I want one button to always go to the beginning.  I copied the other code, but need it modified to reflect that it appears in the parent.

[Code]...

View 7 Replies

ActionScript 3.0 :: Error Msg 1120: Access Of Undefined Property

Mar 2, 2011

I'm doing a Flash banner that has clickTAG instructions from Google. The code they said to put on the button is:

[Code]...

View 3 Replies

Professional :: CS4 AS Error 1120 - Access Of Undefined Property

Jun 21, 2011

I am new to Flash but have been able to fumble my way through action scripts with a bit of help from old forum posts. What i have done so far: developed a little map with buttons to act as navigation for webpage, all worked fine with each button linking to a seperate page. What i need to do: i have new content which needs to be added, therefore i need another button. all went fine to insert the new button, name it, new layer etc. I have copied the exact same code for this button to work (just chaning the name) from the 7 other working buttons in the swf. The error i get is 1120: Access of undefined property wind. for the last line in below code:

[Code]...

View 9 Replies

ActionScript 3.0 :: Error 1120 When Creating Buttons From Images?

Jun 23, 2011

I have 3 images that are displayed sequentially. Image 1: layer 1 (frame 1 to frame 24), Image 2: layer 2 (frame 25 to 49), Image 3: layer 3 (frame 50 to 74).  The opacity of each image changes in its frames and and each image has a classic tween associated with it.  Pretty basic stuff.
 
On frame 1 of the first image I created a symbol that is a button, lets call it image1_btn.  On frame 50 of the third image I created a second button, lets call it image3_btn.I created an Actions layer as the first layer and wrote the following code:
  
image1_btn.addEventListener(MouseEvent.CLICK,onimage1Click);var image1link:URLRequest = new URLRequest("http://purplerosehome.com/shopping/spartina_449/page_1.aspx")function onimage1Click(event:MouseEvent):void{    navigateToURL(image1link);}  
image2_btn.addEventListener(MouseEvent.CLICK,onimage2Click);var image2link:URLRequest = new URLRequest("http://purplerosehome.com/shopping/le_cadeaux/page_1.aspx")function onimage2Click(event:MouseEvent):void{    navigateToURL(image2link);}  

[code]....

View 3 Replies

ActionScript 3.0 :: Error: 1120: Access Of Undefined Property?

Jul 26, 2011

I copied the required file to my root directory.I create a new layer as instructed, conveted the imported png files into symbol as movie clip and named them accordingly.last i created a new layer,opened the action panel and pasted the code below as required:

import com.greensock.*;
import com.greensock.easing.*;
function init():void

[code]......

View 6 Replies

ActionScript 3.0 :: Error 1120 Access Of Undefined Property?

Jul 26, 2011

how to correct this code error that was reported during a debug test run;1120 access undefined property tiles and slideCounter.I am learning from a very simple tutorial on how to write swipe-multitouch-gesture code where I can swipe 6 comic frames across the screen of a iphone.Here is the code.

package{
import flash.display.MovieClip;
import flash.ui.Multitouch;[code].........

I constructed the 6 frames into 1 signal frame (each frame is numbered 1 to 6 and each size 290x390 total 1980x390) using Gimp.org and saved it as a png file.

Imported comic strip on stage which was set at 320x480 FPS 40

All 6 frames are located on the Timeline layer 1.No other layers are used.

I center the comic strip using the Text Align tool control.The location of the each frame on the stage was set at x15 by y72.

View 9 Replies

ActionScript 3.0 :: 1120 Error - Add A Focus Event To A Text Box

Oct 16, 2011

I'm trying to add a focus event to a text box. For some reason the Focus_in works fine, but when I go to add the focus_out event it tells me that the name I am trying to assign to the listener is an undefined property???? of course it is I just created it and the one I created just before this for the same text box works just fine. here is the code: midTermGrade_txt.addEventListener(FocusEvent.FOCUS_IN, onFocusBevel);midTermGrade_txt.addEventListener(FocusEvent.FOCUS_OUT, offfocusbevel);As stated alread the first line of code works perfectly

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved