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





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

Script Error In Simple Action MX
Hi,

Thank you for reading this.
In the Newbies department I was told to give a button the following script:

on rollOver{
myNums.gotoAndStop (2)
}
on rollOut{
myNums.gotoAndStop (1)
}

I can´t see anything wrong in the action, but Flash MX did:

"Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: '(' expected
on rollOver{

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 4: '(' expected
on rollOut{"

Can anyone find the error??
Thank you for answering.

Happy Flashing!
// ikaros

Simple Error Opening URL Error Message?
Hey All,

I'm sure this is a really easy question but why does this happen when testing the movie?

I have set the permission to read and write but for some reason there is an error opening the file why does this happen and what do I need to do to fix it?

thanks for you help

stefan

Simple Button, Needs Simple Action Script
Hi there,

I have made button in flahs mx. The over state of this button contains a short movie clip. My prblem is that I would like the button to remain on the down state on release (ie. once the user has released the mous button)instead of just going back to the over state as it does at present. Ideally I would like the button to go back to the up state on a second click.

I have pulled most of my hair out trying to put together the right bits of action script that would help me do this but to no avail, and having no time to learn action script properly I don't think I'll get there anytime soon on my own. Can anyone help me, pretty, pretty please ~?

Error In Action Help
Can anyone tell me whats wrong with this code:

<code on keyframe>
var selectedImage = 0; var imageList = new Array ("dendermonde/2990.jpg","dendermonde/2290.jpg");
</code on keyframe>

<code on a button>
on(rollover) { selectedImage = 0; imageholder.loadMovie(imageList[selectedImage]); };
on(rollout) { selectedImage = 1; imageholder.loadMovie(imageList[selectedImage]); };
</code on a button>

Action Error?
Hey all. I'm just running into an action problem (or so it seems) and I was wondering if ya'll might be able to help. Basically, I've got a button that sends the play head to a frame and at the end of that series of frames, there is a keyframe that send the playhead to 1 other series of frames before stopping. For some reason however, the playhead seems to ignore the action command to go to the 2nd set of frames and goes to frame 1 of the timeline instead. Any ideas? (sorry this might be really vague, but I don't think I can explain it any other way) haha.

Action Script Error
Code:
on (release) {
what_number = Number(random(7))+2;
tellTarget ("/random_number")
gotoAndStop(/:what_number);}
on (release) {
what_number = Number(random(11))+2;
tellTarget ("/random_number2")
gotoAndStop(/:what_number);}
on (release) {
what_number = Number(random(3))+2;
tellTarget ("/random_number3"){
gotoAndStop(/:what_number);
} if "random_number + random_number2 + random_number3 = 21"
gotoAndPlay(2);
end if}
)
any ideas? I want it to add the values of random_number, random_number2, and random_number3 and if they equal 21, go to frame 2


fla here http://www.angelfire.com/rock/sk8stuff/slot.fla
[Edited by chordmasta on 08-23-2002 at 06:02 PM]

Action Script Error
I bought this script. after i make changes to the text portion only and save, i get this when exporting to movie.

what is the fix? any ideas appreciated.
you can see the result here.


www.jetphotos.com/EARTH.htm



**Warning** Symbol=time_clock, layer=Body, frame=1:Line 1: Case-insensitive identifier 'date' will obscure built-in object 'Date'.
time_display = date();

Total ActionScript Errors: 1 Reported Errors: 1

Action Scrip Error
Sorry, i am a rookie. posted this in the newbie area but if only newbies like myself see it then i will never get help. 1

I bought this script. after i make changes to the text portion only and save, i get this when exporting to movie.

what is the fix? any ideas appreciated.
you can see the result here.


www.jetphotos.com/EARTH.htm



**Warning** Symbol=time_clock, layer=Body, frame=1:Line 1: Case-insensitive identifier 'date' will obscure built-in object 'Date'.
time_display = date();

Total ActionScript Errors: 1 Reported Errors:

Action Script Error
What is a boolean, I assume that the 0 is wrong here but what should it be changed with (false or true?).

**Error** Scene=Scene 1, layer=insSpotLightContainer, frame=1:Line 2: Type mismatch in assignment statement: found Number where Boolean is required.
_visible=0;

Total ActionScript Errors: 1 Reported Errors: 1



onClipEvent (load) {
_visible=0;
}

Error Msg On Button Action
i'm trying to just make a button take the viewer to another frame in my movie.
i've done the help tutorial and it only shows you how to load a url.

when publishing, i get this error msg:
**Error** Scene=Scene 1, layer=buttons, frame=29:Line 1: Statement must appear within on handler
nextFrame();

it was soooo easy in flash 4.0.
what step am i missing?
thanks in advance for your time.

Action Script Error =(
Hey guys, I appologise if i am posting in the wrong area of the site but hopefully some nice person will give me a helping hand =). The problem im having is with my actionscript, at first i thought it was me and i was typing incorrectly but now i believe it may be my Flash ( Macro Pro 8 ) as its very simple script cant see where i could of possibly gone wrong. So here you go .........

onClipEvent(enterFrame)(
_x = _root._xmouse;
_y = _root._ymouse;
)

And thats it. ( im using this for an example of my most current script but what im about to post next happens every time )




**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: '{' expected
onClipEvent(enterFrame)(

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: ')' expected
_x = _root._xmouse;

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 4: Unexpected ')' encountered
)

Total ActionScript Errors: 3 Reported Errors: 3

^^^^ Any Ideas? Does it with every project, is it me being a NooB or is my program just dead

Thankyou for your time.

[F8] Action Script Error's I Got
Can anyone fix my script so it gets none of these errors?



Action Script

