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




Weird Probelm With Self Accelerating Interval



hello all ,
new here . the problem i have is so weird to me i had to register!

i'm self taught , so perhaps its something very simple i've missed .

my site is concluded of a main swf with 4 menu items . each one loads a different swf .

all are at 38 framerate .

in the first swf that is loaded in - i have an interval for a photoslide .

at first, the interval is ok . but when i go to a different menu page (i.e - a new swf is loaded) in and then go back (i.e - load again) the first page ( the one with the interval) - the interval is going faster! and faster everytime i switch and switch back ...

wtf ???



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-01-2007, 08:08 PM


View Complete Forum Thread with Replies

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

Accelerating Scroll?
I am looking for a Barney's type menu scroll. Where you click on a button and it (image, text,whatever) moves to a specific x position. The only scripts I have been able to dig up have a deceleration applied to them. What I am looking for is the same movement only it (image, text,whatever) would continue to accelerate untill it hits it's x point. Can someone point me to something like that or throw some code my way. I would appreciate it a great deal :-)

Accelerating Alpha
Hi,

I've created a text field like this:
_root.createTextField("foto_txt", 100, -100, -100, 125, 200);

In function a) I create an interval:
var fade_text_id = setInterval(fade_text, 50);

It calls function b) to fade the text:
function fade_text(){
_root.foto_txt._alpha--;
if (_root.foto_txt._alpha <= 0){
clearInterval(fade_text_id);
}
};

It works fine exept that the more often I call the function (by rolling over a button) the faster the alpha fades ...?
I've already tried to create a new text field every time I roll over the button but the result is the same.

Can anyone tell me why this happens and what I can do about it?
Thanks very much in advance, Danielle.

Accelerating Tweens?
I sometimes see animations where there is an object going accross the screen and it starts out fast and slows down as it gets closer to its destination.
Does anyone have any ideas of how to do this without having to do the animation frame by frame?

Accelerating Tween
I'm trying to make a moving object accelerate, and I am making it move via tween, so is there anyway to make a tween accelerate? (as opposed to making mutiple tweens of diffrent distances and durations, which *would* do the trick but it seems, unnatural

Why Is SetInterval Accelerating?
I am stuck. I only have one interval running. I have slowed it down to 5 seconds for tracing but after the first few iterations, it accelerates. It acts like I'm setting the interval multiple times without clearing it or that the interval is overlapping itself. The offending script is between lines 172 and 192. I've tried this in both Flash 8 and Flash 9 with the same result. What am I missing?







Attach Code

var clockcolor = 0xFF0000;
var rollovercolor = 0x0000FF;
var bar_height = 30;//this controls overall size of the entire clip. this height is for one six-sided bar which is only part of the entire digit.

//calculate other parameters to give a reasonable aspect ratio. to change the appearance, only these three calculations should be adjusted - nothing else.
var bar_width = bar_height/4;
var bar_padding = bar_height/10;//leave a little space between the bars so they don't touch
var digit_padding = bar_height/2.5;//leave space between digits

var calculated_clip_width = (7*digit_padding + bar_width*2 + (bar_height + bar_width)*6 + bar_padding);//this may be used later for scaling

//where to place each of the 6 digits that will be created
var digit_registration_points = new Array();
//this spaces out the digits based on the height, width and padding. These multipliers don't ever need to be changed
digit_registration_points = [-(3.5*digit_padding + bar_width + 2.5*(bar_height + bar_width)),-(2.5*digit_padding + bar_width + 1.5*(bar_height + bar_width)),-(0.5*digit_padding + 0.5*(bar_height + bar_width)),(0.5*digit_padding + 0.5*(bar_height + bar_width)),(2.5*digit_padding + bar_width + 1.5*(bar_height + bar_width)),(3.5*digit_padding + bar_width + 2.5*(bar_height + bar_width))];

var array_0 = array_1 = array_2 = array_3 = array_4 = array_5 = array_6 = array_7 = array_8 = array_9 = new Array();
//arrays to determine which bars in the digits to make visible for each number
array_0 = [1,0,1,1,1,1,1];
array_1 = [0,0,0,1,1,0,0];
array_2 = [1,1,1,1,0,1,0];
array_3 = [1,1,1,1,1,0,0];
array_4 = [0,1,0,1,1,0,1];
array_5 = [1,1,1,0,1,0,1];
array_6 = [1,1,1,0,1,1,1];
array_7 = [1,0,0,1,1,0,0];
array_8 = [1,1,1,1,1,1,1];
array_9 = [1,1,0,1,1,0,1];
//these visibilities will apply to the "bar" + x MC's in the digits. The MC's are numbered 0 - 6 and are positioned as
//
// bar0 bar0 bar0 bar0 bar0 bar0 bar0 bar0 bar0
// b b E b b b b b b b b b b b b b b
// a a X a a a a a a a a a a a a a a
// r r A r r r r r r r r r r r r r r
// 6 3 M 6 3 3 3 3 6 3 6 6 3 6 3 6 3
// bar1 P -- bar1 bar1 bar1 bar1 bar1 bar1 bar1
// b b L b b b b b b b b b b b b b
// a a E a a a a a a a a a a a a a
// r r S r r r r r r r r r r r r r
// 5 4 5 4 4 5 4 4 4 5 4 4 5 4 4
// bar2 bar2 bar2 bar2 bar2 bar2 bar2
//
// zero one two three four five six seven eight nine
//
//for example, since array_0 = [1,0,1,1,1,1,1], every bar but "bar1" would be visible to make a zero.

//the digits created left to right will be numbered 0-5 and separated by two colons made up of dot0, dot1, dot2 and dot3

// bar0 bar0 bar0 bar0 bar0 bar0
// b b b b b b b b b b b b
// a a a a a a a a a a a a
// r r r r do r r r r do r r r r
// 6 3 6 3 t0 6 3 6 3 t2 6 3 6 3
// bar1 bar1 bar1 bar1 bar1 bar1
// b b b b b b b b b b b b
// a a a a do a a a a do a a a a
// r r r r t1 r r r r t3 r r r r
// 5 4 5 4 5 4 5 4 5 4 5 4
// bar2 bar2 bar2 bar2 bar2 bar2
//
// digitnumber0 digitnumber1 digitnumber2 digitnumber3 digitnumber4 digitnumber5


//push the numbers' arrays in proper order into the visibility array
var visibility_array = new Array();
for(var i = 0; i <= 9; i++) {
visibility_array.push(this["array_" + i]);
}

this.createEmptyMovieClip("digital_display",this.getNextHighestDepth());
//center the clock on the stage
this.digital_display._x = Stage.width/2;
this.digital_display._y = Stage.height/2;

//make sure the clock fits on the stage

if(calculated_clip_width > Stage.width) {
this.digital_display._xscale = this.digital_display._yscale = 98 * (Stage.width / calculated_clip_width);
}
//put colons in their own MC
this.digital_display.createEmptyMovieClip("dots",this.digital_display.getNextHighestDepth());

for(var i = 0; i < 4; i++) {
this.digital_display.dots.createEmptyMovieClip("dot" + i,this.digital_display.dots.getNextHighestDepth());
}

this.digital_display.dots.dot0._x = this.digital_display.dots.dot1._x = -(1.5*digit_padding + bar_width/2 + (bar_height + bar_width));
this.digital_display.dots.dot2._x = this.digital_display.dots.dot3._x = (1.5*digit_padding + bar_width/2 + (bar_height + bar_width));

this.digital_display.dots.dot0._y = this.digital_display.dots.dot2._y = -(bar_height - bar_padding)/2;
this.digital_display.dots.dot1._y = this.digital_display.dots.dot3._y = (bar_height - bar_padding)/2;

for(var obj in this.digital_display.dots) {
with(this.digital_display.dots[obj]){
lineStyle(0,clockcolor,0);
beginFill(clockcolor,100);
moveTo(-bar_width/2,-bar_width/2);
lineTo(bar_width/2,-bar_width/2);
lineTo(bar_width/2,bar_width/2);
lineTo(-bar_width/2,bar_width/2);
lineTo(-bar_width/2,-bar_width/2);
endFill();
}
}
//put all digits in their own MC
this.digital_display.createEmptyMovieClip("digits",this.digital_display.getNextHighestDepth());
//digits 0-5 are the display numbers left to right
for(var i = 0; i <= 5; i++) {
this.digital_display.digits.createEmptyMovieClip("digitnumber" + i,this.digital_display.digits.getNextHighestDepth());
this.digital_display.digits["digitnumber" + i]._x = digit_registration_points[i];
}

