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




OnPress Scoll Mc



hi im trying to set up an mc (Numbers) that scrolls onPress of a mc (fastBtn) but it doesn't seem to be working, have i stuffed up?var myNum:Number = 0;trace(myNum);while (myNum > 1) {Numbers._y -= 5;}fastBtn.onPress = function() {myNum = 2;};fastBtn.onRelease = function() {myNum = 0;};



Adobe > ActionScript 1 and 2
Posted on: 12/05/2006 06:52:38 PM


View Complete Forum Thread with Replies

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

Scoll?
Hi


I've made a site with many text field with are readed in from a txt file.

And i've added a scroll bar to all the textfields.
They work but if i enter the first field and then change to another text which is bigger for example, the scoll bar stays the same size and on the position where i left it with text1

is there no way to "reload" the scroll bar when entering every new frame with textfield so the scroll bar matches the text??

thanx

Gilo

Scoll Bar
Hi, i have made a scroll bar with flash and a textbox (dynamic).

I type text inside the textbox and it is able to scroll down and up...

lets say in the middle i wnana have a button, how to i add it? The button don scroll only the text does.

how to solve it/

Scoll Bar
Hi, ive been looking into custumizing the scrollpane. But the skinning is just so mutch.
All i want is a down buttun and up butten, and a scroll to drag, realy simple, isnt there any simple way to do this?

Scoll Question
I need to use two buttons to scroll a scroll pane, one to scroll down, one to scroll up. What code do I use to do this?

Textfield And Scoll Bar Help
what went wrong

1. one frame flashmx file.

2. frame action is as follows:

loadVariables("readme.txt", "");
stop();

3. dynamic text field built, variable named textHere

4. dragged the scrollBar component to this text field, it auto named the text field instance to InstanceName_0, and targeted itself to that text field.

5. test the movie.

6. The text field is filled (as much as field will allow) with text from the external file. good and fine.

7. scroll bar is visiable, but no scroll functionability. I cannot scroll the text.

How come?

Scoll In Flash
erm...take a look http://www.miruki.com/ saw the scoll in flash ?How to do?teach me can??

Scoll Bar Problem Pls Help
hello eveyone, i got a problem for my scoll bar . the text is missing when i scoll down . can anyone 1 help ..

i attch my file here for you to eddit
thanks

Scoll Bar Question.
This is not particularly urgent, just wanting to spruce up some of my scrolling text panes. Anybody know how to do that cool thing where the text fades into the box and fades out when you scroll up and down... Is it done with masks?

Scoll Bar Question
Hello,
This is probably something in my settings but here it goes...

I made my move at 790x590.

here are my settings in flash html............

flash only
dimensions = 100%x100%
scale = no scale
flash alignment = center x center

This works fine as long as the resolution is above 800x600 but if you view this at a resolution of 800x600 there are no scroll bars and you cant see the whole movie

My question is, how do i make it so people at 800x600 resolution can have scroll bars and be able to view the whole movie?? or is there a way to do this with out scroll bars yet still keep my movie at 790x590?

Scoll In Flash
erm...take a look http://www.miruki.com/ saw the scoll in flash ?How to do?teach me can??

Scoll Text Not Using Scrollbar
hello!
please, have a look at this example and if you go to one of the curriculum, you'll see the thing i wanna get: how make the text go down and up without clicking anything and no scrollbar!
thanks in advance for any help!

Browser Scoll Bar, Within Flash?
Hi,


I want to have a vertical scroll bar that appears within my flash design. My site launches into it's own browser window, wherein I disabled the scroll bar, because it's so ugly. I'm finding that some users with smaller screen resolutions are having problems accessing my site. I'd like to build a simple, browser like scroll bar into the side of my project, so I can control the way it looks.

I've searched, and come up with a few instances that are over my head.

Is there a semi-straight forward way of dealing with this?

Thanks for any help,


-AX1

Simple Scoll Buttons
Hello -

I'm trying to do a simple scroller -

I have a dynamic text box (ing) and next to it I have an up button and down button. These buttons will control the scrolling.

on (press) {
Move the text in _root.ing up or down dependng on the button pressed

}

how would one go about doing this?

Thanks in advance - I know it's simple...

Cole

How To Zoom And The Scoll Content Up And Down
Hello guys

I'm trying to figure out how to make a nice zoom effect and then be able to scroll the content, if possible with the mouse wheel. I've read through tons of posts here but none really explained what I'm looking for.

The effect should be, that you have some pages with pictures and text, and if you click on one of them, it zooms in, so first of all you'll be able to read the text and the scroll up/down to see the whole page/picture. Any help is much appreciated.

Regards
Fahlsten

Please Somebody Sort Text Scoll Out
I have attached a flash source file

If you play it, you will notice it works,,,,


BUT THERE IS A HUGE PROBLEM

THE SCROLL DOES NOT SHOW THE TEXT RIGHT AT THE BOTTOM

