Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Error 1046



Hey Guys,

I think I have a simple problem. I have a package I am wanting to load into an FLA. I get two errors:

1046: Type was not found or was not a compile-time constant "Gallery"
1180: Call to a possibly undefined method "Gallery."

Here is the import AS I'm using:


ActionScript Code:
import AS.Packages.simple_gallery;var runGallery:Gallery = new Gallery();

and here's the package code I'm using:

ActionScript Code:
package As.Packages {import flash.display.Sprite;import flash.display.SimpleButton;import flash.display.MovieClip;import flash.display.Loader;import flash.events.Event;import flash.net.URLLoader;import flash.net.URLRequest;public class Gallery extends Sprite{protected var _data:XML;protected var _images:Array;//@prop container_mc:MovieClip - Empty MovieClip on stage to hold images//@prop left_btn:SimpleButton - left button to navigate left through stack of images//@prop right_btn:SimpleButton - right button to navigate right through stack of imagespublic function Gallery():void{init();}protected function init():void{var urlLoader:URLLoader = new URLLoader();urlLoader.addEventListener(Event.COMPLETE, dataLoaded, false, 0, true);urlLoader.load(new URLRequest("/XML/design_images.xml"));}protected function dataLoaded(e:Event):void{_data = new XML(e.currentTarget.data);_images = new Array(_data.photo.length());build();}protected function build():void{back_btn.addEventListener(MouseEvent.CLICK, traverseImage, false, 0, true);fwd_btn.addEventListener(MouseEvent.CLICK, traverseImage, false, 0, true);loadImage(0);}protected function loadImage( index:int ):void{if (_images[index]){replaceImage(_images[index]);return;} else{var loader:Loader = new Loader();loader.load(new URLRequest(_data.photo[index].img));_images[index] = loader;replaceImage(loader);}}protected function replaceImage( obj:DisplayObject ):void{while(container_mc.numChildren) container_mc.removeChildAt(0);container_mc.addChild(obj);}protected function traverseImage(e:MouseEvent):void{var index:int = _images.indexOf(container_mc.getChildAt(0));if (e.currentTarget == back_btn) index--;else if (e.currentTarget == fwd_btn) index++;index %= _images.length;if (index < 0) index = _images.length - 1;loadImage(index);}}}


I am thinking it has something to do with the runGallery part, as I don't think I've instanced that in the AS. What I have instancedon stage is the "back_btn, fwd_btn, and container_mc"

Any ideas? I'm kinda scratching my head over this one. Thanks!

-MP



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 06-24-2008, 02:59 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Strange Error - Temp.as - Error #1046
Hi all,

I am converting a project to AS3. However I get a stranger error :

**Error** ... emp.as : Line 1, Column 210 : [Compiler] Error #1046: Type was not found or was not a compile-time constant: List.
À€



The strange thing is that THERE IS NO FILE NAMED temps.as. I've searched everywhere. I know that I did not create any, so maybe Flash 9 does it. Anyone has got an idea about that?

Another strange thing is that after the error, instead of writing the code responsible for it, there is this 'À' which is actually followed by a square. I m a bit confused.

Please help, thanks

Strange Error - HELP : Temp.as - Error #1046
Hi all,

I am converting a project to AS3. However I get a stranger error :

**Error** ... emp.as : Line 1, Column 210 : [Compiler] Error #1046: Type was not found or was not a compile-time constant: List.
À€



The strange thing is that THERE IS NO FILE NAMED temps.as. I've searched everywhere. I know that I did not create any, so maybe Flash 9 does it. Anyone has got an idea about that?

Another strange thing is that after the error, instead of writing the code responsible for it, there is this 'À' which is actually followed by a square. I m a bit confused.

Please help, thanks

Error 1046:
I'm getting this error msg.


Code:
1046: Type was not found or was not a compile-time constant: gameOverMsgAnim.
for this line
..

Code:
var msgMc:gameOverMsgAnim = new gameOverMsgAnim;
I've got a .fla, a document class, and then a GameMain Class. The GameMain.as is in a classesAS3 folder and that classesAS3 folder is in the same folder as the .fla and document class files. I'm using "import classesAS3.*;" in my document class.

I've got a Mc in the library with it's class name as gameOverMsgAnim. but for some reason it gives me that error on that line, how do I get my GameMain class to "see" the gameOverMsgAnim which is in the library in the .fla?

1046 Error
Hello everyone,

I am new to AS 3 and I am having some major problems with just a simple script. I did find a posting related to this question in the archives but it didn't make any sense to me. I created a script that I copied from the Programming ActionScript 3 document provided by Adobe. The script is posted here:

package
{
public class Greeter
{
public function sayHello():String
{
var greeting:String;
greeting = "Hello World!";
return greeting;
}
}
}

Next I followed the instructions for creating the HelloWorld.fla file and entered this code: var myGreeter:Greeter = new Greeter();
mainText.text = myGreeter.sayHello("Bob");

I get a 1046 error. When ever I have to deal with the Package or an outside .as script I have problems. What in the world did these people do to screw up something so good? Can some one please just show me what I need to do to get an fla file to recognize and execute a .as file?

AS3 1046 Error
HI
Can anyone help me for this error

This is my code

import caurina.transitions.Tweener;

var tog =1;
this.b2.onRelease = function() {

if(tog == 0){
Tweener.addTween(b2,{_xscale:32, _yscale:29, _alpha:50, time:1});
Tweener.addTween(b2,{_x:300, _y:151, time:1,transition:"easeoutregular"});
tog= 1;
}
else if(tog==1)
{
Tweener.addTween(b2,{_xscale:260, _yscale:380, _alpha:100, time:1,transition:"easeoutregular"});
Tweener.addTween(b2,{_x:600, _y:368, _alpha:100, time:1,transition:"easeoutregular"});
//Tweener.addTween(b2,{_xscale:150, _yscale:150, _rotation:60,_alpha:100, time:1,transition:"easeoutquadric"});
//Tweener.addTween(b2,{_xscale:150, _yscale:150, _rotation:0, time:1});
b2.swapDepths(10);
tog=0;
}

};

where b2 is a movieclip and i have to apply transition fort the same


it shows the following errors


Tweener.as Line 947 1046 Type was not found or was not a compile-time constant void
Tweener.as Line 954 1046 Type was not found or was not a compile-time constant void
Tweener.as Line 967 1046 Type was not found or was not a compile-time constant void
Tweener.as Line 1046 1046 Type was not found or was not a compile-time constant void

Error 1046
I'm trying to write a new class and am getting this error:

1046: Type was not found or was not a compile-time constant: TimerEvent.

package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.utils.getTimer;


public class CustomClass extends MovieClip
{
public function CustomClass()
{
this.addEventListener(MouseEvent.ROLL_OVER, grow);
this.addEventListener(MouseEvent.ROLL_OUT, shrink);

}

private var growthTimer:Timer = new Timer(100);


private function grow(event:MouseEvent):void
{
growthTimer.addEventListener(TimerEvent.TIMER, growth);
}

private function shrink(event:MouseEvent):void
{
growthTimer.removeEventListener(TimerEvent.TIMER, growth);
growthTimer.addEventListener(TimerEvent.TIMER, shrinkage); }

function growth(event:TimerEvent):void
{
this.scaleX = 1.1;
this.scaleY = 1.1;
}

function shrinkage(event:TimerEvent):void
{
this.scaleX = .9;
this.scaleY = .9;
}
}
}

thanks for your help. I thought maybe I was not importing a class properly but I don't know what else I would need to import.

Error 1046 URLLoader
i have this code in my main program at the begining
and it produces the errors below but it works in isolation what can the problem be?

code

var myTextLoader:URLLoader = new URLLoader ();
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);