//build each digit
for(var obj in this.digital_display.digits) {
//associated hour digits together, minutes digits together and seconds digits together (i.e. 0-1, 2-3 and 4-5 go together)
//place these associations in an array in each digit MC
this.digital_display.digits[obj].related_digits = new Array();

if(Math.floor(Number(obj.substring(obj.length-1,obj.length))/2)*2 <> Number(obj.substring(obj.length-1,obj.length))){
//this is an odd number
this.digital_display.digits[obj].related_digits = ["digitnumber" + (Number(obj.substring(obj.length-1,obj.length))-1),"digitnumber" + obj.substring(obj.length-1,obj.length)];
} else {
//this is an even number
this.digital_display.digits[obj].related_digits = ["digitnumber" + obj.substring(obj.length-1,obj.length),"digitnumber" + (Number(obj.substring(obj.length-1,obj.length))+1)];
}

for(var i = 0; i <= 6; i++) {
this.digital_display.digits[obj].createEmptyMovieClip("bar" + i,this.digital_display.digits[obj].getNextHighestDepth());
}

this.digital_display.digits[obj].bar0._y = -(bar_height + bar_padding);
this.digital_display.digits[obj].bar2._y = bar_height + bar_padding;

this.digital_display.digits[obj].bar3._x = this.digital_display.digits[obj].bar4._x = (bar_height + bar_padding)/2;
this.digital_display.digits[obj].bar5._x = this.digital_display.digits[obj].bar6._x = -(bar_height + bar_padding)/2;
this.digital_display.digits[obj].bar3._y = this.digital_display.digits[obj].bar6._y = -(bar_height + bar_padding)/2;
this.digital_display.digits[obj].bar4._y = this.digital_display.digits[obj].bar5._y = (bar_height + bar_padding)/2;

this.digital_display.digits[obj].mycolor = new Color(this.digital_display.digits[obj]);

this.digital_display.digits[obj].bar0._rotation = this.digital_display.digits[obj].bar1._rotation = this.digital_display.digits[obj].bar2._rotation = 90;
for(var i = 0; i <= 6; i++) {
this.digital_display.digits[obj]["bar" + i]._visible = 0;
this.digital_display.digits[obj]["bar" + i].lineStyle(0,clockcolor,0);
this.digital_display.digits[obj]["bar" + i].beginFill(clockcolor,100);
this.digital_display.digits[obj]["bar" + i].moveTo(-bar_width/2,-(bar_height/2 - bar_width/2));
this.digital_display.digits[obj]["bar" + i].lineTo(0,-bar_height/2);
this.digital_display.digits[obj]["bar" + i].lineTo(bar_width/2,-(bar_height/2 - bar_width/2));
this.digital_display.digits[obj]["bar" + i].lineTo(bar_width/2,bar_height/2 - bar_width/2);
this.digital_display.digits[obj]["bar" + i].lineTo(0,bar_height/2);
this.digital_display.digits[obj]["bar" + i].lineTo(-bar_width/2,bar_height/2 - bar_width/2);
this.digital_display.digits[obj]["bar" + i].lineTo(-bar_width/2,-(bar_height/2 - bar_width/2));
this.digital_display.digits[obj]["bar" + i].endFill();
this.digital_display.digits[obj]["bar" + i].mycolor = new Color(this.digital_display.digits[obj]["bar" + i]);
this.digital_display.digits[obj]["bar" + i].useHandCursor = false;
//these mouse events are totally frivilous and serve no useful purpose and can be eliminated entirely
/*this.digital_display.digits[obj]["bar" + i].onRollOver = function() {
Mouse.hide();
for(var k = 0; k < this._parent.related_digits.length; k++) {
this._parent._parent[this._parent.related_digits[k]].mycolor.setRGB(rollovercolor);
}
}
this.digital_display.digits[obj]["bar" + i].onRollOut = this.digital_display.digits[obj]["bar" + i].onDragOut = function() {
Mouse.show();
for(var k = 0; k < this._parent.related_digits.length; k++) {
this._parent._parent[this._parent.related_digits[k]].mycolor.setRGB(clockcolor);
}
}*/
}
}

var flasher = true;
function flashtimeF() {
var mytime:Date = new Date();
flasher = ! flasher;
trace(flasher + ": " + mytime.getMinutes().toString() + "." + mytime.getSeconds().toString());
var timevalue = "120000";
var timevaluearray = timevalue.split("");
for(var ii = 0; ii < timevaluearray.length; ii++) {
for(var jj = 0; jj < visibility_array[Number(timevaluearray[ii])].length; jj++) {
if(! flasher) {
digital_display.digits["digitnumber" + ii]["bar" + jj]._visible = visibility_array[Number(timevaluearray[ii])][jj];
} else {
digital_display.digits["digitnumber" + ii]["bar" + jj]._visible = 0;
}
}
}
updateAfterEvent();
//var mytime2:Date = new Date();
//trace(mytime2.getTime() - mytime.getTime());
}
flashtimeI = setInterval(flashtimeF,5000);

/*function update_display(){
mytime = new Date();
t1 = mytime.getTime();
thehouris = mytime.getHours().toString();
theminutesis = mytime.getMinutes().toString();
thesecondsis = mytime.getSeconds().toString();
if(thehouris.length < 2) {thehouris = "0" + thehouris};
if(theminutesis.length < 2) {theminutesis = "0" + theminutesis};
if(thesecondsis.length < 2) {thesecondsis = "0" + thesecondsis};
timevalue = thehouris + theminutesis + thesecondsis;
timevaluearray = timevalue.split("");
for(var i = 0; i < timevaluearray.length; i++) {
for(var j = 0; j < visibility_array[Number(timevaluearray[i])].length; j++) {
digital_display.digits["digitnumber" + i]["bar" + j]._visible = visibility_array[Number(timevaluearray[i])][j];
}
}
}
gettimeI = setInterval(gettimeF,50);

function gettimeF(){
update_display();
updateAfterEvent();
}*/

Accelerating Car With Perspective And Borders?
hey can someoen help me a bit? im trying to make a car go in this picture with borders and perspective. so if the car goes farther away, it get smaller... heres a link to the .swf...
89kb http://www.freewebs.com/headface/car.html

Accelerating Car With Perspective And Borders?
hey can someoen help me a bit? im trying to make a car go in this picture with borders and perspective. so if the car goes farther away, it get smaller... heres a link to the .swf...
89kb http://www.freewebs.com/headface/car.html

Animating Accelerating Objects.
Hi
Can anybody help me on following.
1) How do you stimulate a accelerating action ? (Can be a rain drop or a accelerating car), - By only pointing the start & end positions on the stage and doing the rest using action scripts

2) Say we have a object moving across the stage & when we move the mouse closer to the object, it moves faster.

Thanks in advance..

Accelerating/slowing Down A Scrolling Menu
I've seen some code to accelerate items in flash 5 but couldn't find anyone refering on how to do it in Flash 4. I want to have side to side menu that when you click on a left or right arrow the menu speeds to the next set of items, but as it speeds in i want it to slow down. This effect can be seen on Barneys and few other sites. I know it has to do with some simple math, but i'm not sure how to do it. Any help would be great!

Steve Hubbard
http://www.starproject.net

Set Interval / Clear Interval Question
Ok, here is my problem. I have a bit of actionscript the makes a sentence of text slide out. I just want this text to hang around for about 3 seconds and then slide back out. A delay within the AS to pause the AS before it continues through. I posted this question in here before and I got back some responses on set interval and clear interval. Now I did find a great link to this which I'm sure will help a lot of people out
http://www.umbc.edu/interactive/flas...?p=setInterval

but I just didn't understand how I could use that with what I'm trying to accomplish. Here is the start of my code.

onClipEvent (load) {
myX = 650;
myY= 480;
div = 6;
}
onClipEvent (enterFrame) {
_x += (myX-_x)/div;
_y += (myY-_y)/div;
}
onClipEvent (enterFrame) {
if (this._alpha <100) {
this._alpha += 5;
}
}

I also have the text fade in.
I'm just not sure how to put a delay on this AS before it runs to the end.
Just plain confused.
Any help would be great.