IT ONLY SHOWS UPTO - PC HEALTH CHECK

There is another paragraph after that...

If anyone has the solution, please tell me it or send me a fixed updated source file, thanks

[MX04] Scoll Bar Problem
I found a script for a scrollbar in the movies section:


Quote:




onClipEvent (load) {
setProperty(this, _y, _root.scrollbar._y - _root.scrollbar._height * 0.5);
magnification = (_root.object._height - _root.scrollbar._height) / (_root.scrollbar._height);
objectstart = _root.object._y;
sliderstart = _root.slider._y;
top = _root.scrollbar._y - _root.scrollbar._height * 0.5;
bottom = _root.scrollbar._y + _root.scrollbar._height * 0.5;
}
onClipEvent (enterFrame) {
setProperty(_root.object, _y, (_root.slider._y - sliderstart) * -magnification + objectstart);
}








The thing is, I need to place it within an MC. Once I do that it doesnt work. Im guessing this is to dowith the _root path of the script as the symbols init are on the main timeline. Ive tried different variations of the path but cant work it out.

Assuming the MC it is held in has an instance name of 'holder' can anyone show me how whats going wrong.

http://www.flashkit.com/movies/Scrip...4050/index.php

^^^Link to the .fla

Alternatively if anyone has a scrollbar that works inside an MC that would be great too. Thanks

Transparent Text Scoll Box
I want to insert a Flash scrolling text box into my HTML...but I want it to be transparent so that you can see the backround of the page. I have a text box made, but the Flash backround is always some colour, not transparent. Can anyone help!!

Chaning An IFrame Scoll Bar?
Is it possilbe the change how the scroll bar looks for an iFrame? I don't mean CSS becuase it only shows up in IE, so, can I do it?

Menu Scoll Button Link Help..
so far I have been working on a menu scroll from the tutorials section here is the link

http://www.flashkit.com/movies/Inter...5104/index.php

// here is the main swf code

fscommand("allowscale", false);
fscommand("trapallkeys", true);
MovieClip.prototype.acc = 3.9;
MovieClip.prototype.smorz = 1.22;
// ACTION FOR THE BUTTON
MovieClip.prototype.DoSomething = function(theClip) {
trace("nome: "+theClip._name);
trace("valore: "+theClip.mov.txt);
// here you can add your script for the button action...
MovieClip.prototype.DoSomething = function() {
// this is your do something code
_root.loadMovieNum(myLoadswf+".swf", 1);
};

};
// label botton
nomi = new Array("work", "resume", "play", "contact");
loghi = new Array("cubo", "triangolo", "ottagono", "sfera");
loadSWF = new Array("work", "resume", "play", "contact");
max = 3;
// creo il menu
for (i=0; i<=max; i++) {
duplicateMovieClip("_root.menu0", "menu"+i, i);
myMenu = _root["menu"+i];
//the line blow will apply the appropriate name
//variable to each duplicated clip
trace (i+" : "+loadswf[i])
_root["menu"+i].myLoadSWF = loadswf[i];
myMenu.mov.txt = nomi[i];
myMenu.attachMovie(loghi[i], "logo"+i, (5000+i));
myLogo = eval("_root.menu"+i+".logo"+i);
myLogo._x = -76;
newColor = new getColor(myMenu);
}
_root.menu0.attachMovie("cubo", "cubo", (7000+1));
_root.menu0.cubo._x = -76;
// coloro i menu in modo differente
function getColor(what) {
inizio += (255/nomi.length)/3;
colore = new Color(eval(what));
alex = new Object();
alex = colore.getTransform();
alex.rb += inizio;
alex.gb += inizio;
alex.bb += inizio;
colore.setTransform(alex);
}

// here is my button's code

on(release){
this.DoSomething()
trace (myLoadSWF+".swf");
}

If anyone can help me that would be great.. I just can't get the button to load my swf movies

thanks george





// comporranno il nostro menu
//

Mouse Movie Clip Scoll
I need to know, if anyone has tried to control the x y postion of a movie clip, by moving the mouse. I'm just starting out in actionscripting, so this is quite a task for me. If anyone could give me help, I'd really apreciate it.

I don't want ot attach the movie clip to the mouse (like a cursor replacement deal.) I just want to make the movie move in the opposite direction that my mouse moves.

Kind of like navigating through the MC.

Flash Scoll Bar Component Error
Hi everyone,

I've justed tried to use the Flash MX scroll bar component, it works fine as long as the text field (dynamic) does not have a named variable. Problem is that I need it to have a variable name as I am using this text field to pull in dynamic content from an ASP file.

Anyone know why or how to get around this problem.

Cheers

Carl

'Lil Trouble With Text Scoll Bar Componet
Hi,

Actually I have the scroll bar scrolling my text quite easily, and resized the scroll bar itself with little problem. My problem is, in viewing the .swf in the flash player, the scroll bar works perfectly. Viewed in a browser however, there's this annoying thing happening that when I scroll to the bottom of the text field, the bar of the scrollbar stops at around 15 pixels before the bottom arrow. This happens with my mouse scroll wheel as well. Scrolling upwards, the bar goes all the way to the top.