function onLoaded(e:Event):void {
trace(e.target.data);
}

myTextLoader.load(new URLRequest("mytxt.txt"));

Errors

1046: Type was not found or was not a compile-time constant: URLLoader.
1180: Call to a possibly undefined method URLLoader.
1180: Call to a possibly undefined method URLRequest.
thnaks andrew

Error #1046 - Possible Solution
Hi all,

I had a strange problem that was giving me a huge headache... I had a nicely working app, that stopped compiling when I refactored. I hadn't changed any of the code, just where it was located. I started getting a compiler error #1046, telling the class couldn't be found or wasn't a compile-time constant. I made sure that the class in question was properly imported and properly named, including package name, class name and file name. ...still no joy.

The problem, I discovered, is that when I moved my code to another FLA, I forgot (ok... I just didn't know) that my code depended on having the correct component in the Library.

e.g. I kept one of the following error messages:
1172: Definition fl.dataataProvider could not be found.
or
1046: Type was not found or was not a compile-time constant: DataProvider.

As a test, I created a new FLA and simply used an import statement to import the DataProvider class, as follows:

Code:
import fl.data.DataProvider;
Once I dropped a List Component in the library of the new FLA, everything worked fine.

I hope this helps anyone who encounters a similar problem.

Compiler Error 1046
Hi All,
I am sure just by the title of this that you will know that I am new to this. I can bet that this is a simple fix but for the life of me cannot figure it out. I am getting an error 1046 on the 3rd line and an error 1180 on the 7th, please help me
s_btn.addEventListener(MouseEvent.CLICK, goSer);
function goSer (e:MouseEvent):void {
var newSer:ServPage = new ServPage();
this.addChild(newSer);
newSer.x = -1.0;
newSer.y = 198.0;
}

Question About 1046 Error
I have an interface file that attaches some nav buttons from the Library like this:

(In the class definition)

Code:
private var nextButton_mc:NextButton;
private var prevButton_mc:PrevButton;
(in the constructor)

Code:
nextButton_mc = new NextButton;
nextButton_mc.x = 486.0;
nextButton_mc.y = 490.0;
addChild(nextButton_mc);

prevButton_mc = new PrevButton;
prevButton_mc.x = 406.0;
prevButton_mc.y = 490.0;
addChild(prevButton_mc);
This all works fine in the interface, the problem is that when I publish the movies that are embedded in this interface I get a compile-time constant error referring back to the interface's class:

1046: Type was not found or was not a compile-time constant: NextButton.
1046: Type was not found or was not a compile-time constant: PrevButton.

So I finally figured out that I have to import the two nav buttons into the other movies' libraries so that they know about these classes. It seems kind of crazy though. Can someone explain to me why this is necessary? The nav buttons are not used within the embedded movies.

Error 1046 Out Of The Ordinary...
Hey all, i'm currently receiving a weird error, and i think I know why. but have no idea how to solve it, wondering if anyone would shed any light on this situation.

I have a framework im using, which has a preloader which passes flashvars into the main swf once loaded, I then call an external class which adds elements to the stage and aligns them.

The items have the linkage set, to app.display.[mc name], this was working completely until i added the function from the preloader to call the function in the main doc class.

I think the linkage is incorrect as everything was perfect before I called the function from the preloader.

This bug is confusing and annoying, but i think it's something simple that once you know you never forget.

Thanks

Error 1046 Out Of The Ordinary...
Hey all, i'm currently receiving a weird error, and i think I know why. but have no idea how to solve it, wondering if anyone would shed any light on this situation.

I have a framework im using, which has a preloader which passes flashvars into the main swf once loaded, I then call an external class which adds elements to the stage and aligns them.

The items have the linkage set, to app.display.[mc name], this was working completely until i added the function from the preloader to call the function in the main doc class.

I think the linkage is incorrect as everything was perfect before I called the function from the preloader.

This bug is confusing and annoying, but i think it's something simple that once you know you never forget.

I have also attached a stripped down version of the problem

Thanks

Error 1046: Type Was Not Found...
When I try to compile my code below, I am getting the error 1046.

I'm not an OO guy with AS3 so I could use some help!

I'm using Flex Builder 3 Pro for what it's worth.

And what I *want* to do - is extend the email validation class and add some code to it so that I see a tooltip throughout the time the user is typing in the box.


Code:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:ns1="*" verticalAlign="middle" horizontalAlign="center" currentState="Login"
xmlns:flexlib="http://code.google.com/p/flexlib/"
xmlns:ns2="flexlib.containers.*" xmlns:ns3="flexlib.controls.*" xmlns="*" xmlns:ns4="com.flexcapacitor.controls.*"
xmlns:iv="InstantValidators.*">
Of course, I do an import:


Code:
import InstantValidators.EMailValidator;
Definition that does *not* work:


Code:
<iv:EMailValidator
id ="emailValidator"
trigger="{username}"
triggerEvent="change"
source="{username}" property="text"
/>
Change it to:


Code:
<iv:EMailValidator />
which compiles with no problem.

And finally, my package:


Code:
package InstantValidators
{
import mx.validators.Validator;
import mx.validators.ValidationResult;

public class EMailValidator extends Validator {

// Define Array for the return value of doValidation().
private var results:Array;

public function EMailValidator () {
super();
}

override protected function doValidation(value:Object):Array {

// Clear results Array.
results = [];

// Call base class doValidation().
results = super.doValidation(value);

// if there are errors then display it in a tooltip

// Create the ToolTip instance.
var pt:Point = new Point(value.x, value.y);
pt = target.contentToGlobal(pt);
var errorTip:ToolTip = ToolTipManager.createToolTip(value.errorString, pt.x + value.width + 5, pt.y) as ToolTip;
errorTip.setStyle("styleName", "errorTip");
errorTip.visible = true;

return results;
}
}
}
I have the code for package in a file called "EMailValidator.as" and it's located in a folder at the same level as my project.

Any ideas what might be wrong?

G-Man

Error 1046 When Getting BitMaps Via Loop
Hey all,
When I add bitMaps to a class from the library via a loop:


ActionScript Code:
public function unit() {
           
            for (var u:int=1; u<3; u++){
           
                        var getUnit:"c"+[u]=new "c"+[u] (0,0);
// "c1", "c2", "c3" etc. are classes of individual bitmaps in the library

            var putUnit:Bitmap=new Bitmap(getUnit);
           
            addEventListener(MouseEvent.MOUSE_MOVE, doMove);
            addEventListener(MouseEvent.MOUSE_DOWN, startMove);
            addEventListener(MouseEvent.MOUSE_UP, endMove);
           
            putUnit.width=putUnit.width/2;
            putUnit.height=putUnit.height/2;
            putUnit.x=u*10
            putUnit.y=u*10
           
            addChild(putUnit)

            }
           
        }


I get Error 1046: Type was not found or was not a compile-time constant.


I think it has to do with the "c"+[u].
So, what is really causing this, and how can I get around the error -- or rather, How can I dynamically add about 100 bitmaps to a class from the library?'

Thx

Error 1046, Flash.filesystem
hello all

I have a flash project that I would like to port of AIR. All the syntax seems correct, but when I debug the code, I get Error #1046(something having to do with it not being a compile time constant) for the following code:


ActionScript Code:
package {
                          import flash.filesystem.*
                          import flash.event.*
                          import flash.system.Capabilities
                          ...}
This code is a separate *.as file as the document class

Any help with this is much appreciated.

I have the Air runtime, Flash CS3, and the AIR update for Flash all installed.

How Can I Resolve Compiler Error:1046?
I have the following actionscript when I test run it, I keep getting the following compiler error for Line 15 which is protected var ulXML:URLLoader;
1046: Type was not found or was not a compile-time constant: URLLoader.
What have I done wrong here? How should I correct it?


ActionScript Code:
package {
    import flash.display.Loader;
    import flash.net.URLRequest;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import flash.display.Sprite;
    import flash.utils.*;
    import flash.events.*;

    public class RandomDisplay extends Sprite {
       
        protected var myTimer:Timer;
        protected var imageLoader:Loader;
        protected var urXML:URLRequest;
        protected var ulXML:URLLoader;
        protected var imageList:XMLList;
       
        public function RandomDisplay() {

            // Create a new Timer object with a delay of 500 ms
            myTimer = new Timer(1000);
            myTimer.addEventListener("timer", timedFunction);
            //readInXML();
           
            // Start the timer
            myTimer.start();

        }

        // Function will be called every 500 milliseconds
        protected function timedFunction(eventArgs:TimerEvent) {
            trace("Timer fired " + myTimer.currentCount + " times.");
            //loadImage();
        }
}
}

Help With Project And Function Error (1046)
Hi everyone, my first post.

Give you some background, I am not a newbie to flash, but like most, still trying to come to grips with AS3 and it's geekery. So bare with me.

My problem is, I am developing a flash menu for a website and I am fighting with errors and modified code borrowed from a working example of the effect im trying to create.

Here is a image of the menu itself pointing out errors and functionality i am trying to implement.



Problem 1) 1046: Type was not found or was not a compile-time constant: MouseEvent.