Code:
function processInfo(message)
{
if (message != undefined)
}
var _loc4 = message.indexOf("INVALID EMAIL");
var _loc5 = message.indexOf("USER ALREADY EXISTS");
{
if (_loc4 != -1)
{
logIn_mc.error4.text = "Invalid Email";
} // end if
if (_loc5 != -1)
{
tResults.text = message;
if (_loc4 == -1)
{
_root.main_mc.gotoAndPlay("home");
} // end if
}
else
{
trace ("Error Receiving Data back");
} // end else if
} // End of the function
function passwordValidated()
{
var _loc2 = logIn_mc.pw_txt.text;
if (_loc2.length < 5)
{
return (false);
} // end if
for (var _loc1 = 0; _loc1 < aValidPasswords.length; ++_loc1)
{
if (aValidPasswords[_loc1] == _loc2.toLowerCase())
{
return (true);
} // end if
} // end of for
return (false);
} // End of the function
function emailValidated()
{
var _loc1 = logIn_mc.email_txt.text;
if (_loc1.length < 5 || _loc1.indexOf("@") == -1 || _loc1.indexOf(".") == -1)
{
return (false);
} // end if
return (true);
{
return (false);
} // end if
var _loc5 = _loc1.substr(0, 2);
var _loc2 = _loc1.substr(0, 4);
var _loc4 = _loc1.substr(0, 6);
if (_loc5 != "07" && (_loc2 != "4407" && _loc2 != "(0)7" && _loc2 !== "+447") && _loc4 != "+44(0)7")
{
return (false);
} // end if
return (true);
} // End of the function
function checkForm()
{
if (logIn_mc.firstName_txt.text.length == 0)
{
Selection.setFocus(logIn_mc.firstName_txt.text);
logIn_mc.error1.text = "Input data";
firstName = false;
}
else
{
username = logIn_mc.firstName_txt.text;
logIn_mc.error1.text = "";
firstName = true;
} // end else if
if (logIn_mc.surName_txt.text.length == 0)
{
Selection.setFocus(logIn_mc.surName_txt);
logIn_mc.error2.text = "Input data";
surName = false;
}
else
{
logIn_mc.error2.text = "";
surName = true;

} // end else if
if (!emailValidated())
{
Selection.setFocus(logIn_mc.email_txt);
logIn_mc.error4.text = "Invalid Email";
surName = false;
}
else
{
emailAddress = logIn_mc.email_txt.text;
logIn_mc.error4.text = "";
email = true;
} // end else if
if (!passwordValidated())
{
Selection.setFocus(logIn_mc.pw_txt);
logIn_mc.error5.text = "Invalid Password";
surName = false;
}
else
{
passcode = logIn_mc.pw_txt.text;
logIn_mc.error5.text = "";
pw = true;
} // end else if
if (firstName == true & surName == true & email == true & pw == true)
{
lvSend.username = username;
lvSend.emailaddress = emailAddress;
lvSend.passcode = passcode;
lvSend.sendAndLoad(serverFile, lvReceive, "POST");
} // end if
} // End of the function
stop ();
var serverFile = "Register-User.ashx";
var username;
var emailAddress;
var passcode;
var aValidPasswords = ["d9d5jj", "ah53q7", "73x55p", "99k36f", "z8r52y"];
var i = 1;
while (i <= 5)
{
this.logIn_mc["error" + i].autoSize = "right";
++i;
} // end while
var lvSend = new LoadVars();
var lvReceive = new LoadVars();
lvReceive.onData = processInfo;
var area = "home";
var navCFirst = true;
var run = true;
Selection.setFocus(logIn_mc.firstName_txt);
logIn_mc.submitBtn_mc.onRelease = function ()
{
checkForm();
ga.executeLater(100, this);
};
var ga = function ()
{
getURL("javascript:urchinTracker('/Main Page/Connect');");
};
mcTerms._visible = false;
logIn_mc.tTerms.onRelease = function ()
{
getURL("javascript:urchinTracker('/Main Page/Terms');");
mcTerms._visible = true;
};
mcTerms.mcClose.onRelease = function ()
{
mcTerms._visible = false;
}


Errors

**Error** Symbol=sprite 477, layer=Action Layer, frame=44:Line 4: Unexpected '}' encountered
}

**Error** Symbol=sprite 477, layer=Action Layer, frame=44:Line 2: Statement block must be terminated by '}'
{

**Error** Symbol=sprite 477, layer=Action Layer, frame=44:Line 156: Syntax error.
}

Total ActionScript Errors: 3 Reported Errors: 3

frame 75

[CS3] Action Script ERROR
Okay, so I am having an issue getting a button to connect with a page on a website I am building. I went into the action bar and worked with the script that I forgot how to use and worked it a bit more and found one of mistakes I forgot to put in was {_root}; before going into the behavior bar. But now I get a different, but less complicated looking error than before. Still don't know what it means...


This is the action script I put in:

on (release) {_root
//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("Home");
//End Behavior
};


it is having a problem with the }; It says...


Location ----> Scene=Scene 1, layer=HomeButton, frame1, Line 5
Description ----> Statement must appear within on handler
Source ----> };


So if anyone knows what that means??? I am totally baffled.

[F8] Action Script Error
please help me -

i need to hand upload my website before midnite (UK time) and my flippin buttons dont work i got 24 script errors like

**Error** Scene=Scene 1, layer=Layer 4, frame=5:Line 2: String literal was not properly terminated
gotoAndStop("music”);

**Error** Scene=Scene 1, layer=Layer 4, frame=5:Line 3: ')' or ',' expected
} theres more but i was told sorting out first errors can correct the following errors?? dunno

anyone out there

[F8] Action Scrip Error
Ok, here is the problem... I made a button and I wanted it to link. The problem arrose when I went to insert on (release) {

getURL("http://www.teacherclick.com", "_blank");

}


to my flash , I received an error **Error** Scene=Scene 1, layer=Layer 24, frame=30:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1o 0p0

Any advice would be appreciated
Thank you..

Action Script Error
I get this error when I check the syntax or try and publish it:

**Error** Symbol=page5, layer=Layer 2, frame=1:Line 1: Mouse events are permitted only for button instances
on (rollOver) {

**Error** Symbol=page5, layer=Layer 2, frame=1:Line 4: Mouse events are permitted only for button instances
on (rollOut, releaseOutside) {

**Error** Symbol=page5, layer=Layer 2, frame=1:Line 7: Mouse events are permitted only for button instances
on(release) {

I am trying to make a feedback messaging system where they type in their name, email, phone and message and hit "send" where it would send their message to our email.

this is what action script i have so far:
gotoAndPlay("s1");
}
on (rollOut, releaseOutside) {
gotoAndPlay("s2");
}
on(release) {
_parent.getURL("contact.php","_blank","GET");
_parent.name="Your Name:";
_parent.email="Your E-mail:";
_parent.phone="Your Phone:";
_parent.messae="Message:";

}



any suggestions would be helpful

Action Script Error
Hello,

I am new to action script. I use Flash 8 and action script 2.0. I want to create a dynamic phot slide show and keep getting the following syntax errors:

1. **Error** Scene=Scene 1, layer=actions, frame=110:Line 70: Operator '=' must be followed by an operand
if (success) {

2. **Error** Scene=Scene 1, layer=actions, frame=110:Line 71: Syntax error.
var photos:Array = new Array;

3. **Error** Scene=Scene 1, layer=actions, frame=110:Line 72: Syntax error.
photos = this.firstChild.childNodes;

Total ActionScript Errors: 3 Reported Errors: 3

Please help.

Thanks








Attach Code

// INITIALIZATION
stop();

import mx.transitions.Tween;
import mx.transitions.easing.*;

playBtn._visible = false;
holder.frame._alpha = holder.img._alpha = 0;
holder.frame._x = holder.frame._y = 0;
holder.frame._xscale = holder.frame._yscale = 5;

this.createTextField("thumbLoading", this.getNextHighestDepth(), 300, 350, 400, 200);
thumbLoading.embedFonts = true;
thumbLoading.antiAliasType = "advanced";
thumbLoading.multiline = true;
thumbLoading._quality = "HIGH";
thumbLoading.selectable = false;



// VARIABLE DECLARATIONS

var images:Array = new Array;//Holds URLs of Main Images
var dur:Array = new Array;//Holds Duration variable for automatic show
var thumbs:Array = new Array;//Holds URLs of thumbnail Images
var tcount:Number = 0;//Counting Variable for Thumbnails
var isPlaying:Boolean = true;//Keeps track of automatic advancing images

var z:XML = new XML ();
z.ignoreWhite = true;

var maskY:Number = 70;//Y coordinate for Scrolling Panel
var maskX:Number = 15;//X coordinate for Scrolling Panel
var thumbPad:Number = 5;//Pixel Space between thumbnails

var myTF:TextFormat = new TextFormat();
myTF.align = "center";
myTF.color = 0xFF8A00;
myTF.font = "Helvetica Condensed";
myTF.size = 21;

var whoIsOn:Number = 0;//Holds Index number of current image
var p1move:Boolean = false;
var p2move:Boolean = false;

var p1h:Number;//Holds height of Panel 1 calculated after thumbnails are all loaded
var p2h:Number;//Holds height of Panel 2 calculated after thumbnails are all loaded
var pt:Number;//Holds Top Coordinate for Panels calculated after thumbnails are all loaded
var speed:Number = 10;//Scrolling Speed


// SCROLLING PANEL SETUP

_root.createEmptyMovieClip("myPanel1", _root.getNextHighestDepth());//Creates myPanel1
_root.attachMovie("mask", "myMask1", _root.getNextHighestDepth());//Creates myMask1
_root.createEmptyMovieClip("myPanel2", _root.getNextHighestDepth());//Creates myPanel2
_root.attachMovie("mask", "myMask2", _root.getNextHighestDepth());//Creates myMask2
myPanel1._y = myMask1._y = myPanel2._y = myMask2._y = maskY;//Sets all 4 to Y coordinate
myMask1._x = myMask2._x = maskX;//Sets Masks to proper X coordinate
myPanel1._x = myPanel2._x = (maskX-100);//Sets Panels to X coordinate outisde of Mask

myPanel1.setMask("myMask1");
myPanel2.setMask("myMask2");



// XML PARSING AND THUMBNAIL SETUP

z.onLoad = function(success:Boolean) {
if (success) {
var photos:Array = new Array;
photos = this.firstChild.childNodes;
for (i=0; i<photos.length; i++) {
images.push(photos[i].attributes.images);
trace("Image#"+i+" = "+images[i]);//Remove once sucessfully checked
thumbs.push(photos[i].attributes.thumbs);
trace("Thumbnail#"+i+" = "+images[i]);//Remove once sucessfully checked
dur.push(photos[i].attributes.hold);
trace("Duration#"+i+" = "+images[i]);//Remove once sucessfully checked
}
loadThumb(tcount);

}
}

z.load ("list.xml");



// SLIDSHOW CONTROL BUTTONS

nextBtn.onRelease = function() {
isPlaying = false;
stopBtn._visible = false;
playBtn._visible = true;
whoIsOn++;
if (whoIsOn>=images.length) {
whoIsOn = 0;
}
swapImage1(images[whoIsOn]);
}
prevBtn.onRelease = function() {
isPlaying = false;
stopBtn._visible = false;
playBtn._visible = true;
whoIsOn--;
if (whoIsOn<0) {
whoIsOn = images.length-1;
}
swapImage1(images[whoIsOn]);
}
beginBtn.onRelease = function() {
isPlaying = false;
stopBtn._visible = false;
playBtn._visible = true;
whoIsOn=0;
swapImage1(images[whoIsOn]);
}
stopBtn.onRelease = function() {
isPlaying = false;
stopBtn._visible = false;
playBtn._visible = true;
}
playBtn.onRelease = function() {
isPlaying = true;
stopBtn._visible = true;
playBtn._visible = false;
whoIsOn++;
if (whoIsOn>=images.length) {
whoIsOn = 0;
}
swapImage(images[whoIsOn]);
}



// MAIN IMAGE MOVIE CLIP LOADER

var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mcl.addListener(mclL);

mclL.onLoadProgress = function(target,loaded,total) {
holder.theText._alpha = 100-(Math.round((loaded/total) * 95));
holder.theText.text = "Loading "+Math.round((loaded/total) * 100) + "%";
}

mclL.onLoadInit = function() {
holder.theText.text = "";
if ((holder.frame._width<>holder.img._width) || (holder.frame._height<>holder.img._height)) {
var tw01:Tween = new Tween(holder.frame, "_width", Back.easeOut, holder.frame._width, holder.img._width, .5, true);
var tw02:Tween = new Tween(holder.frame, "_height", Back.easeOut, holder.frame._height, holder.img._height, .5, true);
var tw03:Tween = new Tween(holder.frame, "_alpha", None.easeNone, holder.frame._alpha, 100, .5, true);
var tw04:Tween = new Tween(holder.img, "_x", Back.easeOut, holder.img._x, -(holder.img._width/2), .5, true);
var tw05:Tween = new Tween(holder.img, "_y", Back.easeOut, holder.img._y, -(holder.img._height/2), .5, true);
var tw06:Tween = new Tween(holder.frame, "_x", Back.easeOut, holder.frame._x, -(holder.img._width/2), .5, true);
var tw07:Tween = new Tween(holder.frame, "_y", Back.easeOut, holder.frame._y, -(holder.img._height/2), .5, true);
tw07.onMotionStopped = function() {
var tw08:Tween = new Tween(holder.img, "_alpha", None.easeNone, holder.img._alpha, 100, .5, true);
tw08.onMotionStopped = function() {
if (isPlaying) {
loopImage1();
}
}
}
} else {
var tw09:Tween = new Tween(holder.img, "_alpha", None.easeNone, holder.img._alpha, 100, .5, true);
tw09.onMotionStopped = function() {
if (isPlaying) {
loopImage1();
}
}
}
}

function loopImage1() {
if (isPlaying) {
var tw12:Tween = new Tween(holder.img, "_alpha", None.easeNone, holder.img._alpha, holder.img._alpha, dur[whoIsOn], true);
tw12.onMotionStopped = function() {
if (isPlaying) {
whoIsOn++;
if (whoIsOn>=images.length) {
whoIsOn = 0;
}
swapImage(images[whoIsOn]);
}
}
}
}






// SEQUENTIAL THUMBNAIL LOADER

var tmcl:MovieClipLoader = new MovieClipLoader();
var tmclL:Object = new Object();
tmcl.addListener(tmclL);

function loadThumb(who) {
thumbLoading.text = "Loading Thumbnail
#"+(who+1)+" of "+thumbs.length;
thumbLoading.setTextFormat(myTF);
thumbLoading._alpha = 100-((who/thumbs.length)*100)
if (who<=(thumbs.length/2)) {
var t = myPanel1.attachMovie("b","b"+who,who);
if (p1move) {
t._y = (t._parent._height+thumbPad)
} else {
p1move = true;
}
} else {
var t = myPanel2.attachMovie("b","b"+who,who);
if (p2move) {
t._y = (t._parent._height+thumbPad)
} else {
p2move = true;
}
}
tmcl.loadClip(thumbs[who],t.timg);
t.numb = who;
t.tframe._alpha = 0;
t.onRollOver = function () {
this.tframe._alpha = 100;
}
t.onRollOut = t.onReleaseOutside = function () {
this.tframe._alpha = 0;
}
t.onRelease = function () {
isPlaying = false;
stopBtn._visible = false;
playBtn._visible = true;
if (this.numb<>whoIsOn) {
whoIsOn = this.numb;
swapImage(images[whoIsOn]);
}
}
}

tmclL.onLoadInit = function() {
tcount +=1;
if (tcount<thumbs.length) {
loadThumb(tcount);
}else {
removeMovieClip("thumbLoading");
p1h = myPanel1._height;
p2h = myPanel2._height;
pt = -(((p1h + p2h + thumbPad) - myMask1._height) - maskY * 2);
myPanel2._y = p1h+maskY;
var tw10:Tween = new Tween(myPanel1, "_x", Back.easeOut, myPanel1._x, maskX+5, 1, true);
var tw11:Tween = new Tween(myPanel2, "_x", Back.easeOut, myPanel2._x, maskX+5, 1, true);
tw11.onMotionStopped = function() {
myPanel1.onEnterFrame = scrollUp;
myPanel1.onRollOver = myPanel2.onRollOver = panelOver;
}
mcl.loadClip(images[0], holder.img);
}
}




// IMAGE SWAPPING FUNCTIONS



// PANEL SCROLLING FUNCTIONS

var a = myMask1.getBounds(_root);

function scrollUp() {
if (myPanel1._y<=pt) {
myPanel1._y = myPanel2._y+p2h+thumbPad;
}
if (myPanel2._y<=pt) {
myPanel2._y = myPanel1._y+p1h+thumbPad;
}
myPanel1._y -= 5;
myPanel2._y -= 5;
}

function panelOver() {
delete myPanel1.onRollOver;
delete myPanel2.onRollOver;
delete myPanel1.onEnterFrame;
myPanel1.onEnterFrame = scrollIt;
}

function scrollIt() {
if (myPanel1._y<=pt) {
myPanel1._y = myPanel2._y + p2h + thumbPad;
}
if (myPanel2._y<=pt) {
myPanel2._y = myPanel1._y + p1h + thumbPad;
}
if (myPanel1._y>=p2h+maskY + thumbPad) {
myPanel1._y = myPanel2._y - p1h - thumbPad;
}
if (myPanel2._y>=p1h+maskY + thumbPad) {
myPanel2._y = myPanel1._y - p2h - thumbPad;
}
ypos = (myMask1._ymouse-(myMask1._height/2));
myPanel1._y = myPanel1._y-(ypos/speed);
myPanel2._y = myPanel2._y-(ypos/speed);
if (_xmouse<a.xMin||_xmouse>a.xMax||_ymouse<a.yMin||_ymouse>a.yMax) {
delete myPanel1.onEnterFrame;
myPanel1.onRollOver = myPanel2.onRollOver = panelOver;
myPanel1.onEnterFrame = scrollUp;
}
}

Action Script Error
Hello everyone,
I'm trying to research an errr my wife is getting when she test her flash movie.

This is the error but everthng seems to be working fine.

Location = symbol=symbol 3, layer =button
Description = Mouse events are permitted only for button instances
Source = on (release) { Source: on (release) {
play();
}

Can anyone help with this?

Thanks
TextDescriptionText

Error: A 'with' Action Failed...
Error: A 'with' action failed because the specified object did not exist.

I'm doing attachMovie with a for loop. Most likely my problem is with with the depths I'm loading into, right? Could MM come up with an error mssg that gives you a little more f'ing information than this cryptic BS? Anyone with any suggestions will be my new best friend forever.

Action Script Error
hey guys i was watching a video tutorial on how to make a loader

(when a page loads)
but the image of his action script is fuzzy or juste wrong..lol

i get error on this


Code:

stop() ;
mask_mc._height = 1;
this.onEnterFrame = function():void (
var loadedData:Number = this.getBytesLoaded();
var allData:Number = this.getBytesTotal();
var percent:Number = Math.round(loadedData/allData*100);
mask_mc._yscale = percent;
if (loadedData>=allData) {
gotoAndStop(10);
delete this.onEnterFrame;
}
);

Generator Not Enabled...? I'm Getting An Error That Won't Allow An Action, Help?
"Scene=Scene 1, Layer=trial button, Frame=1: Line 1: Mouse events are permitted only for button instances
on (rollover) {

Generator is not enabled for this movie. Macintosh HD:01 KELLS Jobs:01 Working:03 - WB Colligo Site Launch:ColligoFEB5-navbar.swf

Action Scritpt Error (converting To AS 2.0)
Hey,
i have a function that originnaly was written (by Robert Penner) in AS 1.0 and worked fine. The deal is that i am trying to convert to AS 2.0 and i am getting an error. Please take a look at this function and let me know if you have any ideas. Thanks


Code:
Math.midLine = function(a, b) {
return {x:(a.x+b.x)/2, y:(a.y+b.y)/2};
};

Error - There is no property with the name 'midLine'.

Trying To Assign An Action To A Button, Keep Getting An Error
I can't figure out what keyframe, symbol, or whatever it is I need to actually add the action to. I want to add this code to a button:

on(release){
gotoAndPlay("Scene1",79);
}

Every time I do and try to test the movie, I am given this error:

**Error** Scene=Scene 1, layer=nav_music, frame=33:Line 1: Mouse events are permitted only for button instances
on(release){

Total ActionScript Errors: 1 Reported Errors: 1

I have no idea what I am doing wrong, especially because I was successfully able to implement this but 2 weeks ago.

Any ideas?

Action Script Import Error
this is action script 2.0

i have a as file that needs to be loaded and executed
the error im getting is " this class or interface 'javaScriptproxy' could not be loaded".
all the files are in place.

import com.macromedia.javascript.*;
var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);

Action Script Error - Help Required
Hi

I picked up an old flash file recently - probably coded in flash 5

but i use MX and when publishing I get the following error:


Code:

Symbol=Symbol 105, Layer=Action Layer, Frame=1: Line 32: ';' expected
_n2.maximum_word_length = -1.#INF00E+000;
The code around that line is:


Code:

var _n2 = this;
_n2.a_list = new Array();
_n2.maximum_word_length = -1.#INF00E+000;
Now I asked the guy I got it from and all he could tell me was that

-1.#INF00E+000

Is probably part of the old action scripting and ill have to find the new alternative

Is this true and if yes what would be the "new" substitute for the above?

Thanks

Action Script Syntax Error
why does this line give me a syntax error? it works in the sample code but not in my application

**Error** Symbol=page 1 cont 1, layer=Layer 1, frame=1:Line 5: Syntax error.
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();

Total ActionScript Errors: 1 Reported Errors: 1

AS:code below?

this.createTextField("my_txt", 1, 100, 100, 300, 100);
my_txt.multiline = true;
my_txt.wordWrap = true
my_txt.html = true;
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();

myStyle.onLoad = function(done){
if(done) {
var exampleText = "<p class='headline'>Tutorial Takes Forever To Write</p>";
exampleText += "<p><span class='byline'>Bath, UK</span>";
exampleText += "--Flash developer NWebb seemed to take ";
exampleText += "forever to finish his CSS-Flash tutorial, ";
exampleText += "but it is finished now and you can find it ";
exampleText += "<a href='http://www.nwebb.co.uk'>here</a> ";
exampleText += "along with a few others.</p>";
my_txt.styleSheet = myStyle;
my_txt.htmlText = exampleText;
} else {
trace("there was an error");
}
}
myStyle.load("example.css");

[F8] Button Action Script Error
Hi People

I have a maybe to you simple question.
I have buttons made up ..but now i want some action on each one of them.
i want to ad a large some of text ..Just by clickin on 1 of them.
I have 8 buttons ..and each button must show a different Text.

I know how to make it happen for one line.
I put it like this:

bottone01_mc.tasto_btn.onRelease=function(){
bottone01_mc.bloccaBtn_mc._visible=true;
bottone01_mc.tasto_btn.enabled=false;
bottone02_mc.bloccaBtn_mc._visible=false;
bottone02_mc.tasto_btn.enabled=true;
bottone03_mc.bloccaBtn_mc._visible=false;
bottone03_mc.tasto_btn.enabled=true;
bottone04_mc.bloccaBtn_mc._visible=false;
bottone04_mc.tasto_btn.enabled=true;
bottone05_mc.bloccaBtn_mc._visible=false;
bottone05_mc.tasto_btn.enabled=true;
bottone06_mc.bloccaBtn_mc._visible=false;
bottone06_mc.tasto_btn.enabled=true;
bottone07_mc.bloccaBtn_mc._visible=false;
bottone07_mc.tasto_btn.enabled=true;
bottone08_mc.bloccaBtn_mc._visible=false;
bottone08_mc.tasto_btn.enabled=true;
section_txt.text="kapsalon voor dames en Heren";
}
bottone01_mc.btn1_txt.text="A";
bottone01_mc.btno_txt.text="A";
bottone01_mc.btn2_txt.text="BUTTON A LABEL";

and the Text come's out fine, because its a smal sentance "Kapsalon voor Heren"

But how do i make it happen if i want a larger text like this for example:

"Heren Kapsalon en ook voor dames
and also for kids and for bla bla bla
bla bla bla bla bla...."

i want it to show beneat eachother and not having to type on long line of text only. does anyone have an idear.. or can anyone help.

God Bless

[CS3] Action Script 2.0 GetURL Error
Hello,

I've been working on a project that needs to have a link in the flash file that opens a new window to a specific size. Currently I'm using the following actionscript:


Code:
btn.onRelease = function() {

getURL("javascript:window.open('http://goldcreek.org/lads.html','linkname','height=450, width=600,scrollbars=no')");
};
Where btn is the instance name of the button I want to launch the new window.

It works well, it opens the page as I'd like it to, but it changes homepage as well to a blank screen that says "[object]" in it and that's it. How can I make this link not redirect the original page and only create a pop up window?

Thanks for your input.

Nathan

Error While Running Action Script In CS3
hi.... greetings to all... just started learning to use actionscript. I was practicing a small addition and subtraction code but when i run movie it gives me the following error message. I am using Flash professional 8

Please help me.....

Thanks


Attach Code

*Error** C:Documents and SettingsAdministratorLocal SettingsApplication DataMacromediaFlash 8enConfigurationClassesFP8TextFieldStyleShee t.as: Line 7: The name of this class, 'TextField.StyleSheet', conflicts with the name of another class that was loaded, 'TextField.StyleSheet'.
{

Total ActionScript Errors: 1 Reported Errors: 1


My code attached to the button:

on (release)
{
result=price*qty;
}

Pls help

Error In Action Script And Button
I have a page that i have designed for practice. i have three buttons on each page and have been tring to get them to link to the proper page/frame. For instance the button for ABOUT US should link to the second page/frame. The code i am using is as follows.
on (release) {gotoAndStop(2);

}
This should have it go to page/frame 2 and stop but when i test it it gives me this error.
Scene 1, Layer 'about', Frame 1, ... 1087: Syntax error: extra characters fou... on (release) {gotoAndStop(2);
I am using action script 1.0 & 2.0. I am not sure what to do.

Alpha Action Script Error
I would like to have several movie clips fade with action script instead of tediously tweening them all, but am having trouble. Action script is certainly not my strong point, maybe someone can spot what I am doing wrong, and explain in kindergarten terms?
I opened a new document, created an object, turned it into a movie clip, deleted it from the stage, drug it from the library back onto the stage and named it myAlpha in the MC instance name form. It is sitting in Layer 2. Then I attached the following script.

onClipEvent(load){
myAlpha=0;
this._alpha=myAlpha;
}
onClipEvent(enterFrame){
if (myAlpha <=100){
myAlpha=myAlpha +1;
this._alpha=myAlpha;
} else {
stop();
}

However when I test the movie I always get the following errors:

**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 5: Statement block must be terminated by '}'
onClipEvent(enterFrame){

**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 11: Syntax error.
}
Total ActionScript Errors: 2 Reported Errors: 2































Edited: 03/06/2008 at 01:43:06 PM by Ilkajb

Error With Game Action Script
Hi all,

Thanks to the kirupa forums I've finally learnt how to load external SWF's, however now i have a problem inside the actionscript of one the SWf's I'm loading.

The SWF is a game - Tetris. When Tetris is first loaded, it plays fine, but if another game is loaded and tetris is loaded again after, the 'Tetris blocks' and keypad controls become erratic. The script is done using variables and I think i need to add a second frame telling the variables to reset, or update after event - something to completely reset the actionscript to its state before the game is started.

Once I've solved this its an easy downhill bike ride to the finish line, so can anyone help?
I've attached the FLA. Its a simple file, with two buttons, with script connecting to two games: Tetris and Snakes. Play Tetris, then click on the second button to play Snakes, then click back onto Tetris to see the errors I'm referring to. Thanks in advance people!

Action Script Stuck Error
Hello Guys,

Can any one please tell me why the Action Script Stuck error occurs. To resolve that what can be done...?

Pelase let me know anyone.....

Thanks for your efforts..

Chethan

I Can't Solve An Action Script Error
Hi.


I'm making a Catalogue to be distributed on a CD, and I want to provide an elegant way to exit the Catalogue.
So I made a separate "exit.swf" movie to be loaded over the main catalogue movie.
it have a dark transparency and a goodbye message. Looks very good.
Also, at the same time I want that the background music fade out smoothly until the movie exits.
To achieve this I had put an event .wav sound on a frame at the begining of the movie, with an instance of a "back music" movie clip on the same frame.
Also I have this code on the same frame:


Code:
// create Sound object
globalsound = new Sound(); globalsound.setVolume(100);
If I wanted to fade out the background music, I only have to put this code before an exit frame:


Code:
// create Sound object
var snd:Sound = new Sound(music);
trace(music);
// start fade
this.onEnterFrame = function() {
// get current volume
var vol:Number = snd.getVolume();
// if volume is larger than 0, decrease it, otherwise stop fade
if (vol>0) {
snd.setVolume(vol-3);
} else {
delete this.onEnterFrame;
}
};

But, because I want that the "Exit" button do all the things, no mather were in the movie the user is, I thought I may put all the instructions on the same button.

So, I want the "exit" button to load the #exit.swf" movie and at the same time fade out the music and exit the movie.

I tryed the following code on the button:


Code:
on (release) {
loadMovieNum("imagens/exit.swf", 1);
}
// create Sound object
var snd:Sound = new Sound(music);}
trace(music);
{
}// start fade
this.onRelease = function();
// get current volume
}
var vol:Number = snd.getVolume();
{
}// if volume is larger than 0, decrease it, otherwise stop fade
if (vol>0) {
snd.setVolume(vol-3);
} else {
delete this.onRelease;
}
}

But it gives me one (1) error on Line 5.
I had spent hours making tests and I can't figure out what's wrong.
I'm not a Action Script guru; I only search for code and try to adapt to my projects.

Note that I changed the

this.onEnterFrame

to

this.onRelease


Could someone please help me to find the error?

Thank you

Flash Action Script Error
Im trying to make a button open the default e-mail program, i've done the following.


on (release) {

getURL(info@facetime.ltd.uk);


but when I test the movie I get this


**Error** Symbol=content contact info, layer=Layer 1, frame=1:Line 2: ')' or ',' expected

getURL(info@facetime.ltd.uk);



Total ActionScript Errors: 1 Reported Errors: 1


Would appreciate any ideas on how to solve this.


Nick McAuley.

Syntax Error On Button Action
I have 3 insances of the button component on stage.

They all are broadcasters and have been initialized.

I want them to broadcast an event and pass a variable along each time they are pressed.

This code is attached to frame of main timeline


ActionScript Code:
this.2_btn.onRelease = function(){
    broadcastMessage("onBtnPressed", 1);
}
_root.3_btn.onRelease = function(){
    this.broadcastMessage("onBtnPressed", 2);
}
4_btn.onRelease = function(){
    this.broadcastMessage("onBtnPressed", 3);
}


Now i'd really like to know why do i get these errors :


Code:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 11: Syntax error.
this.2_btn.onRelease = function(){

**Error** Scene=Scene 1, layer=actions, frame=1:Line 14: Syntax error.
_root.3_btn.onRelease = function(){

**Error** Scene=Scene 1, layer=actions, frame=1:Line 17: Syntax error.
4_btn.onRelease = function(){

I use flash 8 and AS2.

thanks for helping out

Action Script Error Help GetURL
ok im a new guy so dont go killin at me here. this is the scrip that went wak on me. i cant publish n e thing unless its right

Code:

getURL("http://www.extremedays.net/index.htm");



thanks, judson

Error: A 'with' Action Failed Because The Specified Object Did Not Exist.
i'm doing the exact process from the foundation flash MX book to load a different page/frame from a button, but on my own site:

on (release) {
with (_root.content) {
gotoAndStop("schedule");
}
}

i have my content instance labeled and the schedule frame labeled.

WHAT AM I DOING WRONG?!?! WHAT IS IT?!?!?

thanks for your help in advance

alec

Buttons Action Script Error ? I'm Lost
Hi,

I'm loading into flash, variables with php ,that were previously stored on a mysql database. Everything is running OK except for the number of the present entry when someone browses through all entries. It always shows the total entries number and not the number of the entry that is being showed.

To explain better with the image the number on the right show the total entries. When we click the left arrow button the number on the left should be 5,4,and so on... The problem is it stays in the same number, in this case the number 6.
I think that the problem is with the action script in the buttons, but I went through it several times and don't find any errors.

Here is the code for the left button:

Code:
on (release) {
_root.myN++;
if (_root.myN > _root.Records_txt.text) {
_root.myN = 0;
}
_root.Name_txt.variable = "arr_Name" add myN;
_root.Date_txt.variable = "arr_Date" add myN;
_root.From_txt.variable = "arr_City" add myN;
_root.Email_txt.variable = "arr_Email" add myN;
_root.URL_txt.variable = "arr_URL" add myN;
_root.Comment_txt.variable = "arr_Comment" add myN;
_root.Continent_txt.variable = "arr_Continent" add myN;
_root.x_txt.variable = "arr_fldX" add myN;
_root.y_txt.variable = "arr_fldY" add myN;
_root.xScroll_txt.variable = "arr_fldScrollX" add myN;
_root.yScroll_txt.variable = "arr_fldScrollY" add myN;
_root.civ_txt.variable = "arr_Civ" add myN;
//
_root.presentRec_txt.text = Number(_root.presentRec_txt.text) - 1;
if (Number(_root.presentRec_txt.text) < 1) {
_root.presentRec_txt.text = Number(_root.recCount_txt.text);
}
loadData();
checkMap();
}

Can some of you tell me what's wrong or teach me a better way of coding?

Tank you all,
Regards
Filipename

Opening DOC Files - Action Canceled Error
I am currently working on a CDROM which contains quite a number of lists of documents. Documents appear in separate listboxes, which use their "data" entries as the URL which is activated by means of the getURL command.

I have tried to use the fileReference.download method, yet without success locally.

One problem I cannot get rid of is the following: whenever I click on a DOC file, I get the SAVE or OPEN or CANCEL dialog box. Whenever I click on SAVE or CANCEL, a blank "action cancelled" window pops-up. This happens whether I publish the movie as a Projector file or as Flash and Html.

The solutions proposed in the past on this forum seem to be effective for single files, however I believe I have over 200 files to start with and could not for example envision creating 200+ bat files or anything like that.

Would anyone happen to know of a workaround?

Buttons Action Script Error ? I'm Lost
Hi,

I'm loading into flash, variables with php ,that were previously stored on a mysql database. Everything is running OK except for the number of the present entry when someone browses through all entries. It always shows the total entries number and not the number of the entry that is being showed.
http://www.filipe.name/buttons.jpg

To explain better please follow the above link. The number on the right show the total entries. When we click the left arrow button the number on the left should be 5,4,and so on... The problem is it stays in the same number, in this case the number 6.
I think that the problem is with the action script in the buttons, but I went through it several times and don't find any errors.

Here is the code for the left button:


Code:
on (release) {
_root.myN++;
if (_root.myN > _root.Records_txt.text) {
_root.myN = 0;
}
_root.Name_txt.variable = "arr_Name" add myN;
_root.Date_txt.variable = "arr_Date" add myN;
_root.From_txt.variable = "arr_City" add myN;
_root.Email_txt.variable = "arr_Email" add myN;
_root.URL_txt.variable = "arr_URL" add myN;
_root.Comment_txt.variable = "arr_Comment" add myN;
_root.Continent_txt.variable = "arr_Continent" add myN;
_root.x_txt.variable = "arr_fldX" add myN;
_root.y_txt.variable = "arr_fldY" add myN;
_root.xScroll_txt.variable = "arr_fldScrollX" add myN;
_root.yScroll_txt.variable = "arr_fldScrollY" add myN;
_root.civ_txt.variable = "arr_Civ" add myN;
//
_root.presentRec_txt.text = Number(_root.presentRec_txt.text) - 1;
if (Number(_root.presentRec_txt.text) < 1) {
_root.presentRec_txt.text = Number(_root.recCount_txt.text);
}
loadData();
checkMap();
}
Can some of you tell me what's wrong or teach me a better way of coding?

Tank you all,
Regards
Filipename

Error: A 'with' Action Failed Because The Specified Object Did Not Exist.
Error: A 'with' action failed because the specified object did not exist.

this error comes when I run my clients 'youtube.fla' file

the object is defined .

then why this message comes.

can anyone help me?

Mangesh Shinde

Buttons Action Script Error ? I'm Lost
Hi,

I'm loading into flash, variables with php ,that were previously stored on a mysql database. Everything is running OK except for the number of the present entry when someone browses through all entries. It always shows the total entries number and not the number of the entry that is being showed.


To explain better with the image the number on the right show the total entries. When we click the left arrow button the number on the left should be 5,4,and so on... The problem is it stays in the same number, in this case the number 6.
I think that the problem is with the action script in the buttons, but I went through it several times and don't find any errors.

Here is the code for the left button:

Code:
on (release) {
_root.myN++;
if (_root.myN > _root.Records_txt.text) {
_root.myN = 0;
}
_root.Name_txt.variable = "arr_Name" add myN;
_root.Date_txt.variable = "arr_Date" add myN;
_root.From_txt.variable = "arr_City" add myN;
_root.Email_txt.variable = "arr_Email" add myN;
_root.URL_txt.variable = "arr_URL" add myN;
_root.Comment_txt.variable = "arr_Comment" add myN;
_root.Continent_txt.variable = "arr_Continent" add myN;
_root.x_txt.variable = "arr_fldX" add myN;
_root.y_txt.variable = "arr_fldY" add myN;
_root.xScroll_txt.variable = "arr_fldScrollX" add myN;
_root.yScroll_txt.variable = "arr_fldScrollY" add myN;
_root.civ_txt.variable = "arr_Civ" add myN;
//
_root.presentRec_txt.text = Number(_root.presentRec_txt.text) - 1;
if (Number(_root.presentRec_txt.text) < 1) {
_root.presentRec_txt.text = Number(_root.recCount_txt.text);
}
loadData();
checkMap();
}
Can some of you tell me what's wrong or teach me a better way of coding?

Tank you all,
Regards
Filipename

Prototype Giving Error In Action Script 2.0
Hi,
following prototype is running fine for action action script 1.0 but its giving error in action script 2.0......
Could anybody please tell me why I m having error......

Prototype is here:


Quote:




var str1 = new Array();


String.prototype.lettres = function() {
cOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (cOK.indexOf(this.substr(0, 1).toUpperCase()) != -1) {
str1[str1.length] = (this.substr(0, 1));
}
if (this.length>1) {
this.slice(1).lettres();
}
};

("a213213t3213u321313133l").lettres();
trace(str1);





[/quote]thanks in advance......

Error: A 'with' Action Failed Because The Specified Object Did Not Exist.
Error: A 'with' action failed because the specified object did not exist.

this error comes when I run my clients 'youtube.fla' file

the object is defined .

then why this message comes.

can anyone help me?

Mangesh Shinde

Drag N Drop Quiz - Action Script Error -
I have a drag and drop type quiz system that I am just about complete with, but cannot get one item to work properly. I though maybe posting it up on this board may get me some help.

I have 4 questions. I want it to only move to frame 5 when all answers are correct. I have variables that store information to let me know if the question is correct called qt1, qt2, qt3, qt4. At this point I'm just trying it with one correct answer, but have no luck.

If anyone would be so kind to see what my issue is I would be very greatful. The code I am having trouble with is on Scene1, Layer 6. There is not much to this little quiz, but I've come to a halt without being able to have it advance to another frame when the questions are answered correct.

Button Action Java Popup Window [object] Error
I have attach a javascript action to a button in a flash movie to open another flash movie with size and other variable changes like no toolbars etc...

The problem I have is that when you click the button the browser opens not just the popup window with my flash movie but also another window with the word [object] in it.

what is the window object and what how do i get it to work without this extra object window poping up?

the popup window with my flash works fine though????


Please help me.....


Cullen

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