Any suggestions or known issues with this? I can email my .fla if neccessary.

In advance as always, many thanks for any help.
Claude

Smooth Scoll For Dynamic Text?
Hello all,

Does anyone know if there's a vertical smooth scroll
out there but for dynamic text? I have one but it only scroll
static text... :-

Any ideas would be appreciated.

Thanks!

neuhaus3000

Editing Scoll Pane Colors
Hi people !!

I would like to know if there's a way to change the colors of the scroll pane component of flash mx 2004... i would like to have it like it is... but with different colors.. can anyone help me please ????????????????

thanks for your time

Fernando Garcia.

Custom Scoll Bar Tutrorial Questions
I recently went through the custom scroll bars tutorial here on kirupa and am having some problems with the up arrow. it seems that when pressing the up arrow it doesn't go to the top of the movie clip but cuts off about an inch off the top. i've uploaded the file which will display the difficulties i've been having. if anyone could help me out with this issue that would be great.

http://www.g-studios.com/upshift/main_964.swf
http://www.g-studios.com/upshift/main_964.fla

Moving Scoll Position In ListBox
I want to be able to move the list names of the listbox up and down can this be done through actionscript

or is there any way to bring the selected item to the top

Scoll Drag Issue When Moved
Hi

I have a element which need scrolling and at the same time it can move to a secondary position.


Code:

scrollcontainer.scrollFace.onPress = function() {
//
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
//
//
dy = Math.abs(initPosition-this._y);
_root.testing.gah._y = Math.round(dy*-1*moveVal+initContentPos);
//
};
};
2 problems:

1: when I use the above scroll bar it just scrolls in its old position rather than where it should be

2: if I use the up/down buttons it is fairly fluid but obivously not restricted to where it should be

.....

I vagely can see what is going on with the scollbar but the buttons are just nuts

Smooth Scoll For Dynamic Text?
Hello all,

Does anyone know if there's a vertical smooth scroll
out there but for dynamic text? I have one but it only scroll
static text... :-

Any ideas would be appreciated.

Thanks!

neuhaus3000

How Do I Create A Scoll Bar To Manipulate A Graphic/movieclip?
Please help.

I want to create a SCROLLBAR that moves a MovieClip/Graphic from my library containing text and/or images.

I understand the basic up and down buttons when used on next/previous frame when the text graphic is tweened between two points, but want to use a nice scrollbar.

All tutorials I've seen so far on Scrollbars all load the text (text only) from an external source.... - I aint that clever.

Thanks for your time!!

Barney Style Scoll Navigation Not Importing Into Mc
Hey All

Have a look at a stack of the barney style navigation and can get them all working but when I go to import them as a external .swf into a movie they don't work.

I have been playing around with the navigaiton I found on
http://www.the-stickman.com/tutorial...eys_menu.shtml

But cannot get it to work when I have it as a external movie and import it as .swf can you please help ASAP need for job asap.

Regards,
David

Attachmovie, Dynamic Name, Scoll And Remove. Help Needed
Hi all,

I have a problem which kept me up half the night, and still isn't fixed! Perhaps some of the experts on this forum can help me, once again.

I have an diagonal road movie clip which I'd like to scroll of the screen, at a diagonal angle. I'll be using programmatic motion, and attachmovie to create the illusion of of a continous background. When the background is off the screen, I'd like to remove it.

Unfortunately, I can't work out how to use and IF statement (to see if it's off screen) with a dynamic movie clip name ("road"+i).

I'm aware there are similar threads on this forum, but for the life of me I can't find one that addresses this combination of issues.

Any advice, O gurus?

Many thanks in advance,

Lewis

How To Make A Scoll Slow To A Stop Im Both Forwards And Reverse
Hi there.
Ive created a scroll of thumnail images for a website which can be found at: http://60watts.org/pigment/artists.html its not a movie clip, its all done on the main timeline. i created a "controller" ( amovie clip with nothing in it, just three frames, with an action script on each respectivly:

frame 1:stop();
frame 2:_root.prevFrame();
frame 3: gotoAndPlay(2);

the buttons on the main timeline are simple

to go forward:
on (press) {
play();
}
on (release) {
stop();
}

to go back:

on(press) {
_root.controller.gotoAndPlay (2);
}

on(release) {
_root.controller.gotoAndStop (1);
}


what can I add this to make the scroll NOT abruptly stop??
again, the thumbnails are not a movie clip, its all in the main timeline.

thanks for your time.
60watts

Onpress But Not Visible Before The Onpress...
I'm gonna try and make this as simple as possible.

I have a button.


What i want to have happen is that when I click on the button, another movie clip appears and does its thing.

What I'm confused about is how to get the movie clip to be on the stage but not be visible until the click. Thanks