I am getting this error on a function for the menu items along the right hand top. The code is on the first frame of the main fla and not in an external as file. cant figure out why a simple function and event listener are creating these errors.

Problem 2) I would like to change the banner image ('background' movieclip) to a different layer when the slider is dragged to one of the 4 areas along the path. I cant figure out where to put this information in for the existing code (remember i had to borrow all the as from a tutorial with a working example of the slider).

Could somebody take a look at my files and post some help (solution, working code, tutorial or sanity?)

Ide really appreciate it, and thanks for looking!

http://www.deezine.ca/IDI/AS3Hslider.zip
(i am using a URL instead of the upload because its 300 k over the size limit)

- Ty

Error 1046 In A Class After Using Import
hmmmmm, I give up. I want to use some component controls inside a class I have coded. I have used
import fl.controls.RadioButton;
but then I get a compile time error "1046 type was not found or was not a compile-time constant: RadioButton" on the line
private var button1_rb:RadioButton

What do I do?

Class File Error 1046
Hi all, I am trying to write my first class file, been away from flash for so long now and im just starting with as3, I have a problem with this class file

I keep get an error

here is my class // it is in the same directory as my fla,swf











Attach Code

package {

public class preloadManager {

public function startPreload(swfFile){

var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preloadLoop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, preloadComplete);
l.load(new URLRequest(swfFile));

}//end startPreload

public function preloadLoop(e:ProgressEvent):void {

var perc:Number=e.bytesLoaded/e.bytesTotal;
percent.text=Math.ceil(perc*100).toString();

}//end preloadLoop

public function preloadComplete(e:Event):void {

removeChildAt(0);
percent = null;
addChild(l);

}//end preloadComplete

}//end class

}//end package


///in my fla i have


import preloadManager

var preload:preloadManager = new preloadManager();

preload.startPreload('123.swf');

1046 Error For Trace() On 2nd Partition
Hi,

My problem AS3 related only. I've Flash CS3 installed on C: partition (WinXP SP2). If I save an .fla for example to D: and then try to compile there, I get a 1046 error for a simple trace() function. I don't understand. If I develop on C: everything seems to be fine.

"1046: Type was not found or was not a compile-time constant: XML."

Is this some OS or AS3 level permission problem or should I reinstall Flash?

Help With Error 1046: Type Was Not Found...
i have defined a custom object in a .as file as follows:
Code:

package com.xl {

   public class Question {
      public var qText:String;
      public var qAsker:String;
      public var qAnswers:Number;
      public var qCat:String;
      public var qTimestamp:String;
      public var qURL:URLRequest;

      public function Question(PqText:String, PqAsker:String, PqAnswers:Number, PqCat:String, PqTimestamp:String, PqURL:String):void {
         qText = PqText;
         qAsker = PqAsker;
         qAnswers = qAnswers;
         qCat = PqCat;
         qURL = new URLRequest(PqURL);
      }

   }
}


i access this class in a test program as follows:
Code:

import com.xl.Question;

var q:Question = new Question("Text","Asker",5,"Cat","TS","http://www.google.com");

trace(q);



I get an error that says
1046 Type was not found or was not a compile-time constant: URLRequest.

I looks like when I create the an instance of Question, it doesn't know how to create a new URLRequest when the object is instantiated.

Help is appreciated greatly.

Error 1046: Type Was Not Found Or Was Not A Compile-time Constant: Event.
Can someone please help with this. I am getting an error saying that Type was not found or was not a compile-time constant ... and I have no idea why.

It doesnt seem to like this line:
function LoadXML(e:Event)

... any help would be greatly appreciated


ActionScript Code:
package {
   
    import flash.display.MovieClip;
   
    public class DealerLocator extends MovieClip {
   
        public function DealerLocator():void {
            init()
        }
   
        public function init():void {
           
            var xmlLoader:URLLoader = new URLLoader();
            var xmlData:XML = new XML();
              
            xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
            xmlLoader.load(new URLRequest("dealers.xml"));
        }
               
        function LoadXML(e:Event) {
            trace("LoadXML")
            xmlData = new XML(e.target.data);
            displayDealers(xmlData);
        }
                       
        function displayDealers(dealerInput:XML) {
            var dealers:MovieClip = new MovieClip();
            dealers.x = dealers.y = 50;
            addChild(dealers)
           
            var dealer:acuraDealer = new acuraDealer();
           
            dealers.addChild(dealer)
            dealer.dealerName.text = "dealerName"
        }      
    }   
}

Error 1046: "type Was Not Found.." While Loading External .as File
I am trying to access a class "Loadxml" of an external package "xmltxt" in my main movie.
But I get error messages 1046: Type was not found or was not a compile-time constant: Event. If I comment out the event Listener I still get that 1046 error, now it is missing the constant URLLoader. What is going on? How do I make my xmltxt.LoadXML.as accessible?

I just finished the tutorial by Victor on AS3 and boldly wanted to use the same approach but it doesn't work!!

Thanks for any hints!

this is the code in my main document class:

Code:
package com.myCompany.documentClass{
import flash.display.MovieClip;
import com.myCompany.xmltxt.*;

public class DocumentClass extends MovieClip {
private var _XMLContent:Loadxml;
public function DocumentClass() {
trace("Document CLass instantiated");
_XMLContent= new Loadxml();
addChild(_XMLContent);
}

}

This is the code that I am trying to access.

Code:
package com.myCompany.xmltxt{
import flash.display.MovieClip;

public class Loadxml extends MovieClip {
var allTxt:XML = new XML();
var xmlLoader:URLLoader;

function Loadxml() {

trace("LoadXml is initialized");
//specify the location of the external XML
var urlRequest:URLRequest=new URLRequest("testxml.xml");
///create object to load external data using the built-in class URLLoader
xmlLoader=new URLLoader();
//Register to be notified when the XML finishes loading
xmlLoader.addEventListener(Event.COMPLETE, completeListener);
//Load the XML
xmlLoader.load(urlRequest);
}

function completeListener(e:Event):void {
allTxt = new XML(e.target.data);
trace(allTxt.toXMLString());

}
}
}

Keep Getting A "1046: Type Was Not Found.." Error HELP
Hi i am trying to code a new portfolio website of mine in FLASH CS3 using Actionscript 3 and i want the content to appear gradually when the user presses one of the buttons. I wanted to do this by changes the aplha gradually to all the content to slowly emerge, however when i am trying to run a test on the first button i keep getting this error"1046: Type was not found or was not a compile-time constant: Void." and that appears 3 time in the error window one error for the 3 different parts of the code. I have posted my code below and hopw you can help.

Also i was wondering if any one new how to make it so when the user clicks on another button the site would 1st slowly make the current content disapear and then make the new content slowly appear. thanks.

ERRORS:
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.


Code:
stop();
webCent.alpha = 0;
var targetAlpha:Number = 1;

bttn1.addEventListener(Event.CLICK, bttn1Click);

function bttn1Click(evt:MouseEvent):Void{

addEventListener(Event.ENTER_FRAME, fading);

function fading(evt:Event):Void{

webCent.alpha += ( targetAlpha - webCent.alpha) * easing;

}

}

Keep Getting A "1046: Type Was Not Found.." Error HELP
Hi i am trying to code a new portfolio website of mine in FLASH CS3 using Actionscript 3 and i want the content to appear gradually when the user presses one of the buttons. I wanted to do this by changes the aplha gradually to all the content to slowly emerge, however when i am trying to run a test on the first button i keep getting this error"1046: Type was not found or was not a compile-time constant: Void." and that appears 3 time in the error window one error for the 3 different parts of the code. I have posted my code below and hopw you can help.

Also i was wondering if any one new how to make it so when the user clicks on another button the site would 1st slowly make the current content disapear and then make the new content slowly appear. thanks.

ERRORS:
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.


Code:
stop();
webCent.alpha = 0;
var targetAlpha:Number = 1;

bttn1.addEventListener(Event.CLICK, bttn1Click);

function bttn1Click(evt:MouseEvent):Void{

addEventListener(Event.ENTER_FRAME, fading);

function fading(evt:Event):Void{

webCent.alpha += ( targetAlpha - webCent.alpha) * easing;

}

}

Yet Another 1046 Help
Hello,

I'm new to AS 3.0 and I've been thru several other posts in the forum but i can't seem to figure this out.

I created a fla with the following code.


ActionScript Code:
import pixSoundCropper;

var movie:pixSoundCropper = new pixSoundCropper("http://127.0.0.1/numb.mp3");

Then I have a file with the following:


ActionScript Code:
package
{
       import fl.display.MovieClip;
       import fl.controls.Slider;
       import fl.controls.Label;
       import fl.events.SliderEvent;
       import flash.media.Sound;
       import flash.net.URLRequest;

       public class pixSoundCropper extends MovieClip
       {
               private var _sndPos:Number;
               private var _mp3url:String;
               private var _urlReq:URLRequest;
               private var _ss:Slider = new Slider();
               private var _se:Slider = new Slider();
               private var _snd:Sound;

               public function pixSoundCropper(url:String)
               {
                       // Assigns MP3 URL
                       _mp3url = url;
                       _urlReq = new URLRequest(_mp3url);
                       _snd = new Sound(_urlReq);

                       // Creates SliderEnd Object
                       _se.move(50,170);
                       _se.width = 200;
                       _se.snapInterval = 0;
                       _se.tickInterval = 1;
                       _se.maximum = 100;
                       _se.minimum = 0;
                       _se.value = 29;
                       _se.liveDragging = true;

                       _se.addEventListener(SliderEvent.THUMB_DRAG, moveLinkedSE);

                       // Creates SliderStart Object
                       _ss.move(50,150);
                       _ss.width = 200;
                       _ss.snapInterval = 0;
                       _ss.tickInterval = 1;
                       _ss.maximum = 100;
                       _ss.minimum = 0;
                       _ss.value = 0;
                       _ss.liveDragging = true;

                       _ss.addEventListener(SliderEvent.THUMB_DRAG, moveLinkedSS);
               }

               private function sndPlay():void
               {
                       _snd.play();
               }

               private function moveLinkedSS(ss:SliderEvent):void
               {
                       var tmp:Number = _se.value - ss.value;

                       if (tmp < 29)
                       {
                               _se.value = ss.value + 29;
                       }
                       else
                       {
                               _se.value = ss.value + 29;
                       }
               }

               private function moveLinkedSE(ss:SliderEvent):void
               {
                       var tmp:Number = _ss.value - ss.value;

                       if (tmp < 29)
                       {
                               _ss.value = ss.value + 29;
                       }
                       else
                       {
                               _ss.value = ss.value + 29;
                       }
               }
       }
}
The package file has been in a lot of different directories, including com.pixSoundCropper, but no matter where i specify the include path for the file, all i ever get is the following error:

1046: Type was not found or was not a compile-time constant: SliderEvent.
1046: Type was not found or was not a compile-time constant: SliderEvent.
5000: The class 'pixSoundCropper' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.

Could someone please point out what i'm doing wrong or how to fix what is wrong with this?

Thank you in advance.

Yet Another 1046
Can anybody help me to complete movie?
http://mkiev.com.ua/as3_stud.rar

What the problem? can't understand

the original movie http://mkiev.com.ua/main_eng.swf

Thx

1046 From Other Swf
1046: Type was not found or was not a compile-time constant: RectangleParticle.

This is a error that I get. I know why, but I don't know how to fix like I want.

I create a swf that have a class. This class have a metod like this:

public function createSomeThing() {
return new someThing();
}

Simple. But in a another fla, I wont put like this:

var myObject:someThing = swfLoaded.createSomeThing();

I get that code. The soluction is:

var myObject = swfLoaded.createSomeThing();

But I want some form to do this and put intance of. Somebody help me?

Thanks and sorry about my english.

Dreaded 1046
function Example(pm:AnotherExample, scope:MovieClip, x:Number, y:Number, w:Number, h:Number)

Does anyone know why this would give me an Error 1046 for AnotherExample?

Problems 1046 (Actionscript 3.0)
I'm relatively new with Actionscript as a whole...


My coding doesn't seem to be working.


I'm trying to get a Timer to work on this flash file...

Basically, the timer counts 10 seconds, five times,and the movie clip named 'blueLecturePerson moves to the next keyframe 5 steps from it's previous keyframe'.

Iconfigured the timer to run once by the way.

Each key frame -- shows the movie clip change colour -- and the different colours for the icon reflects the 'mood' of the movie clip.


What I want to do also is to allowthe user to click on the movieclip to change the mood of the movie clip.

anyway... here it is.

var myTimer:Timer = new Timer(10000, 5); // 1 second(1000ms), x amount of times
myTimer.addEventListener(TimerEvent.TIMER, runOnce);
myTimer.start();

function runOnce(event:TimerEvent):void {




var varLP:int = 1;

blueLecturePerson = new blueLecturePerson();



function changetoblueLP (event:MouseEvent):void {
if(getTimer() == 10000){
gotoAndStop(1);
varLP = 1;
}
}

function changetogoldLP (event:MouseEvent):void {
if(getTimer() == 20000){
gotoAndStop(5);
varLP = 5;
}
}

function changetogreenLP (event:MouseEvent):void {
if(getTimer() == 30000){
gotoAndStop(10);
varLP = 10;
}
}

function changetoredLP (event:MouseEvent):void {
if(getTimer() == 40000){
gotoAndStop(15);
varLP = 15;
}
}

function changetoorangeLP (event:MouseEvent):void {
if(getTimer() == 50000){
gotoAndStop(20);
varLP = 20;
}
}

function changeLPcolour (event:MouseEvent):void {
if (varLP == 1) {
changetogoldLP;
stop();
}
else if (varLP == 10) {
changetoblueLP;
stop();
}
else if (varLP == 15) {
changetoorangeLP;
stop();
}
else if (varLP == 20) {
changetogreenLP;
stop();
}
}

blueLecturePerson.addEventListener(MouseEvent.CLIC K, changeLPcolour);
}

Please help me! Thanks.

Err 1046: Type Was Not Found...
I'm finding that Flash CS3 is buggy on OSX. Sometimes, when I compile an FLA, it will work fine, then a few minutes later, the same file will give me errors. I was wondering is anyone running Flash CS3 on OS X 10.4.* would be so kind as to check it and see if you have the same experience. An easy test would be to follow the tutorial on LiveDocs, and see if it works for you... it's a simple "Hello World!" tutorial and only takes a few minutes...

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000035.html

For this tutorial, I get the following errors sometimes and not other times:

1046: Type was not found or was not a compile-time constant: Greeter
1180: Call to a possibly undefined method Greeter

If anyone has any ideas about why this might be occuring, your suggestions are welcome, but since it's intermittent, I fear I've found another bug. Thanks in advance for your time and helpfulness.

1046: Type Was Not Found
I tried to insert a timer in an ActionScript file, but it came out wrong. More precisely, it gave this error:

1046: Type was not found or was not a compile-time constant: TimerEvent.

I'm not experiented it the rules of Object Oriented programming, so it is a bit hard to find the errors ...

- Kasper







Attach Code

package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;

// Create a new instance of the timer class
var myTimer:Timer = new Timer(500, 10); // every 0.5 sec. 10 times
myTimer.addEventListener(TimerEvent.TIMER, hopsa);

public class MinKnap extends MovieClip
{

// constructor function
public function MinKnap()
{
this.addEventListener(MouseEvent.MOUSE_OVER, grow);
this.addEventListener(MouseEvent.MOUSE_OUT, shrink);
}

private function grow(event:MouseEvent):void
{
myTimer.start();
}

private function shrink(event:MouseEvent):void
{

}

private function hopsa(event:TimerEvent):void
{
//this.scaleX *= 1.4;
trace("banan");
}


}
}