Set Interval / Clear Interval Question
Ok, here is my problem. I have a bit of actionscript the makes a sentence of text slide out. I just want this text to hang around for about 3 seconds and then slide back out. A delay within the AS to pause the AS before it continues through. I posted this question in here before and I got back some responses on set interval and clear interval. Now I did find a great link to this which I'm sure will help a lot of people out
http://www.umbc.edu/interactive/flas...?p=setInterval

but I just didn't understand how I could use that with what I'm trying to accomplish. Here is the start of my code.

onClipEvent (load) {
myX = 650;
myY= 480;
div = 6;
}
onClipEvent (enterFrame) {
_x += (myX-_x)/div;
_y += (myY-_y)/div;
}
onClipEvent (enterFrame) {
if (this._alpha <100) {
this._alpha += 5;
}
}

I also have the text fade in.
I'm just not sure how to put a delay on this AS before it runs to the end.
Just plain confused.
Any help would be great.

Set Interval / Clear Interval Question
Ok, here is my problem. I have a bit of actionscript the makes a sentence of text slide out. I just want this text to hang around for about 3 seconds and then slide back out. A delay within the AS to pause the AS before it continues through. I posted this question in here before and I got back some responses on set interval and clear interval. Now I did find a great link to this which I'm sure will help a lot of people out
http://www.umbc.edu/interactive/flas...?p=setInterval

but I just didn't understand how I could use that with what I'm trying to accomplish. Here is the start of my code.

onClipEvent (load) {
myX = 650;
myY= 480;
div = 6;
}
onClipEvent (enterFrame) {
_x += (myX-_x)/div;
_y += (myY-_y)/div;
}
onClipEvent (enterFrame) {
if (this._alpha <100) {
this._alpha += 5;
}
}

I also have the text fade in.
I'm just not sure how to put a delay on this AS before it runs to the end.
Just plain confused.
Any help would be great.

Set Interval / Clear Interval Question
Ok, here is my problem. I have a bit of actionscript the makes a sentence of text slide out. I just want this text to hang around for about 3 seconds and then slide back out. A delay within the AS to pause the AS before it continues through. I posted this question in here before and I got back some responses on set interval and clear interval. Now I did find a great link to this which I'm sure will help a lot of people out
http://www.umbc.edu/interactive/flas...?p=setInterval

but I just didn't understand how I could use that with what I'm trying to accomplish. Here is the start of my code.

onClipEvent (load) {
myX = 650;
myY= 480;
div = 6;
}
onClipEvent (enterFrame) {
_x += (myX-_x)/div;
_y += (myY-_y)/div;
}
onClipEvent (enterFrame) {
if (this._alpha <100) {
this._alpha += 5;
}
}

I also have the text fade in.
I'm just not sure how to put a delay on this AS before it runs to the end.
Just plain confused.
Any help would be great.

Ee Having Probelm With MXP
How can i use The MXP files In FLAHS MX a :S?
annyone that has anny Ideas For Helpuing me On That a :S?

Probelm With Preloader
Hey all,
I have a problem with my preloader. My problem is that I have some text boxes that are supposed to indicate the Percentage loaded and the amount of Kbs left to download. The problem is that when I run my preloader, instead of showing me the actuall percentage ine number (Ex: 50%), it shows me the action scrypt that I wrote in for it (ExMath.floor (_root.getBytesLoaded() / _root.getBytesTotal() * 100) + "%")) I added most of the actions with the setVariable action, maybe that's my mistake... I don't know. If anyone knows what's wrong here please help me...
--------------------------------------------------------
--------------------------------------------------------
Example of my problem:

(What the text box should show):

45% (or any other number)


(What the text box does show):

(Math.floor (_root.getBytesLoaded() / _root.getBytesTotal() * 100) + "%")
--------------------------------------------------------
--------------------------------------------------------

Probelm With MovieClipLoader()
This is my first post in this forum, although i visit it very often.

I made a Flash, in Flash MX which it uses the MovieClipLoader class.

What I want is to load some random images and after the image is loaded to play a movieclip which will have this image as background. The code I used to load the images is the following:

var choice = Math.round(Math.random()*15);
var imgPre = new MovieClipLoader();
readyListen = new Object();

readyListen.onLoadError = function(location, errorCode) {
imgPre.removeListener(readyListen);
stop();
loadMovie("photo1.jpg", "location");
};

readyListen.onLoadStart = function(location) {
trace("Starting DOWNLOADING of BG Image");
};

readyListen.onLoadComplete = function(location) {
imgPre.removeListener(readyListen);
gotoAndPlay(2);
};

imgPre.addListener(readyListen);
imgPre.loadClip("photo"+choice+".jpg", "location");

stop();

In frame 2 I have the movieclip.

The problem is that when I test it offline (using the Standalone Flash Player), it acts correctly. But, when I upload it to test it online (using Internet Explorer, of course), it doesn't stop as it should when an error occurs, but it continues playing frame 2! Having

Note. At the last 2 frames I made a waiting timer using the following code:
if ((endTime-startTime)<1) {
gotoAndPlay(5);
delay = true;
} else {
delay = false;
gotoAndPlay(1);
}
This code works fine, I only mention it, just in case.

I have tried many different things in order to find a solution, but nothing worked. I hope there is someone who can help me in this issue.

Thank you very much

JavaS
synthesis(at)freemal.gr

Pre Loader Probelm At The End Get Url
I am Using flash MX 2004; i am having a hard time trying to use an actionscript going from the preloader to the webpage. Basically when the movie ends i am trying to automatically goto the web page... Please help if you can..

Please Help With This Loader Probelm
My preloader isnt gettin shown when i view the movie online

The basics of my movie is that it selects a certain movie clip to be displayed depending on the time... and then it selects a random frame from that movie clip and stops.


FRAME ONE - Pre Loader

FRAME TWO - blank movie clip with an instance of 'HOLDME'

FRAME TWO -

mydate = new Date();
mhours = mydate.getHours();
var mcName;
if (mhours>=7 && mhours<=14) {
mcName = "one";
} else if (mhours>=14 && mhours<=19) {
mcName = "two";
} else if (mhours>=12+7 && mhours<=12+11) {
mcName = "three";
} else {
mcName = "four";
}
_root.attachMovie(mcName, "holdme", 1);
holdme.gotoAndStop(int(Math.random()*21)+1);
stop();


The four movie clips in the library have been exported for actionscript... with 'export in first frame' UNTICKED and have been dragged onto the stage... but are not in view


The preloader doesnt seem to be working... and when the frame is selected from a movie clip it doesnt stop

HELP Tweening Probelm
Hi there,

I have attached a flash file, please see that for what I am trying to do using MX 2004.

This is an image gallery I am working on. The main strip of thumbnails is moved by actionscript.

If you click the forward or back buttons before the strip of thumbs has finished moving it causes a strange thing to happen.

I want to over come this problem. Any ideas?

Cheers,

James.

Begginer Probelm
i can make flash movies and view them but when i publish it in html for i upload it to my site it only shows two jpgs from my movie whats going on? please help me im going insane and heres the fla

Xml Menu Probelm
Hi there guys

I have this xml gallery guys basterdised to the best of my ability, a
grid of thumbnails are created on the stage and each thumbnail has a
descriptive tooltip and when clicked opens a movieclip containing
specific content belonging to the chosen thumbnail.

I'm trying to create a function that builds a side bar menu containing
several buttons describing the type of job its is (advertising, branding,
design, web... etc) and once one of the buttons is pressed the only
active thumbnails are the ones that refer to the sidemenu item pressed.

In a word I'm very lost, I've tried various things within my ability and
now my heads fallen off.

Any sort of help would be greatly appreciated.

here's the .as file and a brief bit of the .xml file to give an idea of
the structure.

Thanks guys


Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.register(Shortcuts,Fuse,PennerEasing,FuseFMP);
com.mosesSupposes.fuse.FuseFMP.simpleSetup();

System.useCodepage = true;
mc_large._x = -1000;
var rowcount:Number = 0;
var colcount:Number = 0;
var spacing:Number = 58;
var numcolumns:Number = 6;
var numrows:Number = 5;
var contactholder:MovieClip;
var thumbpath:String = "portfolio/thumbs/";
var largepath:String = "portfolio/";