Mc With OnPress Within Another Mc With OnPress - Issue
Hi Guys,

I am wondering if I am going nuts but I have an Mc within another mc.
I would like both of them to ba able to have an onpress event.

here is the code

container.onPress = function(){
trace('contaienr');
}
container.scroller.onPress = function(){
trace('scroller');
}

The scroller movie is smaller than the main movie.

Why when I click on the scroller movie - does it not pick up the trace('scroller');??

Thanks

Mani

Button OnPress Calls Another Button's OnPress?
I've run into a problem that's driving me crazy. I'd really appreciate it if someone could take a look at this and help me out.

You can see a working example of the file at: http://www.benekdesign.com/ILRE/map.php

Here is the problem:

First, click on the Abaco island shape on the map. You'll see on rollOver there is a glow around the island. Now click on that island and the glow remains for the zoomed-in detailed view. When you return to map and zoom back out, the glow is removed.

Now, compare this with clicking on the island name "Abaco" from the list on the right, instead of clicking directly on the island from the map. It zooms in and shows the details fine, but the glow that should be there is not.

The reason this problem is very perplexing for me, is that the onPress action of the list button in the right column calls the onPress function of the map button. So, theoretically they should do the EXACT same thing when pushed. But clearly they don't.

Here is the code for the button from the list on the right panel:


Code:
listAbaco_mc.onRollOver = function() {
_root.map_mc.abaco_mc.button_btn.onRollOver();
};
listAbaco_mc.onRollOut = function() {
_root.map_mc.abaco_mc.button_btn.onRollOut();
};
listAbaco_mc.onPress = function() {
_root.map_mc.abaco_mc.button_btn.onPress();
};
And here is the related code from the root that includes the onPress referenced above plus all functions called as a result of that (some areas to note are bolded):