1046: Type Was Not Found
I've added a button with its actionscript to the Adobe Dynamic Video Player. The button and code worked in a different file , but now I get : 1046: Type was not found or was not a compile-time constant: MouseEvent. Please help.
Thanks!







Attach Code

package {
import flash.display.MovieClip;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import fl.controls.listClasses.CellRenderer;
import fl.controls.ScrollBarDirection;

public class VideoPlaylist extends MovieClip {
private var xmlLoader:URLLoader;

public function VideoPlaylist():void {
// Load the playlist file, then initialize the media player.
xmlLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, initMediaPlayer);
xmlLoader.load(new URLRequest("playlist.xml"));
// Format the tileList, specify its cellRenderer class.
tileList.setSize(200, 240);
tileList.columnWidth = 180;
tileList.rowHeight = 60;
tileList.direction = ScrollBarDirection.VERTICAL;
tileList.setStyle("cellRenderer", Thumb);
}

public function initMediaPlayer(event:Event):void {
var myXML:XML = new XML(xmlLoader.data);
var item:XML;
for each(item in myXML.vid) { // populate playlist.
// Get thumbnail value and assign to cellrenderer.
var thumb:String;
if(item.hasOwnProperty("@thumb")>0) thumb = item.@thumb;
// Send data to tileList.
tileList.addItem({label:item.attribute("desc").toXMLString(),
data:item.attribute("src").toXMLString(),
source:thumb});;
}
// Select the first video.
tileList.selectedIndex = 0;
// Listen for item selection.
tileList.addEventListener(Event.CHANGE, listListener);
// And automatically load it into myVid.
myVid.source = tileList.selectedItem.data;
// Pause video until selected or played.
myVid.pause();
}


// Detect when new video is selected, and play it
function listListener(event:Event):void {
myVid.play(event.target.selectedItem.data);
}


//this is my button function code

sermonsAudio_btn.addEventListener(MouseEvent.CLICK,onSermonsAudioClick);

public function onSermonsAudioClick(event:MouseEvent):void {
var request:URLRequest = new URLRequest("sermons_audio.html");
navigateToURL(request, "");


}
}
}

Err 1046 Type Not A Compile-time Constant
Man this one on my last nerve with this project. If anyone could help me figure this one out I'd really appreciate it


ActionScript Code:
// reposition reflection as tweening
        private function updatePos(p:Cube):void
        {
            if (reflection)
            {
                var ref:Plane = p.extra.ref;
                ref.x = p.x;
                ref.z = p.z;
                ref.rotationY = p.rotationY;    
            }
        }

its throwing the error: "private function updatePost(p:Cube):void" but this is the only way I can think of writing this. Its intended to display a reflection for a rotating graphic, like the iPod effect.

1046: Not A Compile-time Constant: TimerEvent.
I know this is simple but I just cannot see what I am doing wrong
it is in reference to "public function moveClip(event:TimerEvent):void {"
any help is appreciated .
my code is attached

thank you







Attach Code

//spacecraft Class
package {
///Import Classes
import flash.display.MovieClip;
import flash.events.Event;
import flash.ui.Keyboard;
import flash.events.KeyboardEvent;
import flash.TimerEvent.Event;

// MAIN CLASS STRUCTURE
//extending the movieClip class
public class Shiptest extends MovieClip {
//PROPERTIES ( just like initial objects)
private var rv:Number =0;
private var thrust:Number =0;
private var xv:Number =0;
private var yv:Number =0;
private var rightDown:Boolean = false;
private var leftDown:Boolean = false;
private var speed:Number = 10;
private var timer:Timer = new Timer(20);

//declare reference so it is in the class of the entire class
public var thrusterpower:Number=.2;
public var rotationSpeed:Number =5;

//CONSTRUCTOR METHOD (setting the stage )
public function Shiptest() {
trace( "New instance of ship created");



}
//METHODS (custom functions)
//
public function initializeShip():void {
this.x = stage.stageWidth/2;
this.y = stage.stageWidth/2;
this.addEventListener(Event.ENTER_FRAME, moveShip);
//stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDown);
//stage.addEventListener(KeyboardEvent.KEY_UP, KeyUp);

}
stage.addEventListener(KeyboardEvent.KEY_DOWN, downHandler);
stage.addEventListener(KeyboardEvent.KEY_UP, upHandler);

timer.addEventListener(TimerEvent.TIMER, moveClip);
timer.start();
private function downHandler(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.LEFT) {
leftDown = true;
}
if (event.keyCode == Keyboard.RIGHT) {
rightDown = true;
}
}
private function upHandler(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.LEFT) {
leftDown = false;
}
if (event.keyCode == Keyboard.RIGHT) {
rightDown = false;
}
}
public function moveClip(event:TimerEvent):void {
if (leftDown) {
this.x -= speed;
if (this.x < 0) {
this.x = 0;
}
}
if (rightDown) {
this.x += speed;
if(this.x > stage.stageWidth - mclip.width) {
this.x = stage.stageWidth - mclip.width;
}
}
event.updateAfterEvent();
}
}
}

























Edited: 03/22/2008 at 08:21:05 PM by mrMajk

1046: Type Was Not Found Or Was Not A Compile-time Constant
this is the code in my swf file


Code:
import net.quip.sound.CuePointEvent;

function onCuePoint(event:CuePointEvent):void {
play();
}
and this in my actionscript file


Code:
package net.quip.sound
{
//import flash.external.*;
import flash.events.Event;

public class CuePointEvent extends Event
{
// PROPERTIES
public static const CUE_POINT:String = "cuePoint";
public var name:String;
public var time:uint;

// CONSTRUCTOR
public function CuePointEvent(type:String, cuePointName:String, cuePointTime:uint, bubbles:Boolean = false, cancelable:Boolean = false)
{
super(type, bubbles, cancelable);
this.name = cuePointName;
this.time = cuePointTime;
ExternalInterface.call("showit",cuePointName, cuePointTime );
}

}
}
I get this error
1046: Type was not found or was not a compile-time constant: CuePointEvent.

any ideas? i have scratched my head all day with it

1046: Type Was Not Found Or Was Not A Compile-time Constant
Hi --