//XML Control
var galleryXML:XML = new XML();
galleryXML.ignoreWhite = true;
galleryXML.onLoad = function(success) {
numimages = this.firstChild.childNodes.length;
totalImg.text = numimages;
contactholder = _root.createEmptyMovieClip("container", 0);
for (var i:Number=0; i<numimages; i++) {
var advalue = this.firstChild.childNodes[i].attributes.name+"
";
var imgfile:String = this.firstChild.childNodes[i].childNodes[2].firstChild;
var thumbholder:MovieClip = contactholder.createEmptyMovieClip("tholder"+i, i);
var thumbloader:MovieClip = thumbholder.createEmptyMovieClip("thumb_img",0);
thumbloader.loadMovie(thumbpath+ imgfile);
contactholder._y = Math.floor((Stage.height - contactholder._height) / 3);
contactholder._x = Math.floor((Stage.width - contactholder._width) / 2.5);

thumbholder.imgtitle = this.firstChild.childNodes[i].childNodes[1].firstChild;
thumbholder.imgfile = imgfile;

thumbholder.tooltip =+ this.firstChild.childNodes[i].childNodes[1].firstChild;
trace("tooltip title: " + this.firstChild.childNodes[i].childNodes[1].firstChild);

thumbholder.advalue = this.firstChild.childNodes[i].attributes.name+"
";
_root.advalue = advalue;
_root.ats.text = advalue+"
";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

thumbholder.kwordlength = this.firstChild.childNodes[i].childNodes[3].childNodes.length;
_root.numimages = numimages;
thumbholder.keywords = "
";
for(var k:Number=0;k<thumbholder.kwordlength;k++) {
thumbholder.keywords += this.firstChild.childNodes[i].childNodes[3].childNodes[k].firstChild+"

";
}
thumbholder._x = colcount * spacing;
thumbholder._y += rowcount * spacing;
thumbholder._alpha=0;
thumbholder.alphaTo(100,0.5,"easeInOutQuad");
rowcount++;
if(rowcount >= numrows) {
rowcount=0;
colcount++;
}


thumbholder.onRelease = function() {
if(container._alpha == 100) {
container.alphaTo(0,0.5,"easeOutBounce");
mc_large._x = 0;
mc_large.swapDepths(this.getNextHighestDepth());
mc_large.file.text = this.imgfile;
mc_large.mc_img.loadMovie(largepath+ this.imgfile);
mc_large._y = Math.floor((Stage.height - mc_large._height) / 2);
mc_large._x = Math.floor((Stage.width - mc_large._width) / 2);
mc_large.mc_img.alphaTo(100,1.0,"easeOutBounce",0.1);
mc_large.mc_img.blurTo(0, 2, 0.5,"easeOutBounce",0.3);
mc_large.btn_exit.alphaTo(100,0.5,"easeOutBounce",0.3);
mc_large.btn_info.alphaTo(100,0.5,"easeOutBounce",0.4);
mc_large.createEmptyMovieClip("copyContainer", 10000, -250, -250, 0, 0);
copyWidth = 430;
mc_large.copyContainer.createTextField("copyBox", 10001, 230, 170, copyWidth, 100);
var myformat = new TextFormat("Praxis LT Light", 14, 0x000000);
mc_large.copyContainer.copyBox.selectable = false;
mc_large.copyContainer.copyBox.autoSize = "left";
mc_large.copyContainer.copyBox.border = false;
mc_large.copyContainer.copyBox.text = this.keywords;
if (mc_large.copyContainer.copyBox.textWidth > copyWidth){
mc_large.copyContainer.copyBox.multiline=true;
mc_large.copyContainer.copyBox.wordWrap=true;
}
myformat.leftMargin = 10;
myformat.rightMargin = 10;
myformat.leading = 0;
mc_large.copyContainer.copyBox.multiline = true;
mc_large.copyContainer.copyBox.wordWrap = true;
mc_large.copyContainer.copyBox.background = true;
mc_large.copyContainer.copyBox.embedFonts = true;
mc_large.copyContainer.copyBox.selectable = false;
mc_large.copyContainer.copyBox.backgroundColor = 0xA9D5DE;
mc_large.copyContainer.copyBox.setTextFormat(myformat);
//
mc_large.copyContainer._alpha=0;
mc_large.copyContainer._alpha=0;
mc_large.createEmptyMovieClip("titleContainer", 11000);
mc_large.titleContainer.createTextField("titleBox", 11001, 230, 128, 430, 10);
var myformat = new TextFormat("Praxis LT Semibold", 30, 0x000000);
mc_large.titleContainer.titleBox.selectable = false;
mc_large.titleContainer.titleBox.autoSize = "left";
mc_large.titleContainer.titleBox.border = false;
mc_large.titleContainer.titleBox.text = this.imgtitle;
myformat.leftMargin = 10;
myformat.rightMargin = 10;
myformat.leading = 0;
mc_large.titleContainer.titleBox.multiline = false;
mc_large.titleContainer.titleBox.wordWrap = false;
mc_large.titleContainer.titleBox.background = true;
mc_large.titleContainer.titleBox.embedFonts = true;
mc_large.titleContainer.titleBox.selectable = false;
mc_large.titleContainer.titleBox.backgroundColor = 0xA9D5DE; /*0xA9D5DE*/
mc_large.titleContainer.titleBox.setTextFormat(myformat);
//
mc_large.titleContainer._alpha=0;
mc_large.titleContainer._alpha=0;

} else {
mc_large.titleContainer.alphaTo(0, 1, "easeOutBounce",0.3);
mc_large.copyContainer.alphaTo(0, 1, "easeOutBounce",0.1);
//
mc_large.btn_exit.alphaTo(0,0.5,"easeOutBounce",0.7);
mc_large.btn_info.alphaTo(0,0.5,"easeOutBounce",0.5);
mc_large.mc_img.alphaTo(0,0.5,"easeOutBounce",1.0);
//
mc_large.xSlideTo(-2000, 0.1, "easeOutQuad",2.2);
container.alphaTo(100,0.5,"easeOutBounce",1.5);
}
}
}

};
galleryXML.load("portfolio.xml");


stop();



Code:
<?xml version="1.0" standalone="no" encoding="UTF-8" ?>
<imagelist>
<image name="Advertising">
<id>1</id>
<title>You can in the Isle Of Man</title>
<file>ucan.jpg</file>
<keywords>
<keyword rank="1">The Isle of Man Government required a campaign designed to promote the Isle of Man as a business centre with the objective of re-aligning the Isle of Man’s brand image with its brand identity as a leading business centre.</keyword>
<keyword rank="2">Analysing the Island’s strengths, it became apparent that the working relationship between Government and the private sector is unusually close, creating a nimble, pro-active sense of ‘can do’ - across many sectors from E-commerce to Finance, to the DTI.</keyword>
<keyword rank="3">We pushed our positioning statement ‘You can on the Isle of Man’ to the fore, designed to pull this into a powerful proposition, to counter the often typical lack of knowledge about the Island’s unique features and strengths.</keyword>
</keywords>
</image>
<image name="Branding">
<id>2</id>
<title>Vision</title>
<file>vision.jpg</file>
<keywords>
<keyword rank="1">The creation of a new retail opthamology brand in Moscow required clear thinking, especially when that brand would instantly achieve market leadership through a coordinate launch in 10 sites.</keyword>
<keyword rank="2">The logo was designed to create an immediate promise through the dual eagle/human faces. This theme was carried through to store signage and large format poster design as well as a full range of marketing support materials and point of sale.</keyword>
</keywords>
</image>
<image name="Advertising">
<id>3</id>
<title>Manx Telecom</title>
<file>mt.jpg</file>
<keywords>
<keyword rank="1">Client research indicated a consumer misconception that fixed line call charges to international numbers were uncompetitive when compared to UK provider deals.</keyword>
<keyword rank="2">The treatments took this issue head on with a direct price comparison with British Telecom to help reposition Manx Telecom as a competitive provider.</keyword>
<keyword rank="3">Note: Prices quoted on the advertising treatments are no longer current.</keyword>
</keywords>
</image>
</imagelist>

Probelm With Button
Hi Guys,

i have a movieclip in that i have another movie clip in that i have a button when i am redirecting it to a url it's not working.

can you help me out with this.



flash.zip

Game Probelm
Im still kinda new at this stuff so sorry if I sound crazy. Im making a space shootem up game. And every time I kill a bad guy and it play's death movement I still get life points away. When they spawn I have a variable called hit too equal false.
I was told to have it equal true in when the ship got hit, but not really too sure where to put it and what else needs to be done. Sorry I don't have the file here.