Code:
//++++++++++++++++++++++++++++++++++++++++++++++
// functions
//++++++++++++++++++++++++++++++++++++++++++++++
// function to open/close side menu
openPanel = function (island) {
panel_mc.alphaTo(20, .001, "linear", 1.4, function () {
panel_mc.gotoAndStop(island);
});
panel_mc.xSlideTo(603, .7, "easeOutQuint", 1.5);
panel_mc.alphaTo(100, .7, "easeOutQuad", 1.5);
};
closePanel = function () {
panel_mc.xSlideTo(925, .7, "easeInQuint", 0);
panel_mc.alphaTo(20, .7, "easeInQuad", 0);
};
// function to fade out unselected islands on zoom
fadeIslands = function (alpha, mapPath) {
map_mc.extraIslands_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.abaco_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.acklins_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.andros_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.bimini_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.berry_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.cat_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.crooked_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.eleuthera_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.exuma_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.grand_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.inagua_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.long_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.mayaguana_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.np_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.rumcay_mc.alphaTo(alpha, 1, "linear", .3);
map_mc.sansalvador_mc.alphaTo(alpha, 1, "linear", .3);
if (alpha < 100) {
mapPath.alphaTo(100, 1, "linear", .3);
}
};
// function to fade labels on zoom
fadeLabels = function (alpha, delay) {
map_mc.labels_mc.alphaTo(alpha, .5, "linear", delay);
if (alpha == 100) {
map_mc.labels_mc.abacoLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.acklinsLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.androsLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.biminiLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.berryLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.catLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.crookedLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.eleutheraLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.exumaLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.grandLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.inaguaLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.longLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.mayaguanaLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.nassauLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.npLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.rumcayLabel_mc._alpha = labelAlpha;
map_mc.labels_mc.sansalvadorLabel_mc._alpha = labelAlpha;
}
};
// disable island buttons when zoomed in
disableButtons = function () {
map_mc.abaco_mc.button_btn.enabled = false;
map_mc.acklins_mc.button_btn.enabled = false;
map_mc.andros_mc.button_btn.enabled = false;
map_mc.bimini_mc.button_btn.enabled = false;
map_mc.berry_mc.button_btn.enabled = false;
map_mc.cat_mc.button_btn.enabled = false;
map_mc.crooked_mc.button_btn.enabled = false;
map_mc.eleuthera_mc.button_btn.enabled = false;
map_mc.exuma_mc.button_btn.enabled = false;
map_mc.grand_mc.button_btn.enabled = false;
map_mc.inagua_mc.button_btn.enabled = false;
map_mc.long_mc.button_btn.enabled = false;
map_mc.mayaguana_mc.button_btn.enabled = false;
map_mc.nassau_mc.button_btn.enabled = false;
map_mc.np_mc.button_btn.enabled = false;
map_mc.rumcay_mc.button_btn.enabled = false;
map_mc.sansalvador_mc.button_btn.enabled = false;
};
enableButtons = function () {
map_mc.abaco_mc.button_btn.enabled = true;
map_mc.acklins_mc.button_btn.enabled = true;
map_mc.andros_mc.button_btn.enabled = true;
map_mc.bimini_mc.button_btn.enabled = true;
map_mc.berry_mc.button_btn.enabled = true;
map_mc.cat_mc.button_btn.enabled = true;
map_mc.crooked_mc.button_btn.enabled = true;
map_mc.eleuthera_mc.button_btn.enabled = true;
map_mc.exuma_mc.button_btn.enabled = true;
map_mc.grand_mc.button_btn.enabled = true;
map_mc.inagua_mc.button_btn.enabled = true;
map_mc.long_mc.button_btn.enabled = true;
map_mc.mayaguana_mc.button_btn.enabled = true;
map_mc.nassau_mc.button_btn.enabled = true;
map_mc.np_mc.button_btn.enabled = true;
map_mc.rumcay_mc.button_btn.enabled = true;
map_mc.sansalvador_mc.button_btn.enabled = true;
};
// function to zoom into map
zoomIsland = function (island) {
// set some vars depending on which island to zoom to
switch (island) {
case "abaco" :
_root.accomLink = _root.abaco[0];
_root.direcLink = _root.abaco[1];
_root.activLink = _root.abaco[2];
_root.propLink = _root.abaco[3];
mapX = 650;
mapY = 750;
mapScale = 300;
mapPath = _root.map_mc[island + "_mc"];
break;
case "acklins" :
_root.accomLink = _root.acklins[0];
_root.direcLink = _root.acklins[1];
_root.activLink = _root.acklins[2];
_root.propLink = _root.acklins[3];
mapX = -420;
mapY = -490;
mapScale = 500;
mapPath = _root.map_mc[island + "_mc"];
break;
case "andros" :
_root.accomLink = _root.andros[0];
_root.direcLink = _root.andros[1];
_root.activLink = _root.andros[2];
_root.propLink = _root.andros[3];
mapX = 675;
mapY = 250;
mapScale = 225;
mapPath = _root.map_mc[island + "_mc"];
break;
case "berry" :
_root.accomLink = _root.berry[0];
_root.direcLink = _root.berry[1];
_root.activLink = _root.berry[2];
_root.propLink = _root.berry[3];
mapX = 1235;
mapY = 1025;
mapScale = 700;
mapPath = _root.map_mc[island + "_mc"];
break;
case "bimini" :
_root.accomLink = _root.bimini[0];
_root.direcLink = _root.bimini[1];
_root.activLink = _root.bimini[2];
_root.propLink = _root.bimini[3];
mapX = 2450;
mapY = 1315;
mapScale = 900;
mapPath = _root.map_mc[island + "_mc"];
break;
case "cat" :
_root.accomLink = _root.cat[0];
_root.direcLink = _root.cat[1];
_root.activLink = _root.cat[2];
_root.propLink = _root.cat[3];
mapX = 150;
mapY = 300;
mapScale = 500;
mapPath = _root.map_mc[island + "_mc"];
break;
case "crooked" :
_root.accomLink = _root.crooked[0];
_root.direcLink = _root.crooked[1];
_root.activLink = _root.crooked[2];
_root.propLink = _root.crooked[3];
mapX = -650;
mapY = -620;
mapScale = 700;
mapPath = _root.map_mc[island + "_mc"];
break;
case "eleuthera" :
_root.accomLink = _root.eleuthera[0];
_root.direcLink = _root.eleuthera[1];
_root.activLink = _root.eleuthera[2];
_root.propLink = _root.eleuthera[3];
mapX = 470;
mapY = 470;
mapScale = 350;
mapPath = _root.map_mc[island + "_mc"];
break;
case "exuma" :
_root.accomLink = _root.exuma[0];
_root.direcLink = _root.exuma[1];
_root.activLink = _root.exuma[2];
_root.propLink = _root.exuma[3];
mapX = 400;
mapY = 190;
mapScale = 275;
mapPath = _root.map_mc[island + "_mc"];
break;
case "grand" :
_root.accomLink = _root.grand[0];
_root.direcLink = _root.grand[1];
_root.activLink = _root.grand[2];
_root.propLink = _root.grand[3];
mapX = 1030;
mapY = 1000;
mapScale = 400;
mapPath = _root.map_mc[island + "_mc"];
break;
case "inagua" :
_root.accomLink = _root.inagua[0];
_root.direcLink = _root.inagua[1];
_root.activLink = _root.inagua[2];
_root.propLink = _root.inagua[3];
mapX = -470;
mapY = -750;
mapScale = 400;
mapPath = _root.map_mc[island + "_mc"];
break;
case "long" :
_root.accomLink = _root.long[0];
_root.direcLink = _root.long[1];
_root.activLink = _root.long[2];
_root.propLink = _root.long[3];
mapX = 80;
mapY = -80;
mapScale = 400;
mapPath = _root.map_mc[island + "_mc"];
break;
case "mayaguana" :
_root.accomLink = _root.mayaguana[0];
_root.direcLink = _root.mayaguana[1];
_root.activLink = _root.mayaguana[2];
_root.propLink = _root.mayaguana[3];
mapX = -1320;
mapY = -770;
mapScale = 700;
mapPath = _root.map_mc[island + "_mc"];
break;
case "np" :
_root.accomLink = _root.np[0];
_root.direcLink = _root.np[1];
_root.activLink = _root.np[2];
_root.propLink = _root.np[3];
mapX = 1250;
mapY = 900;
mapScale = 999;
mapPath = _root.map_mc[island + "_mc"];
break;
case "rumcay" :
_root.accomLink = _root.rumcay[0];
_root.direcLink = _root.rumcay[1];
_root.activLink = _root.rumcay[2];
_root.propLink = _root.rumcay[3];
mapX = -580;
mapY = -160;
mapScale = 999;
mapPath = _root.map_mc[island + "_mc"];
break;
case "sansalvador" :
_root.accomLink = _root.sansalvador[0];
_root.direcLink = _root.sansalvador[1];
_root.activLink = _root.sansalvador[2];
_root.propLink = _root.sansalvador[3];
mapX = -850;
mapY = 140;
mapScale = 999;
mapPath = _root.map_mc[island + "_mc"];
break;
default :
//nothing
}
// begin the rest of the function
// hide stuff before zoom
closePanel();
compass_mc.alphaTo(0, .7, "easeOutQuad", 0, function () {
compass_mc._visible = false;
});
bahamas_mc.alphaTo(0, .7, "easeOutQuad", 0, function () {
bahamas_mc._visible = false;
});
introText_mc.alphaTo(0, .7, "easeOutQuad", 0, function () {
introText_mc._visible = false;
});
// move map
map_mc.scaleTo(mapScale, 1, "easeInOutQuad", .3);
map_mc.xSlideTo(mapX, 1, "easeInOutQuad", .3);
map_mc.ySlideTo(mapY, 1, "easeInOutQuad", .3);
// fade islands and labels
fadeIslands(15, mapPath);
fadeLabels(0, 0);
disableButtons();
// re-open panel
openPanel(island);
// show return button
return_mc.back_btn.enabled = true;
return_mc.gotoAndStop(island);
return_mc.alphaTo(100, 1, "easeOutQuad", 2);
// show towns, dots and glow
mapPath.maskDot_mc.ySlideTo(0, 1, "easeOutQuad", 2);
mapPath.land_mc.glowTo(0x084d86, .5, 8, 1, 2, false, false, .5, "easeOutQuad", .5);
};
// function to return to map
returnMap = function () {
// hide stuff for zoom out
closePanel();
fadeIslands(100);
fadeLabels(100, 1.3);
return_mc.back_btn.enabled = false;
return_mc.alphaTo(0, .7, "easeOutQuad", 0);
// move map
map_mc.scaleTo(_root.initialScale, 1, "easeInOutQuad", .3, enableButtons);
map_mc.xSlideTo(_root.initialX, 1, "easeInOutQuad", .3);
map_mc.ySlideTo(_root.initialY, 1, "easeInOutQuad", .3);
// re-open panel and show extras
openPanel("start");
compass_mc._visible = true;
bahamas_mc._visible = true;
introText_mc._visible = true;
compass_mc._alpha = 0;
bahamas_mc._alpha = 0;
introText_mc._alpha = 0;
compass_mc.alphaTo(100, 1, "easeOutQuad", 1.5);
bahamas_mc.alphaTo(100, 1, "easeOutQuad", 1.8);
introText_mc.alphaTo(100, 1, "easeOutQuad", 2.1);
// hide towns, dots and glow
mapPath.maskDot_mc.ySlideTo(-150, .7, "easeOutQuad", 0);
mapPath.land_mc.glowTo(0x084d86, 0, 3, 0, 2, false, false, 2, "easeOutQuad", .3);
};
//++++++++++++++++++++++++++++++++++++++++++++++
// fade in on start
//++++++++++++++++++++++++++++++++++++++++++++++
water_mc.alphaTo(100, 1, "easeOutQuad", 0);
compass_mc.alphaTo(100, 1, "easeOutQuad", .5);
bahamas_mc.alphaTo(100, 1, "easeOutQuad", .8);
introText_mc.alphaTo(100, 1, "easeOutQuad", 1.1);
map_mc.alphaTo(100, 2, "easeOutQuad", 1);
openPanel("start");
//++++++++++++++++++++++++++++++++++++++++++++++
// check for querystring and load island
//++++++++++++++++++++++++++++++++++++++++++++++
this.onEnterFrame = function() {
if (_root.startIsland != "" && _root.startIsland != undefined && _root.startIsland != "map") {
map_mc[_root.startIsland + "_mc"].button_btn.onPress();
}
delete this.onEnterFrame;
};
//++++++++++++++++++++++++++++++++++++++++++++++
// island buttons
//++++++++++++++++++++++++++++++++++++++++++++++
// abaco
map_mc.abaco_mc.button_btn.onRollOver = function() {
this._parent.land_mc.shape_mc.colorTo(0xffffff, .3, "easeOutQuad", 0);
this._parent.land_mc.glowTo(0x084d86, 1, 3, 1, 2, false, false, .3, "easeOutQuad", 0);
this._parent._parent.labels_mc.abacoLabel_mc.alphaTo(100, .3, "easeOutQuad");
panel_mc.listAbaco_mc.colorTo(0x000000, .3, "easeOutQuad", 0);
panel_mc.leaf2_mc.alphaTo(100, .3, "easeOutQuad", .2);
panel_mc.leaf2_mc.ySlideTo(panel_mc.listAbaco_mc._y, .3, "easeOutQuad", 0);
};
map_mc.abaco_mc.button_btn.onRollOut = function() {
this._parent.land_mc.shape_mc.colorTo(0xd8eefb, .3, "easeOutQuad", 0);
this._parent.land_mc.glowTo(0x084d86, 1, 5, 0, 2, false, false, .3, "easeOutQuad", 0);
this._parent._parent.labels_mc.abacoLabel_mc.alphaTo(labelAlpha, .3, "easeOutQuad");
panel_mc.listAbaco_mc.colorTo(0x0d4a88, .3, "easeOutQuad", 0);
panel_mc.leaf2_mc.alphaTo(0, .3, "easeOutQuad", .2);
};
map_mc.abaco_mc.button_btn.onPress = function() {
zoomIsland("abaco");
this._parent.land_mc.shape_mc.colorTo(0xd8eefb, .3, "easeOutQuad", 0);
};
There is more code, for example rollOver, rollOut, and Press actions for the other island buttons, but they are all of the exact same format as the Abaco island button and they all have the same problem.