I am totally at a loss. I work on Flash CS3 on two different machines and I
am getting a "1046: Type was not found or was not a compile-time constant"
on one of the machines but not the other. I have a working movie that I
compiled into a SWF file on the first machine but the same FLA file will not
compile on the second machine. I have run all of the Adobe updates, etc. and
validated that the Flash Player versions on the machine are the same
(9.0.115). I can even run the compiled SWF from the first machine on the
second machine without any issue. Any ideas?

Thanks

Rich

1046: Type Not A Compile-time Constant: TimerEvent.
I have a simple space ship in an fla
have this .as file
but still getting the error
related to the line "public function moveClip(event:TimerEvent):void {"







Attach Code

//spacecraft Class
package {
///Import Classes
import flash.display.MovieClip;
import flash.events.Event;
import flash.ui.Keyboard;
import flash.events.KeyboardEvent;
import flash.events.TimerEvent.*;


// MAIN CLASS STRUCTURE
//extending the movieClip class
public class Shiptest extends MovieClip {
//PROPERTIES ( just like initial objects)
private var rv:Number =0;
private var thrust:Number =0;
private var xv:Number =0;
private var yv:Number =0;
private var rightDown:Boolean = false;
private var leftDown:Boolean = false;
private var speed:Number = 10;


//declare reference so it is in the class of the entire class
public var thrusterpower:Number=.2;
public var rotationSpeed:Number =5;
public var timer:Timer = new Timer(20);
//CONSTRUCTOR METHOD (setting the stage )
public function Shiptest() {
trace( "New instance of ship created");



}
//METHODS (custom functions)
//
public function initializeShip():void {
this.x = stage.stageWidth/2;
this.y = stage.stageWidth/2;
this.addEventListener(Event.ENTER_FRAME, moveShip);
stage.addEventListener(KeyboardEvent.KEY_DOWN, downHandler);
stage.addEventListener(KeyboardEvent.KEY_UP, upHandler)
timer.addEventListener(TimerEvent.TIMER, moveClip);
timer.start();
}




private function downHandler(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.LEFT) {
leftDown = true;
}
if (event.keyCode == Keyboard.RIGHT) {
rightDown = true;
}
}
private function upHandler(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.LEFT) {
leftDown = false;
}
if (event.keyCode == Keyboard.RIGHT) {
rightDown = false;
}
}
public function moveClip(event:TimerEvent):void {
if (leftDown) {
this.x -= speed;
if (this.x < 0) {
this.x = 0;
}
}
if (rightDown) {
this.x += speed;
if(this.x > stage.stageWidth -this.width) {
this.x = stage.stageWidth - this.width;
}
}
event.updateAfterEvent();

}
private function moveShip(eventObj:Event ):void {
// make the ship object out
this.rotation +=rv;
var angle:Number;
}
}
}

1046: Type Was Not Found Or Was Not A Compile-time Constant:
Hi All,
I'm very new to Flash CS3 and I'm attempting to teach myself ActionScript etc. I have been trying out some examples but when I try the following example of get errors:

articles.fla

Contains an empty file, ie no objects on the canvas and no imbedded AS.
Under the Properties -> Document Class I have entered "articles"

articles.as

Code:

import fl.controls.Button;

var myButton:Button = new Button();
addChild(myButton);
myButton.label = "Hello World";

When I attempt to compile and run the fla file I get 4 errors:

1046: Type was not found or was not a compile-time constant: String.
1046: Type was not found or was not a compile-time constant: String.
1046: Type was not found or was not a compile-time constant: Boolean.
1046: Type was not found or was not a compile-time constant: Boolean.

I'm not sure if my code is incorrect (copied straight from Adobe tutorials) or perhaps some other environmental setting(s) are missing etc.

Any advice would be helpful.

Regards,
Leigh.

1046: Type Was Not Found Or Was Not A Compile-time Constant:
Sorry if this has already been addressed, but I douldn't find anything when I tried to search.

I am getting an "1046: Type was not found or was not a compile-time constant: TweenListObj.

1046: Type Was Not Found Or Was Not A Compile-time Constant: Myobject_mc
Hi,

I am trying to use the tween class as follows

Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;

var myTween:Tween = new Tween(myobject_mc, "x", Elastic.easeOut, myobject_mc.x, 300, 3, true);
myTween.start();
and have a movie clip on my stage named myobject_mc. I have ticked the export for actionscript box and have the base class set to flash.display.MovieClip.

I am getting the following error:
1046: Type was not found or was not a compile-time constant: myobject_mc

In as2 I used to set the identifier to the name of my mc. Any ideas where I'm going wrong? I've checked out tutorials, threads and adobe docs but can't work it out. I assume this must be something pretty simple and new to as3

1046: Type Was Not Found Or Was Not A Compile-time Constant: MouseEvent.
ok I have this code that gives me an error and I would like it to work properly.

on actionpanel:

ActionScript Code:
var points:Array= [ new Point( 0, 100), new Point( 100, 150), new Point( 200,100) ];
var canvas:Sprite = new Sprite();
addChild( canvas );

canvas.addEventListener(MouseEvent.CLICK, addPoint);

drawCurve();

function drawCurve():void
{
    canvas.graphics.clear();
   
    for (var j:int = 0; j < points.length; j++)
    {
        canvas.graphics.beginFill(0xAA0000);
        canvas.graphics.drawCircle( points[j].x, points[j].y, 5 );
        canvas.graphics.endFill();
    }

    for (var i:int = 0; i < (points.length - 1) / 2; i++)
    {
        var index:int = i * 2;
        var curve:QuadBezier = new QuadBezier( points[index], points[index + 1], points[index + 2] );

        curve.draw( canvas.graphics, 5, 3);
    }
}

function addPoint(e:MouseEvent):void
{
    var newP1:Point = new Point(e.stageX, e.stageY);
    points.push( newP1 );

    points.sortOn( "x", Array.NUMERIC );

    var index:int = points.indexOf(newP1);
    var partial:Boolean = Boolean( index % 2 );
    var curve:int = Math.floor( index / 2) - Number(!partial);
   
    var p1:Point = points[ curve * 2 ];
    var p2:Point = ( partial ) ? points[ curve + 1] : points[ curve + 2];
    var p3:Point = points[ curve * 2 + 3 ];
   
    var delta:Number = 0.5;
    delta += (partial) ? .25 : -.25;
    var newP2:Point = new QuadBezier( p1, p2, p3 ).interpolateCurve( delta );
   
    trace(points);
    points.splice(2 * ( curve + Number(partial)) + 1 , 0, newP2 );
    trace(points);
   
    drawCurve();
}