Probelm With Loader
hi 2 all

i have 2 list components in my application when i click first list cmponent depeding on the value other list items will be changed .

where my first list intially will be there in application second one will be loaded through mx loader.. component

it was working fine .

my probelm is i dont want first list box to be there intially . i want both the list boxes should be loaded through loader component.

working should be same.

form1 = new Object();
form1.change = function (evt){
xload.contentPath = "booklist/1_" + evt.target.selectedItem.data + ".swf"
}
xload.addEventListener("change", form1);

i am using the above code

please tell me a solution

Xml Menu Probelm
Hi there guys

I have this xml gallery guys basterdised to the best of my ability, a
grid of thumbnails are created on the stage and each thumbnail has a
descriptive tooltip and when clicked opens a movieclip containing
specific content belonging to the chosen thumbnail.

I'm trying to create a function that builds a side bar menu containing
several buttons describing the type of job its is (advertising, branding,
design, web... etc) and once one of the buttons is pressed the only
active thumbnails are the ones that refer to the sidemenu item pressed.

In a word I'm very lost, I've tried various things within my ability and
now my heads fallen off.

Any sort of help would be greatly appreciated.

here's the .as file and a brief bit of the .xml file to give an idea of
the structure.

Thanks guys


Code:
/*///////////////////////////////////////////////////////////////
Portfolio thumbnail and content layout
////////////////////////////////////////////////////////////////*/

import com.mosesSupposes.fuse.*;
ZigoEngine.register(Shortcuts,Fuse,PennerEasing,FuseFMP);
com.mosesSupposes.fuse.FuseFMP.simpleSetup();

System.useCodepage = true;
mc_large._x = -1000;
var rowcount:Number = 0;
var colcount:Number = 0;
var spacing:Number = 58;
var numcolumns:Number = 6;
var numrows:Number = 5;
var contactholder:MovieClip;
var thumbpath:String = "portfolio/thumbs/";
var largepath:String = "portfolio/";