So, to recap, the problem is that the list button in the right panel do not function properly onPress, even though they are calling the onPress function of the island buttons directly, and the island button onPress function works perfectly. Strangely, all but one little thing works. So it's obviously getting to the correct functions and going through the code as planned, yet that one part about the glow is being ignored or otherwise messed up.

I'm pulling out my hair on this one and I'd really appreciate some guidance. This project is nearly done except for this one setback.

Thanks kindly in advance for help.
Cheers,
Benek

OnPress
hi all,

my problem is that i don't catch the onPress event on a button.

I have a movie clip which contains an instance of a button.
The ActionScript's code of the button instace is :
on(press) {
trace("onPress called");
}
but it makes nothing when clicking on the button.

If i put this code :
this.onPress = function() {
trace("onPress called");
}
the compilator tells me an error :
"Statement must appear within on handler"

2 things :
- i don't have really understand the difference between on(press) an onPress...
- how can i catch the 'click on my button' event

thanks in advance,
pandareum

Help With Onpress
this.onRelease = function() {
_parent.gotoAndStop("mx", 1);
};



this should work to onpress goto a certain frame

Help Please With Onpress
how would i make it so onpress of a mc it goes to another scene




home.graffiti.net/fite_club/menu

OnPress
hey, im not a big actionscripter but here is what im tryn to do.