class:

ActionScript Code:
package {
    import flash.geom.Point;
    import flash.display.Graphics;
   
    public class QuadBezier
    {
        protected var _points:Array;
   
        public function QuadBezier( start:Point, control:Point, end:Point ):void
        {
            _points = [ start, control, end ];
        }
   
        public function interpolateCurve( t:Number ):Point
        {
            var binomialStart:Point = Point.interpolate( _points[1], _points[0], t );
            var binomialEnd:Point = Point.interpolate( _points[2], _points[1], t );
           
            return Point.interpolate( binomialEnd, binomialStart, t );
        }
   
        public function draw( gr:Graphics, detail:int, lineThickness:int = 1, lineColour:uint = 0x000000 ):void
        {
            gr.lineStyle( lineThickness, lineColour );
            gr.moveTo( _points[0].x, _points[0].y );
   
            for (var i:int = 0; i < detail; i++)
            {
                var p:Point = interpolateCurve( i / detail );
                gr.lineTo( p.x, p.y );
            }
   
            gr.lineTo( _points[2].x, _points[2].y );
        }
    }
}



my errors I get are:
- 1046: Type was not found or was not a compile-time constant: MouseEvent. (line 29 for Frame1)

- 5000: The class 'QuadBezier' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. (line 1 of Class)


thanks

1046: Type Was Not Found Or Was Not A Compile-time Constant: Shape.
I get the following error when running my code:

Code:
1046: Type was not found or was not a compile-time constant: Shape.
It brings me to this line which is soposed to make a empty rectangle:

Code:
var square:Shape;

1046: Type Was Not Found Or Was Not A Compile-time Constant: Event.
Hello,

I foudn some code during a tutorial that I believe will help me with my resizing capability for Flash CS3 however I keep getting an error no matter what I try to do in order to repair this.

1046: Type was not found or was not a compile-time constant: Event.

Can someone help me get past this error?

Thanks,

Wayne








Attach Code

package

{
import flash.display.MovieClip;
import flash.display.Stage;
import flash.display.StageQuality;
import flash.events.MouseEvent;
import flash.display.SpreadMethod;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.display.LoaderInfo;
import flash.display.InterpolationMethod;

public class NoScale extends MovieClip
{
public function NoScale()
{
stage.addEventListener(Event.RESIZE,onResize);
stage.align = "TL"; // Top left align the stage
stage.scaleMode = "noScale"; // items do not stretch to fit
}
public function onResize(event:Event):void{
// In the event call a method to move the items
// or, call each item here to be sized
oncall_mc = call_mc = phone_mc = onsite_mc = paybythejob_mc = computerguy_mc = scr_mc = servesrq_mc = keyboard_mc = SCRFix_mc.x = stage.width/2;
oncall_mc = call_mc = phone_mc = onsite_mc = paybythejob_mc = computerguy_mc = scr_mc = servesrq_mc = keyboard_mc = SCRFix_mc.y = stage.height/2;
oncall_mc = call_mc = phone_mc = onsite_mc = paybythejob_mc = computerguy_mc = scr_mc = servesrq_mc = keyboard_mc = SCRFix_mc.scaleX = stage.width * .5;
// ... etc
}
}
}

1046: Type Was Not Found Or Was Not A Compile-time Constant: String.
Can anybody help me to complete movie?
http://mkiev.com.ua/as3_stud.rar

What the problem? can't understand

the original movie http://mkiev.com.ua/main_eng.swf

**Error** TempInit : Line 1, Column 5 : [Compiler] Error #1084: Syntax Error: Expecti
Hi,

I'm trying to convert my AS2 project to AS3. I got rid of all errors but one :

**Error** tempInit : Line 1, Column 5 : [Compiler] Error #1084: Syntax error: expecting identifier before 45.
var 45:MovieClip;

I got no idea what tempInit is, and no where do I declare a variable called 45...

After searching the web for hours I am tired and thus asking for your help.

Thank you,

Error #2044: Unhandled IoError:. Text=Error #2032: Stream Error. Cannot Be Caught
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/LocalWorkspace/Simulation%20Platform/sim/assets/conversations/14/Maria/NPC_104.MRK


Hi all, I'm getting this error, and I damn well know why. Its because I'm trying to load a file that doesn't exist. But the thing is, I'm wrapping the code in a try catch, and I'm still getting the error. Also, I'm being told that the error is on this line:


ActionScript Code:
var loader:URLLoader = new URLLoader();

I need to do it this way because i know that some of the files I'm trying to load do not yet exist.

But what could possibly be wrong with this line? And either way, it should be caught by the try, catch. So, whats the problem?



ActionScript Code:
try {
        var loader:URLLoader = new URLLoader();
        loader.addEventListener(Event.COMPLETE, completeHandler);
       
            loader.load(new URLRequest(_filename));
        } catch (error:Error) {
            trace("DATA: loadAnimData(): Error loading lip synch data.");
        }

Error Message ? Error #2044: Unhandled IoError:. Text=Error #2032:
Can anyone give me any advise on why in safari 3 and firefox i am getting this error:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://www.nayomusic.com/music/1.mp3

URL: http://www.nayomusic.com/home

The error occurs when a any link is clicked on from within homepage

If anyone has got any idea why this error occurring then this would be much appreciated

Thanks

Jon

Error #2044: Unhandled IoError:. Text=Error #2032: Stream Error.
I'm trying to open a new centred window with a javascript in AS3, the code is working in the browser but when tested in flash I got this error:
"Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: javascript:void(newWin=window.open('http://www.actionscript.org','newWindow','width=500,heigh t=500,left=590,top=262.5'))"

This is the code that I'm using.

Code:
var resX:int = flash.system.Capabilities.screenResolutionX
var resY:int = flash.system.Capabilities.screenResolutionY

var winW:int = 500
var winH:int = 500

var winX:int = (resX/2) - (winW/2)
var winY:int = (resY/2) - (winY/2)

var jsCode:String = "javascript:void(newWin=window.open('http://www.actionscript.org'," + "'newWindow','width=" +winW + ",height=" + winH +"," +"left=" + winX +",top=" + (winY-winY/2) + "'))";


var urlLoader:URLLoader = new URLLoader()
urlLoader.load(new URLRequest(jsCode))
What is wrong becouse if you test a compiled .swf with this code in the browser a centred window opens.???

Copyright © 2005-08 www.BigResource.com, All rights reserved