//XML Control
var galleryXML:XML = new XML();
galleryXML.ignoreWhite = true;
galleryXML.onLoad = function(success) {
numimages = this.firstChild.childNodes.length;
totalImg.text = numimages;
contactholder = _root.createEmptyMovieClip("container", 0);
for (var i:Number=0; i<numimages; i++) {
var advalue = this.firstChild.childNodes[i].attributes.name+"
";
var imgfile:String = this.firstChild.childNodes[i].childNodes[2].firstChild;
var thumbholder:MovieClip = contactholder.createEmptyMovieClip("tholder"+i, i);
var thumbloader:MovieClip = thumbholder.createEmptyMovieClip("thumb_img",0);
thumbloader.loadMovie(thumbpath+ imgfile);
contactholder._y = Math.floor((Stage.height - contactholder._height) / 3);
contactholder._x = Math.floor((Stage.width - contactholder._width) / 2.5);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
thumbholder.imgtitle = this.firstChild.childNodes[i].childNodes[1].firstChild;
thumbholder.imgfile = imgfile;
//
thumbholder.tooltip =+ this.firstChild.childNodes[i].childNodes[1].firstChild;
trace("tooltip title: " + this.firstChild.childNodes[i].childNodes[1].firstChild);
//
thumbholder.advalue = this.firstChild.childNodes[i].attributes.name+"
";
_root.advalue = advalue;
_root.ats.text = advalue+"
";
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

thumbholder.kwordlength = this.firstChild.childNodes[i].childNodes[3].childNodes.length;
_root.numimages = numimages;
thumbholder.keywords = "
";
for(var k:Number=0;k<thumbholder.kwordlength;k++) {
thumbholder.keywords += this.firstChild.childNodes[i].childNodes[3].childNodes[k].firstChild+"

";
}
thumbholder._x = colcount * spacing;
thumbholder._y += rowcount * spacing;
thumbholder._alpha=0;
thumbholder.alphaTo(100,0.5,"easeInOutQuad");
rowcount++;
if(rowcount >= numrows) {
rowcount=0;
colcount++;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
thumbholder.onRollOver = function(tipOn) {
tipOn = this.hitTest(_root._xmouse, _root._ymouse, true) ? true : false;
format = new TextFormat("Praxis LT SemiBold", 19, 0xffffff);
if (tipOn) {
this.createTextField("tip", 10000, 0, 0, 0, 0);
this.tip._alpha=0;
this.swapDepths(this.getNextHighestDepth());
startDrag (this.tip);
with (this.tip) {

this.tip.alphaTo(100,0.5,"easeOutBounce");
this.tip.DropShadow_distance = 5;
this.tip.DropShadow_alpha = .5;
this.tip.DropShadow_blur = 5;

trace("Tooltip: " + this.tooltip);
trace("Tooltip: " + this.advalue);
text = this.advalue+this.tooltip;
_x = this._xmouse+10;
_y = this._ymouse-30;
autoSize = "left";
background = true;
embedFonts = true;
selectable = false;
backgroundColor = 0x000000;
setTextFormat(format);
}
} else if (!tipOn) {
this.tip.alphaTo(0,0.5,"easeOutBounce");
//this.tip.removeTextField();
this.tip.stopDrag ();
}
}
thumbholder.onRollOut = function() {
this.tip.alphaTo(0,0.5,"easeOutBounce");
//this.tip.removeTextField();
this.tip.stopDrag ();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
thumbholder.onRelease = function() {
if(container._alpha == 100) {
container.alphaTo(0,0.5,"easeOutBounce");
mc_large._x = 0;
mc_large.swapDepths(this.getNextHighestDepth());
mc_large.file.text = this.imgfile;
mc_large.mc_img.loadMovie(largepath+ this.imgfile);
mc_large._y = Math.floor((Stage.height - mc_large._height) / 2);
mc_large._x = Math.floor((Stage.width - mc_large._width) / 2);
mc_large.mc_img.alphaTo(100,1.0,"easeOutBounce",0.1);
mc_large.mc_img.blurTo(0, 2, 0.5,"easeOutBounce",0.3);
//mc_large.mc_img.Blur_blurTo = 100;
//_root.alt.DropShadow_alpha = .5;

//mc_bg.mc_img.alphaTo(100,1.0,"easeOutBounce",0.1);
//mc_bg.file.text = this.imgfile;
//mc_bg.mc_img.loadMovie(largepath+ this.imgfile);
//
mc_large.btn_exit.alphaTo(100,0.5,"easeOutBounce",0.3);
mc_large.btn_info.alphaTo(100,0.5,"easeOutBounce",0.4);
//
/* Copy Box */
//
mc_large.createEmptyMovieClip("copyContainer", 10000, -250, -250, 0, 0);
copyWidth = 430;
mc_large.copyContainer.createTextField("copyBox", 10001, 230, 170, copyWidth, 100);
var myformat = new TextFormat("Praxis LT Light", 14, 0x000000);
mc_large.copyContainer.copyBox.selectable = false;
mc_large.copyContainer.copyBox.autoSize = "left";
mc_large.copyContainer.copyBox.border = false;
mc_large.copyContainer.copyBox.text = this.keywords;
if (mc_large.copyContainer.copyBox.textWidth > copyWidth){
mc_large.copyContainer.copyBox.multiline=true;
mc_large.copyContainer.copyBox.wordWrap=true;
}
myformat.leftMargin = 10;
myformat.rightMargin = 10;
myformat.leading = 0;
mc_large.copyContainer.copyBox.multiline = true;
mc_large.copyContainer.copyBox.wordWrap = true;
mc_large.copyContainer.copyBox.background = true;
mc_large.copyContainer.copyBox.embedFonts = true;
mc_large.copyContainer.copyBox.selectable = false;
mc_large.copyContainer.copyBox.backgroundColor = 0xA9D5DE;
mc_large.copyContainer.copyBox.setTextFormat(myformat);
//
mc_large.copyContainer._alpha=0;
mc_large.copyContainer._alpha=0;
//
//mc_large.copyContainer.DropShadow_distance = 1; // adds a dropshadow & set distance
//mc_large.copyContainer.DropShadow_alpha = .2; // filter alphas are 0-1 multipliers
//
/* End Copy Box */
/* Title Box */
//
mc_large.createEmptyMovieClip("titleContainer", 11000);
mc_large.titleContainer.createTextField("titleBox", 11001, 230, 128, 430, 10);
var myformat = new TextFormat("Praxis LT Semibold", 30, 0x000000);
mc_large.titleContainer.titleBox.selectable = false;
mc_large.titleContainer.titleBox.autoSize = "left";
mc_large.titleContainer.titleBox.border = false;
mc_large.titleContainer.titleBox.text = this.imgtitle;
myformat.leftMargin = 10;
myformat.rightMargin = 10;
myformat.leading = 0;
mc_large.titleContainer.titleBox.multiline = false;
mc_large.titleContainer.titleBox.wordWrap = false;
mc_large.titleContainer.titleBox.background = true;
mc_large.titleContainer.titleBox.embedFonts = true;
mc_large.titleContainer.titleBox.selectable = false;
mc_large.titleContainer.titleBox.backgroundColor = 0xA9D5DE; /*0xA9D5DE*/
mc_large.titleContainer.titleBox.setTextFormat(myformat);
//
mc_large.titleContainer._alpha=0;
mc_large.titleContainer._alpha=0;
//
//mc_large.titleContainer.DropShadow_distance = 1; // adds a dropshadow & set distance
//mc_large.titleContainer.DropShadow_alpha = .2; // filter alphas are 0-1 multipliers
//
} else {
mc_large.titleContainer.alphaTo(0, 1, "easeOutBounce",0.3);
mc_large.copyContainer.alphaTo(0, 1, "easeOutBounce",0.1);
//
mc_large.btn_exit.alphaTo(0,0.5,"easeOutBounce",0.7);
mc_large.btn_info.alphaTo(0,0.5,"easeOutBounce",0.5);
mc_large.mc_img.alphaTo(0,0.5,"easeOutBounce",1.0);
//
mc_large.xSlideTo(-2000, 0.1, "easeOutQuad",2.2);
container.alphaTo(100,0.5,"easeOutBounce",1.5);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}

};
galleryXML.load("portfolio.xml");


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

mc_large.btn_info.onRollOver = function() {
//this.colorTo(0xffffff, 0.2, "easeInQuad");
//mc_large.btn_info.altTip("Project Overview");
}
mc_large.btn_info.onRollOut = function() {
this.colorTo(0x3C1E10, 0.2, "easeInOutQuad");
}
mc_large.btn_info.onRelease = function() {
mc_large.copyContainer.alphaTo(100, 0.5, "easeOutBounce",0.7);
mc_large.titleContainer.alphaTo(100, 0.5, "easeOutBounce",0.5);
mc_large.mc_img.blurTo(100, 2, 0.5,"easeOutBounce");
}
/////////////////////////////////////////////
mc_large.btn_exit.onRelease = function() {
mc_large.titleContainer.alphaTo(0, 1, "easeOutBounce",0.3);
mc_large.copyContainer.alphaTo(0, 1, "easeOutBounce",0.1);
//
mc_large.btn_exit.alphaTo(0,0.5,"easeOutBounce",0.7);
mc_large.btn_info.alphaTo(0,0.5,"easeOutBounce",0.5);
mc_large.mc_img.alphaTo(0,0.5,"easeOutBounce",1.0);
//
mc_large.xSlideTo(-2000, 0.1, "easeOutQuad",2.2);
container.alphaTo(100,0.5,"easeOutBounce",1.5);
}

mc_large.btn_exit.onRollOver = function() {
mc_large.g_back.alphaTo(100,0.3,"easeOutBounce");
mc_large.g_back.xSlideTo(223,0.3,"easeOutBounce");
//this.altTip("Back");
}
mc_large.btn_exit.onRollOut = function() {
mc_large.g_back.alphaTo(0,0.3,"easeOutBounce");
mc_large.g_back.xSlideTo(203,0.3,"easeOutBounce");
mc_large.g_back.xSlideTo(243,0.3,"easeOutBounce",0.6);
}

///////////////////////////////////////////////////////////////////////////

MovieClip.prototype.altTip = function(str) {
this.useHandCursor = true;
format = new TextFormat("Praxis LT Semibold", 19, 0xffffff);
this.onRollOver = function() {
_root.createTextField("alt", 1048575, 0, 0, 0, 0);
_root.alt._alpha=0;
this.ID_NAVTIP = setInterval(function (_this) {
_root.alt.alphaTo(100,0.3,"easeOutBounce");
_root.alt.DropShadow_distance = 5;
_root.alt.DropShadow_alpha = .5;
_root.alt.text = " "+str+" ";
_root.alt.autoSize = "left";
_root.alt.embedFonts = true;
_root.alt.background = true;
_root.alt.border = false;
_root.alt.selectable = false;
_root.alt.backgroundColor = "0x000000";
_root.alt.setTextFormat(format);
_root.alt._x = _root._xmouse+10;
_root.alt._y = _root._ymouse-30;
}, 0);
};
this.onRollOut = function() {
_root.alt.alphaTo(0,0.5,"easeOutBounce");
//_root.alt.removeTextField();
clearInterval(this.ID_NAVTIP);
};
};
mc_large.btn_exit.altTip("Back");
mc_large.btn_info.altTip("Project Overview");

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// end content controls ///////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//
stop();

Code:
<?xml version="1.0" standalone="no" encoding="UTF-8" ?>
<imagelist>
<image name="Advertising">
<id>1</id>
<title>You can in the Isle Of Man</title>
<file>ucan.jpg</file>
<keywords>
<keyword rank="1">The Isle of Man Government required a campaign designed to promote the Isle of Man as a business centre with the objective of re-aligning the Isle of Man’s brand image with its brand identity as a leading business centre.</keyword>
<keyword rank="2">Analysing the Island’s strengths, it became apparent that the working relationship between Government and the private sector is unusually close, creating a nimble, pro-active sense of ‘can do’ - across many sectors from E-commerce to Finance, to the DTI.</keyword>
<keyword rank="3">We pushed our positioning statement ‘You can on the Isle of Man’ to the fore, designed to pull this into a powerful proposition, to counter the often typical lack of knowledge about the Island’s unique features and strengths.</keyword>
</keywords>
</image>
<image name="Branding">
<id>2</id>
<title>Vision</title>
<file>vision.jpg</file>
<keywords>
<keyword rank="1">The creation of a new retail opthamology brand in Moscow required clear thinking, especially when that brand would instantly achieve market leadership through a coordinate launch in 10 sites.</keyword>
<keyword rank="2">The logo was designed to create an immediate promise through the dual eagle/human faces. This theme was carried through to store signage and large format poster design as well as a full range of marketing support materials and point of sale.</keyword>
</keywords>
</image>
<image name="Advertising">
<id>3</id>
<title>Manx Telecom</title>
<file>mt.jpg</file>
<keywords>
<keyword rank="1">Client research indicated a consumer misconception that fixed line call charges to international numbers were uncompetitive when compared to UK provider deals.</keyword>
<keyword rank="2">The treatments took this issue head on with a direct price comparison with British Telecom to help reposition Manx Telecom as a competitive provider.</keyword>
<keyword rank="3">Note: Prices quoted on the advertising treatments are no longer current.</keyword>
</keywords>
</image>
</imagelist>

Navigation Probelm
hi
I have 20 html pages website and on the top navigation bar i am using one SWF file. Having 20 buttons.

Now my client want me highlight links in which ever sections they are in.

now i am a bit confused ! could any one help me out with the right coding???

Duplicating Probelm.
See I want my MC to get duplicated only at a certain time or at certain points so I added this.


Code:
if (random(100) == 30) {
i = i+1;
duplicateMovieClip(_root.stick, "stick"+i, i);
this._x -= 5;
}
And that does not seem to wrok.

it doesent add them.

Scrolling Probelm
I have a button and I want it to move a movie clip when someone rollsover it.

on (press, release, rollOver) {
scrollable_text._y = scrollable_text._y-5;
}

this only gets it to go each time it is clicked rolled over or released. How can I get it to be more animated and just flow?

3 Vairables Probelm
ok i have 3 vairables

var1 = 200
var2 = 2

var3 = *

i need this to happend but for the life of me can't get it to work 200 * 2

but i need it to happen using the Varabiles

hope this makes sence

cheers in advance

Simple (GRID) Probelm
Hey,

This is or should be a simple problem... Jus need a quick bit o help to get me going again.

Basically, I have constructed a site layout of simple lines making boxes and such, by using the Line Tool.

Then I relized to get it to work I have to break it apart to get it to work.. so I did.. Make each part a symbol.

Now when I made it I had snap to grid on. So it all lined up right, now that I took it apart, it don't fit on the grid, and when I have snap to grid on it only lines up horozontally, not vertically... it is a few pixels off the grid... and I didn't change anything.. all of them are like this. If I turn off snap to grid, and zoom in I can line them up manually, but I have about 20 peices, and either way,... thats just plain annoying.
I have tried taking snap off, lining it up, and turning it back on.. but it don't work.

Whats wrong, do I have to make all the peices again seperately for it to work???

Please help me, any help at all... so I can get on with working.

Ian

OnResize Function PROBELM
Hi I really hope someone can help. I have a movie which has a background which scales full size and three other mc which stay 100%. The code works well but I want to be able to move the mc's up and down the screen...occassionally out of screen.

Any ideas on how I can do this???

code:

function mainInit() {
// Set alignment and scale to allow onResize to work.
Stage.align = "LT";
Stage.scaleMode = "noScale";

titleClip.onResize = function () {
this._x = Stage.width/2;
this._y = Stage.height/2;
}
grad.onResize = function () {
this._x = Stage.width/2;
this._y = Stage.height/2;
this._width = Stage.width;
this._height = Stage.height;
}
colour.onResize = function () {
this._x = Stage.width/2;
this._y = Stage.height/2;
this._width = Stage.width;
this._height = Stage.height;
}
// Register titleClip to be notified when movie is resized.
Stage.addListener(titleClip);
Stage.addListener(grad);
Stage.addListener(colour);
// Set initial position of title clip.
this.titleClip.onResize();
this.grad.onResize();
this.colour.onResize();
}
mainInit(); // Calling centering function

plenty of thanks in advance!

Probelm With Buttons If Clicked Twice
This is is the simplest of menus, shouldn't have run into any problems, but as luck would have it when you're actually running ahead of shedule for once...

Demo here
.fla File here

Each button works correctly the first time, but when a button is clicked a second time, it goes to the wrong page. Actually, each button goes to the next menu item on the second click. The script for each button is like this:

on (release) {
_level0.gotoAndPlay('mission');
}

I've tried everything, every variation you could use to play a movie clip, I just don't see a reason for the buttons to do this. Anyone have any ideas?

Password Protect Probelm
ok i have a MC _root.admin_login

it contains a button and a input text box assign the variable "password"

the button is located in the mc admin_login so its absolute path would be

_root.admin_login.admin_login.enter

now on the button i have this code


Code:
on (release, keyPress "<Enter>") {
if (password eq "andrew"){
_root.gotoAndPlay("admin", 1);
}
}


but when i try it nothing happens. =/

[cs3]My Flash..probelm With Navigation...help Plz
Hello....This is nithin....im trying to create a flash by using AS2.0 .........
in flash cs3

Im attaching the ".fla" file here.....please please anyone help me.....im struck

http://nithin1234.googlepages.com/ourf7.fla
In this there are four buttons....
1.xyno 2.events 3.dvr 4.contact us

here only contact us is working butt.....no other are working....can anyone please help me...im struck from 2 days.......

Variable Accessing Probelm
hi
am facing some probelm with variables
i created two layers. in one layer i created an array variable..
am unable to access it to another layer.
how to access that viaraible....
can u help me..
tnx
.............Pratap

Probelm Receive Xml With XMLSocket
Hi! I'm doing a socket program which will send and receive data from a server. The server runs perfectly fine with other socket client (vb, java etc).

But I have problem receive data using XMLSocket in Flash. It send successfully, skip the receiving data and then finally go to "history" frame. See code below! Thanks!


var ip:String = "192.168.1.166";
var portNo:Number = 12111;
var client:XMLSocket = new XMLSocket();

client.onConnect = onSckConnect;
client.onData = onSckReceive;
client.onClose = function() {
trace("Connection to server lost.");
};

function onSckConnect(success:Boolean) {
if (success) {
trace("Connected to server!!");
} else {
traceAlert("Error connecting to server");
}
}

function onSckReceive(msg:String) {
traceAlert("Receiving: " + msg);
var doc:XML = new XML(msg);
}

if (client.connect(ip, portNo) == false) {
trace("Unsuccessful connection to server");
gotoAndStop("unsuccessful");
} else {
trace("Successfully connected to server");
client.send("<findmrn ip="192.168.1.99"/>"+newline);
}
/*
client.onXML= function(xmlData){
trace("hello");
trace(xmlData.firstChild.firstChild.firstChild.nod eValue);
}*/

function traceAlert( msg:String ){
Alert.show( msg, "Error/Info", Alert.OK );
}

gotoAndStop("history");

Probelm Instantiating A Class
i have a ScrollBar class.. and i have a scrollBar movieclip setup in flash... im having problems instantiating my class so my scrollBar movieclip will work..

this is my ScrollBar class constructor...

function initScrollBar(scroller:MovieClip, scrollingObj:MovieClip) {
}

these are my two parameters i would like to pass in order for this scrollbar to work

scroller:MovieClip is the scrollBar movieClip in flash
scrollingObj:MovieClip is the text i would like to scroll

thanks in advance

Probelm Receive Xml With XMLSocket
Hi! I'm doing a socket program which will send and receive data from a server. The server runs perfectly fine with other socket client (vb, java etc).

But I have problem receive data using XMLSocket in Flash. It send successfully, skip the receiving data and then finally go to "history" frame.

Please see the attached code for more information. Thank you very much!!







Attach Code

var ip:String = "192.168.1.166";
var portNo:Number = 12111;
var client:XMLSocket = new XMLSocket();

client.onConnect = onSckConnect;
client.onData = onSckReceive;
client.onClose = function() {
trace("Connection to server lost.");
};

function onSckConnect(success:Boolean) {
if (success) {
trace("Connected to server!!");
} else {
traceAlert("Error connecting to server");
}
}

function onSckReceive(msg:String) {
traceAlert("Receiving: " + msg);
var doc:XML = new XML(msg);
}

if (client.connect(ip, portNo) == false) {
trace("Unsuccessful connection to server");
gotoAndStop("unsuccessful");
} else {
trace("Successfully connected to server");
client.send("<findmrn ip="192.168.1.99"/>"+newline);
}
/*
client.onXML= function(xmlData){
trace("hello");
trace(xmlData.firstChild.firstChild.firstChild.nodeValue);
}*/

function traceAlert( msg:String ){
Alert.show( msg, "Error/Info", Alert.OK );
}

gotoAndStop("history");

Probelm With Object.registerClass
i used this action in First frame:

Object.registerClass("com.dell.core.view.components.AbstractComponent", com.dell.core.view.components.AbstractComponent);
com.dell.core.view.components.AbstractComponent;
Object.registerClass("com.dell.core.view.components.ImageBox", com.dell.core.view.components.ImageBox);
com.dell.core.view.components.ImageBox;
Object.registerClass("com.dell.core.view.AbstractPage", com.dell.core.view.AbstractPage);
com.dell.core.view.AbstractPage;
Object.registerClass("com.dell.core.view.components.ResizeButton", com.dell.core.view.components.ResizeButton);
com.dell.core.view.components.ResizeButton;
Stage.align = "LT";
Stage.scaleMode = "noScale";
_global._quality = "BEST";
var theSite = new com.dell.StartUp(this);
stop ();


to load .As External file but don't work . why ?
this is file work myself.
problem file

Please help me. thank

MovieClip Display Probelm
Hi all

I have an external class which sets up a for loop. It has a function to centre the movieClips. When I trace the functions in the output panel it seems to be working correctly yet the movieClips are not displayed.

Any help would be good.

Thanks R







Attach Code

package {

import flash.display.*;

public class Index extends MovieClip {

public var gridNumber:Number = 10;

public function Index(){

var spacing:Number = returnedStageSpacing;

function centreStage(evt:Number):Number{
return evt / 2;
}

var returnedStageSpacing = centreStage(10);

for(var i:Number = 0; i < gridNumber; i++){
var sq:MovieClip = new Sq;
sq.x = spacing;
sq.y = 200;
trace(returnedStageSpacing);
trace(sq);
addChild(sq);
}
}
}
}

Map Zoom Probelm Help Needed Please
Hi i have created a number of plans with a pan and zoom function, however when zooming in the plan gets cut off and the whole plan cannot be seen also the panning from the small navigation seems to follow mous pointer and not the faded box, to make sense of what im saying u can see my problem here

www.freshlemon.co.uk/ppm/plans.html

if u select ground floor u will see my plan if u navigate using zoom bar and then use small windo t o move around u can see the problem i have the plan gets cut off on the right and shows too much on the left, i have folowed a tutorial to complete this, you can see the fla file here

www.freshlemon.co.uk/ppm/plans.fla

All comments are stated please can someone help really desperate thanx

Variable Accessing Probelm
hi
am facing some probelm with variables
i created two layers. in one layer i created an array variable..
am unable to access that variable to another layer.
how to access that viaraible....
can u help me..
tnx
.............Pratap

Change The Interval Of An Interval?
Hey,
I was wondering if there is a way to change the interval of an interval? With this I mean, the amount of MS's it waits before the function is called.

I would also like to know if there is a noticable difference on different computers when using intervals <60?

Thnx,
SaphuA

Strange Probelm Dynamic Txt Fields
Right guys i have been trying to resolve a problem with masking txt fields. Sort of got it sorted but now i am faced witha strange problem.

I am trying to repostion dynamic txtfields.

I have got it working to a point. It works with one button but not on another, very strange. here's the code/

on (press) {Working
if (_root.win3mx == true) {
_root.win3mx = false;
_root.snd1.start(0, 1);
//Postion GB txt fields
_root.win3.gbdata.count1._visible= false;
_root.win3.gbdata.count2._visible= false;
_root.win3.gbdata.gbfield._visible= false;
_root.win3.gbdata.counter._visible= false;
_root.win3.gbdata.Cotxt._visible= false;
_root.win3.gbdata.Ntxt._visible= false;
_root.win3.gbdata.Stxt._visible= false;
_root.win3.gbdata.Wtxt._visible= false;
_root.win3.gbdata.Etxt._visible= false;
} else if (_root.win3mx == false) {
_root.win3mx = true;
_root.snd1.start(0, 1);
//Postion GB Txt Fields
_root.win3.gbdata.count1._visible= true;
_root.win3.gbdata.count2._visible= true;
_root.win3.gbdata.gbfield._visible= true;
_root.win3.gbdata.counter._visible= true;
_root.win3.gbdata.Cotxt._visible= true;
_root.win3.gbdata.Ntxt._visible= true;
_root.win3.gbdata.Stxt._visible= true;
_root.win3.gbdata.Wtxt._visible= true;
_root.win3.gbdata.Etxt._visible= true;
}
}
//--- not working///
on (press) {
startDrag(this, false, 500, 460, -110, 2);
_root.win3.win3dis._alpha = 20;
_root.win3.win3top._alpha = 20;
_root.win3Stat = false;
//Postion GB txt fields
_root.win3.gbdata.count1._visible = false;
_root.win3.gbdata.count2._visible = false;
_root.win3.gbdata.gbfield._visible = false;
_root.win3.gbdata.counter._visible = false;
_root.win3.gbdata.Cotxt._visible = false;
_root.win3.gbdata.Ntxt._visible = false;
_root.win3.gbdata.Stxt._visible = false;
_root.win3.gbdata.Wtxt._visible = false;
_root.win3.gbdata.Etxt._visible = false;
}
on (release) {
stopDrag();
_root.win3Stat = true;
_root.win3.win3dis._alpha = 100;
_root.win3.win3top._alpha = 100;
//Postion GB txt fields
_root.win3.gbdata.count1._visible = true;
_root.win3.gbdata.count2._visible = true;
_root.win3.gbdata.gbfield._visible = true;
_root.win3.gbdata.counter._visible = true;
_root.win3.gbdata.Cotxt._visible = true;
_root.win3.gbdata.Ntxt._visible = true;
_root.win3.gbdata.Stxt._visible = true;
_root.win3.gbdata.Wtxt._visible = true;
_root.win3.gbdata.Etxt._visible = true;
}


cheers guys

Probelm With Sorting Loop Data
I have a php script that echo back some variable example as below:
nameDate1 = a;
nameDate1 = b;
nameDate1 = c;
nameDate1 = d;
etc..

here the script in flash to process it:

Code:
for (i=0; i<=totalRow; i++) {
duplicateMovieClip(nameSlot.entrySlot, "entrySlot"+i, i);
nameSlot["entrySlot"+i].name.text = nameData+i;
nameSlot["entrySlot"+i]._y = 15*i;
}
it doesn't really work well, the problem is with the "nameData+i" part. how can i author this minor to make the script work again?


chup

Runtime Shared Library Probelm.
Hi All,

This is the first time I ever used this runtime shared library concept.
I'll first explain the context in which I used / and how I used.
Its bit lengthy query, but for better explanation, I had to write this. pl bare with me.

What I have:
We have an web application developed in Flash which contains some
graphics (MCs). This app changes its skin(BG image, some anims, graphics etc) based on the
the client category. currently we have 5 categories and we have 5 different apps. each one is
customised for each type of customer. but in future those client categories are going to increase
and we need to have more application respective to them.


What I want:
Now what I want to do is, our basic app is going to remain same in one SWF. which has just
app front end logic and all. now I want to seperate these MCs (BG, anims, graphix) from the
app swf and put them in different SWF and use them what ever I want.


What I did:
I have removed those assets from the app swf which actually have LInkage ID (i am
attaching them at run time) and put these assets in another SWF called 'assets.swf'
and in the 'assets.swf' I put them all in library and gave linkage IDs and also set
the option 'Export for run time sharing' and gave the file name as 'assets.swf' too.

And in the app swf, I created MCs whose properties are set as 'Import for run time sharing'
and gave the linkage Id same as the one which I gave in 'assets.swf' the file name as 'assets.swf'.
And I placed these MC inside another MC whose are set for 'Export for Actionscript'.

i.e. for simplicity, I am using / attaching the MCs in my app swf at runtime whose inside
I have those MCs which are being'IMPORTED' from the assets file.

Now both these application swf & the assets swf are in the same location at the web server.
i.e. for example lets say

http://192.168.200.20/myapp/flash/app.swf
http://192.168.200.20/myapp/flash/assets.swf

When I load the application, I am not able to see those imported MCs from the assets in
the app swf. where did I go wrong? whether my approach is correct or not?

any comments/suggestions/improvements are appreciated.

Thanks all in adv,
Pandu

Help With Calling Javascript Function Probelm.
Ok I'm creating an HTML site with a Flash nav. You can view the site here. All my content is loaded into an iFrame in the center section of the page. I have this part working fine in my flash file. The problem I'm having is if you click on "About RSAA" and then on "Bylaws" it uses javascript to open a new window which contains a .pdf. That part works fine, the part that's confusing me is inside my iFrame the line "[object]" appears. I want the iFrame to stay on the same page that it was on before.

Here's what my js in flash looks like.

Code:
javascript:window.open('http://dev.rsana.com/site/visitors/about/byLaws.pdf','bylaws','width=700,height=600, scrollbars=yes, resizeable=yes')
And here's what the javascript on the HTML page looks like.

Code:
window.open('url to open','window name','attributes')
Any help or suggestions would be awesome cause I'm stumped at this point.

_root Probelm In Flash Mx 2004
i have one sample full flash website nad now it has 6 sub pages,afcourse they are all connected with the root, and i don't know how to add one more page that i made,i don't know how to connect it with the button..When i see he action window for the button1 it says: _root.link = 2 , and 2 is a symbol 200 , and i don't know how to do this...i can only see the structure it goes _root=>gates>pages>and then sybols that make these subpages...can someone explain who can i add a few more pages to the root...the pages are actualysymbols(movie clips)..thank you and sorry for my bad english

Probelm Triggering A MouseOut Event
I have a button on the stage, that plays a movie clip when the user hovers over the button, and stops the movie clip when the user moves the mouse off of the button.

To do this I obviously set up two event listeners (over and out).

I then set up a third event listener (down) so that the user can click and it will take the user to another frame in the timeline (where this button does not exist).

The problem I have, is that when I click the button, and jump to another frame, the button dissapears, and therefore triggers the buttons Out event, which trys to stop a movieclip that is no longer on the stage and I get an error.

How can I stop the Out event triggering when I click on the button and move elsewhere in the timeline??

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