im tryn to jump from frame 1 to frame 2 on my scene when a button being pressed or released. im not able to do this!!
in the button editing i cant use any actions at all. but then in the sence the onPress function just wouldnt execute. how do i know??


Code:

stop();
a = 0;
StartMenuButton.onPress = function() {
a = 1;
};
i've made a layer with both a keyframe on frame 1 and a keyframe on frame 2 and created a text box wich shows me the value of a. its always stays on 0.

i just want the scene togo to frame x from the current frame if a button been pressed. how do i do that??

thnx for ur time.

-X-

Using .onPress
i am having trouble using the onPress function in my project.

// the following is just a snippet of my code but i think it is the most important part; it works perfectly in it one by one i load the jpegs into movieclips embeded in other movieClips

if (cycle<=_parent.info.total) {
this.createEmptyMovieClip("newClip"+cycle, cycle+1);// i then create a second movieClip within the first to load a jpeg into
this["newClip"+cycle].createEmptyMovieClip("inner_newClip"+cycle, 1);
location = 'http://turnoffthe.tv/experimental/directorytest/images/'+_parent.info['image'+cycle];
this["newClip"+cycle]["inner_newClip"+cycle].loadMovie(location);
this["newClip"+cycle].attachMovie("frame", "frame"+cycle, 10);// the 'frame' movie clip sits above the jpeg and is attached to the outer mvClip
cycle++
}

// it is with the following code that i am having problems
for (n=0; n<_parent.info.total; n++) {
this["newClip"+n].onPress = function() {
_parent.textbox += n+" is ok";
};
}
//for some reason the textbox, regardless of which image i press returns either ' 1 is ok' or '15 is ok' (_parent.info.total =15)
everything works except the .onPress = function I am at a total loss as to what it could be. Is it that
the onPress is just tempramental and i can't use it whilst targeting movieClips , or is it faulty code.
any input would be appreciated

OnPress, Please Help
Does anyone know of a way to change the time-interval of the onPress function? By default you have to hold the mouse button down for a certain amount of time before it trggers the event.. any prototype solution?

Any advice, please!

[F8] OnPress Help
I have a button that when pressed should take me to another page on my website.
The current actionscript code i have is:
forum.onPress = function(){
getURL("forum.htm");
};

But i keep getting "Statement must appear within on handler error messages"
Please help

Chris

Where Did OnPress Go?
I need onPress because I'm doing an navBar drag where onPress starts the drag and onRelease stops it. "click" is the equivalent to onRelease right, but I don't see an equivilant for onPress, and capturing and hadling all mouseDown events is definitely not something I want to do.

FlashDocs are almost no help when it comes to AS3 Event types. Description of CLICK: "Defines the value of the type property of a click event object." Oh is THAT what it does.

OnPress Q
AS2

I cant understand what I am doing wrong. No matter what I do, I cannot get
teh onPress ot work. Thoughts?:


dealer = this.getLogoInfo();

trace(dealer['photo']+" -> "+dealer['link']);

this.logo_next.onPress = function(){
trace("click");
getURL(_parent.dealer['link']);
}

loadMovie(this.folder_photos+"/"+dealer['photo'],this.logo_next);

OnPress And While
Code:
loadText = new LoadVars();
loadText.load("data.php?"+random(999));

loadText.onLoad = function() {

i=0;
while(i<30) {
_root.movieclip["b"+i].onPress = function() {
_parent.blacktext.text = loadText["datas"+i];
}
i++;
}

}
This code basically takes varaibales from php page that outputs this


Code:

&datas0=test&datas1=testtest
........ all the way to ..&datas29=testtesttest
anyways this doesnt work... doesnt anyone know why? when i click the button in flash i want the corresponding datas ( data ) to show up.. in blacktext.text

please help..

i hope that makes sense

OnPress?
hi i'm looking for help ,
i wont laod some jpg to my project and after load i wont that user could click on them (jpg) and when he do this they make bigger
i do some thing like this:

_root.createEmptyMovieClip("jpg_mc",1);
with(jpg_mc)
{
loadMovie("picture1.jpg");
_xscale=10;
_yscale=10;
_x=100;
_y=100;

onPress=function()
{
trace("working"); //but this doesn't work! Why?
}
}



and ofcourse i have more pictures and i wont to load them dynamicle
so:

for(i=1;i<12;i++)
{
_root.createEmptyMovieClip("jpg_mc",1);


_root["jpg_mc"+i].loadMovie("picture"+i+".jpg");
_root["jpg_mc"+i]._xscale=10;
_root["jpg_mc"+i]._yscale=10;
_root["jpg_mc"+i]._x=15+i*5;
_root["jpg_mc"+i]._y=100;
_root["jpg_mc"+i].onPress=function()
{
trace("working"); //but this doesn't work! Why?
}
}

OnPress And While
Code:
loadText = new LoadVars();
loadText.load("data.php?"+random(999));

loadText.onLoad = function() {

i=0;
while(i<30) {
_root.movieclip["b"+i].onPress = function() {
_parent.blacktext.text = loadText["datas"+i];
}
i++;
}

}
This code basically takes varaibales from php page that outputs this


Code:

&datas0=test&datas1=testtest
........ all the way to ..&datas29=testtesttest
anyways this doesnt work... doesnt anyone know why? when i click the button in flash i want the corresponding datas ( data ) to show up.. in blacktext.text

please help..

i hope that makes sense

OnPress?
hi i'm looking for help ,
i wont laod some jpg to my project and after load i wont that user could click on them (jpg) and when he do this they make bigger
i do some thing like this:

_root.createEmptyMovieClip("jpg_mc",1);
with(jpg_mc)
{
loadMovie("picture1.jpg");
_xscale=10;
_yscale=10;
_x=100;
_y=100;

onPress=function()
{
trace("working"); //but this doesn't work! Why?
}
}



and ofcourse i have more pictures and i wont to load them dynamicle
so:

for(i=1;i<12;i++)
{
_root.createEmptyMovieClip("jpg_mc",1);


_root["jpg_mc"+i].loadMovie("picture"+i+".jpg");
_root["jpg_mc"+i]._xscale=10;
_root["jpg_mc"+i]._yscale=10;
_root["jpg_mc"+i]._x=15+i*5;
_root["jpg_mc"+i]._y=100;
_root["jpg_mc"+i].onPress=function()
{
trace("working"); //but this doesn't work! Why?
}
}

OnPress Function
I am trying to place all my code in my action layer in my main movie. Normally I spread my code around in the different buttons and mc's, but I want to change this habit. Anywho, I want to click a mc(xxx) that is inside another mc (morphMain), and have "hi" pop-up when I test the movie. What is wrong with this code (it doesn't work)?

_root.morphMain.xxx.onPress = function() {
trace(hi);
};

Thanks,
gamist

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