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




Flash Mouse Tracker



Hi all,

Thanks for your interest in my post.

I was just wandering if anybody can give me a detailed tutorial on Flash 5 mouse trackers please.

Here is the link to the specific mouse tracker that I want to do (it's in HTML, but as I say, I want to do it in Flash!):

http://www.alanvandermerwe.com/indexmain.htm

It's at the top of the main frames.

I don't mean to be fussy, but if anybody writes a tutorial for me, can they please write it in step-by-step instructions please as I'm only a beginner to Flash.

Thank you very much everybody.

Take care,

Mark



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-27-2002, 10:13 AM


View Complete Forum Thread with Replies

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

Mouse Tracker
hi everybody, i am new here and this is my first post.

i am a web developer and new to flash. i am developing a nagivation system for a client with 6 circular button positioned irregularly. the effect i want is, as soon as i mouseover each button, it shoud enlarge upto 150% adn others should shrink proportionately.when i mouseover another button, it should enlarge and others including the first mouseovered one should shrink..i am not good in actionscripting, so pls anyone could help? apart from that, the entire button group should require a sensitivity area, so that once the mouse is out of that region, all button should be the 100%. any help would be highly appreciated.

Mouse Tracker
I need to create a "mouse tracker"... a small box graphic that follows the mouse horizontally between 2 set points. And only when the mouse rolls over the menu items. Ive searched for tutorials, but i only find mouse trackers that encompass the entire screen, not set between 2 horizonatal points. Thanks for any and all help. http://www.rickcornett.com

How Do You Create A Mouse Tracker?
hey guys,

thanks for taking the time to look at my post.

i was just wondering, does anyone know how to create a mouse tracker like the one on the nav bar of http://www.rojawheels.com please?

thank you very much and i hope to hear from you.

take care,

mark

Mouse Tracker Behavior Is Different In MC
I created a movie that houses a MC and some invisible buttons that jump to frames to play an animation.

Problem is that the MC (once converted) behaves differently that it would if placed directly on the stage. The "target" is supposed to follow the mouse but when placed in a MC, it seems to be anchored to the middle of the stage and "aims" toward the mouse. Any ideas why?

See attached file.

Site Tracker For Flash?
Can you put a site tracker with flash? If you can I get a few links to some? Thanks

Flash Link Tracker
Hi everyone,
Is there any software or code out there that I can implement on a Flash website to track each link a visitor clicks on. So far I have only found software that tracks the exit page and not the actual link that was clicked. Since there is only one page with 35 links, I need to track the 35 links, not the exit page. Does anyone know of software that can do this?

Thanks

Flash MX Game Hi -score Tracker
Hey all, I was looking for a little enlightenment -
I have made a game in Flash MX, and it is a time based game, the object being to complete obstacles in the shortest amount of time - Does anyone know how I can create a separate web page that can be accessed through a "register" button on the Flash game, and have your hi-score posted on that page, including a screen name, from best at top to worst at the bottom?
Source code, websites or any other resources is greatly greatly appreciated!

thanks
---->FP

Flash MX Game Hi Score Tracker
Hey all, I was looking for a little enlightenment -
I have made a game in Flash MX, and it is a time based game, the object being to complete obstacles in the shortest amount of time - Does anyone know how I can create a separate web page that can be accessed through a "register" button on the Flash game, and have your hi-score posted on that page, including a screen name, from best at top to worst at the bottom?
Source code, websites or any other resources is greatly greatly appreciated!

thanks
FP

Tracker Help.
Hi,

i'm trying to get a line to follow my mouse so it sits under the navigation that i'm hovering over. It seems to work ok but I would like the line to not go back past the start of the navigation. Is there a way to do this? I also have an effect on my navigation that blurs the non selected sections when you roll over another choice (only on 'about us' at the moment). Can ppl let me know if i'm doing this the best way and possibly offer any pointers if not.

I have attached a .fla

Thanks.

P.S. the blue line doesn't always return the same point, is there a way to set this?

Frame Tracker?
say i type

on (press) {
gotoandplay (50);
}

after it plays frame 50, how can i make it so that it goes back to the frame i was in before it went to frame 50?

thanks for your responses

for fun visit www.free-flash-games.cjb.net

Number Tracker...
Hi at the moment ive got random images coming out of a folder, the trouble is some images end up appearing more than others, does anyone know how i could keep track of what random images/numbers have been shown, so that an image isnt repeated until all the images have been shown, if anyone has got any help, it would be much appreciated
thank Lee

Web Stats - Tracker?
I need to create a web stats and tracker for a new site. This will be all flash so I need it to know which sections of the site are being accessed. I thought of writing to a text file with varibles but the only way I know to do that would be access the txt file when you come to a section and add one but if people are accessing the site at the same time then it wont work correctly. Anyone have any ideas what is a good way to do this.

Graph Tracker
I just came across a Graph tracker for Stocks on Yahoo finance in which we could drag the line grph to any timeline. It's ben made in Flash. Does anyone has any clue how it can be done. Also is there any tutorial available on it on Flash Kit.

Click Tracker
I have an example of a click tracker..... this is only part of what I need to acomplish. Attached is a zip file with two fla files and a txt file. The click tracker is heading towards what i am trying to acomplish, but not quite what I need to acomplish. The example-1
fla is a lout of what I want to do minus the actionscript. The txt file eplains what I want to do.

I am a designer with very little scripting knowledge anything help at all would be good help. and if anyone knows of any good books that may help me please let me know.

Route Tracker
Hi guys,

here's a challenga for y'all....

Create an object that follows an underlying image. This image must be random, gif, jpeg, whatever. If the image is totally black or totally white, then the image will not influence the movement but. The movement will then be random. If the image contains a line or anything that closely resembles it, then the goal of the object is to follow this line as closely as possible.

Any of you guys have an idea on how to accomplish this?
I can move objects, random or not, but I wouldn't know how to make it follow a line. Can flash detect changes in color of an image?
e.g.:

ActionScript Code:
xPos = my_object._x;//x coordinate of the objectyPos = my_object._y;//y coordinate of the objectmy_color = getColor(xPos, yPos);//get the color of the pixel at these coordinates//remember this is just example code, not actual functional code.  


I'd love to hear some of your brainstorms.....

Will

Navigation Tracker
Hey guys,

I was wondering if anyone can help me out on making a "tracker" for my navigation. Like if someone at my site clicks on "Portfolio" and then accidently clicks on it again, I don't want the transition to happen again. If anyone could help me that would be greatly appreciated! Thanks!

Route Tracker
Hi guys,

here's a challenga for y'all....

Create an object that follows an underlying image. This image must be random, gif, jpeg, whatever. If the image is totally black or totally white, then the image will not influence the movement but. The movement will then be random. If the image contains a line or anything that closely resembles it, then the goal of the object is to follow this line as closely as possible.

Any of you guys have an idea on how to accomplish this?
I can move objects, random or not, but I wouldn't know how to make it follow a line. Can flash detect changes in color of an image?
e.g.:

ActionScript Code:
xPos = my_object._x;//x coordinate of the objectyPos = my_object._y;//y coordinate of the objectmy_color = getColor(xPos, yPos);//get the color of the pixel at these coordinates//remember this is just example code, not actual functional code.  


I'd love to hear some of your brainstorms.....

Will

Navigation Tracker
Hey guys,

I was wondering if anyone can help me out on making a "tracker" for my navigation. Like if someone at my site clicks on "Portfolio" and then accidently clicks on it again, I don't want the transition to happen again. If anyone could help me that would be greatly appreciated! Thanks!

Progress Tracker
i have a flash an elearning movie that i created from the presentation template, each new "slide" contains a text box with text inside it. the user moves from page to page using controls. i want to create a progress tracker that will be displayed at the side of the movie and will show the user which slides they have read. this can either be automatic or the user can check a box to say they have finished that slide. i am new to flash and would really appreciate any suggestions as to how this can be done.
thanks
cathie

How Can I Make A Scrollbar Tracker?
Hi there,

Thanks for the interest in my post.

I have a dynamic text field in my Flash movie and two custom buttons which make the text scroll up or down.

Does anyone know how I can make a custom scrollbar that the user can drag up or down like on an HTML page scrollbar. Is this possible or is it fairly straight forward?

Many thanks for any help given.

Take care,

Mark

Realtime Global Tracker
Looking to dynamically plot lat/long coordinate points from a remote moving GPS onto a 3D (or flat image) globe. Anyone know of any fast methods for this?

Problems With Scrollbar Tracker - Please Help
Hi,

Thank you for reading my topic.

I am loading a text file using a movie clip with a dynamic textbox, scroll buttons and tracker inside. The text box and scroll buttons all work fine.

The scrollbar tracker scrolls the text but as soon as you drag it to scroll the .txt, it moves to a new start point. It's difficult to describe so I've uploaded the swf here . My fla can be downloaded from here.

Here is the code I have on the mc:

Code:
onClipEvent (load) {
this.loadVariables("test.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 7;
origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;
function initScrollbar() {
var totalLines = numLines+daTextBox.maxscroll-1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight-scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll-1);
}
function updateScrollBarPos() {
scrollbar._y = lineHeight*(daTextBox.scroll-1);
}
}
onClipEvent (enterFrame) {
if (needInit) {
if (daTextBox.maxscroll>1) {
initScrollbar();
needInit = false;
}
}
if (frameCounter%speedFactor == 0) {
if (scrolling == "up" && daTextBox.scroll>1) {
daTextBox.scroll--;
updateScrollBarPos();
} else if (scrolling == "down" && daTextBox.scroll<daTextBox.maxscroll) {
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}
onClipEvent (mouseDown) {
if (up.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if (down.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if (scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
scrollbar.startDrag(0, origX, deltaHeight, origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}
onClipEvent (mouseUp) {
scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();
updateAfterEvent();
}
onClipEvent (mouseMove) {
if (scrolling == "scrollbar") {
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight+1);
}
updateAfterEvent();
}
onClipEvent (data) {
needInit = true;
I'd really appreciate anyones thoughts on why this is or could be happening please.

Thank you very much and hope to hear from you.

Mark

Using Google Urchin Tracker
hello i need some help on where to insert this Google urchin tracker into my flash action script button to be able to track it with my server software metrics, does anyone have any experience with this sort of thing......? some of the code they give u as an example can be viewed below and at this link..

thanks ajdesign

http://www.google.com/support/analyt...y?answer=27243

Google Analytics lets you track any browser based event, including Flash and JavaScript events. To track an event, call the urchinTracker() JavaScript function with an argument specifying a name for the event. For example, calling:

javascript:urchinTracker('/homepage/flashbuttons/button1');

will cause each occurrence of that Flash event to be logged as though it were a pageview of /homepage/flashbuttons/button1. The argument must begin with a forward slash. The event names may be organized into any directory style structure you wish, and actual pages with these filenames need not exist.

For example, if you wish to organize flash events by page, by type of event, you might organize a hierarchy along these lines:

/homepage/flashbuttons/button1
/homepage/clips/clip1

Important: if your pages include a call to urchinTracker(), utmLinker(), utmSetTrans(), or utmLinkPost(), your Analytics tracking code must be placed in your HTML code above any of these calls. In these cases the tracking code can be placed anywhere between the opening <body> tag and the JavaScript call.

Flash Code Examples

on (release) {
// Track with no action
getURL("javascript:urchinTracker('/folder/file');");
}

on (release) {
//Track with action
getURL("javascript:urchinTracker('/folder/file');");
_root.gotoAndPlay(3);
myVar = "Flash Track Test"
}

onClipEvent (enterFrame) {
getURL("javascript:urchinTracker('/folder/file');");

AS3 Frame Rate Tracker
Does anyone know of some source code for an AS3 frame rate tracker?

This one is what I want but for AS2:

http://www.flashsourcecode.com/source/track_frame_rate/

thanks in advance

//

Problems With Scrollbar Tracker - Please Help
Hi,

Thank you for reading my topic.

I am loading a text file using a movie clip with a dynamic textbox, scroll buttons and tracker inside. The text box and scroll buttons all work fine.

The scrollbar tracker scrolls the text but as soon as you drag it to scroll the .txt, it moves to a new start point. It's difficult to describe so I've uploaded the swf here. My fla can be downloaded from here.

The code I have on the movie clip is attached.

I'd really appreciate anyones thoughts on why this is or could be happening please.

Thank you very much and hope to hear from you.

Mark


Code:
onClipEvent (load) {
this.loadVariables("test.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 7;
origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;
function initScrollbar() {
var totalLines = numLines+daTextBox.maxscroll-1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight-scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll-1);
}
function updateScrollBarPos() {
scrollbar._y = lineHeight*(daTextBox.scroll-1);
}
}
onClipEvent (enterFrame) {
if (needInit) {
if (daTextBox.maxscroll>1) {
initScrollbar();
needInit = false;
}
}
if (frameCounter%speedFactor == 0) {
if (scrolling == "up" && daTextBox.scroll>1) {
daTextBox.scroll--;
updateScrollBarPos();
} else if (scrolling == "down" && daTextBox.scroll<daTextBox.maxscroll) {
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}
onClipEvent (mouseDown) {
if (up.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if (down.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if (scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
scrollbar.startDrag(0, origX, deltaHeight, origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}
onClipEvent (mouseUp) {
scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();
updateAfterEvent();
}
onClipEvent (mouseMove) {
if (scrolling == "scrollbar") {
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight+1);
}
updateAfterEvent();
}
onClipEvent (data) {
needInit = true;

How To Create Tracker Like Mochibot.com?
I am thinking about trying out some more complicated statistics gathering (rather than just using webstats to track hits).

How would one create a script to do tracking where the swf itself would report to you (your server) information about the platform, browser, of the users machine as well as the domain and source where the swf is being viewed from (even if it is copied and played from a local machine) ?

I have looked at Mochibot.com a bit and think it is great, but also think I would be better off learning how to do this myself than using their service....

Problem With Tracker For Dynamic Text Box. Please Help
Hi all,

I have a dynamic text field which has an up and down button and a tracker so it scrolls. It works perfectly but...

The problem is, is that the swf that my scroll stuff is in is loaded dynamically into my main movie (main.swf) via a placeHolder movie clip with an instance name of 'profile' in this case.

When I test main.swf so I can view the dynamically loaded swf that has my scroll stuff in it, everything works except the tracker which, whenever I press the up or down button moves to a random location in it's movie and then stays there. The text box scrolls perfectly but I can't get the tracker to A). move with the text as I scroll it with the buttons B). stop moving to this random location that it does and C). make itself draggable so when I drag it, it scrolls the text.

This is the code I'm using:

Code:
myLV = new LoadVars();
myLV.load("profile.txt");
myLV.onLoad = function() {
myText.htmlText = this.myText;
_root.profile.top = sliderMC._y;
_root.profile.bottom = sliderMC._y+trackMC._height-sliderMC._height;
};
upBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, -1);
};
upBtn.onRelease = upBtn.onReleaseOutside=downBtn.onRelease=downBtn.onReleaseOutside=function () {
clearInterval(scrollI);
};
downBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, 1);
};
_root.profile.sliderMC.onPress = function() {
this.startDrag(0, this._x, top, this._x, bottom);
scrollI = setInterval(scrollF, 80);
};
_root.profile.sliderMC.onRelease = sliderMC.onReleaseOutside=function () {
this.stopDrag();
clearInterval(sliderI);
};
function scrollF() {
var a = (myText.maxscroll-1)/(bottom-top);
myText.scroll = Math.round((sliderMC._y-top)*a+1);
}
function setSlider() {
var a = (bottom-top)/(myText.maxscroll-1);
sliderMC._y = a*(myText.scroll-1)+top;
}
function scrollBtnF(dir) {
myText.scroll += dir;
setSlider();
}
Can someone please tell me where I've gone wrong on this as it used to work perfectly before I made some changes to the code (just the _root.profile..etc. bits) and before it was viewed in main.swf.

Thank you very much and I hope to hear from you.

All the best,

Mark

Problem With Tracker For Dynamic Text Box. Please Help
Hi all,

I've built a site in Flash MX and it's nearly done but there seems to be some coding problems.

If you can check it out at http://www.spindriftmedia.com/test/a...ash/index2.htm you should be able to see the problem. If you click on a button on the main nav, and then when the section comes up (which is a placeHolder mc which has a dynamically loaded swf in it), either close it or select another section, it starts jumping back and forth between two frames of the main swf's preloader. However, when all the dynamically loaded swf's are loaded and stored so they are reading from the cache, this problem doesn't happen and you can skip between the sections ok. It will still happen though when you close a tab.

I don't understand it, when I test the site in Flash, it all works as it should and rarely messes up but when I upload the site, it goes tits up!

I assume this is a coding error. Below are the only bits of code I can think of that could be causing the problem:

I'm using the below syntax to load the text files which are in the dynamicly loaded swf's:

Code:
myLV=new LoadVars();
myLV.load("mytext.txt");
preloadI=setInterval(preloadF,100);
function preloadF(){
loaded=myLV.getBytesLoaded();
total=myLV.getBytesTotal();
if(loaded>0&&loaded>=total){
clearInterval(preloadI);
gotoAndStop(5);
} else {
gotoAndPlay(2);
}
}

...and the below syntax is to make the scrollbars work which are also in the external swf's:

Code:
myLV = new LoadVars();
myLV.load("mytext.txt");
myLV.onLoad = function() {
myText.htmlText = this.myText;
top = sliderMC._y;
bottom = sliderMC._y+trackMC._height-sliderMC._height;
};
upBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, -1);
};
upBtn.onRelease = upBtn.onReleaseOutside=downBtn.onRelease=downBtn.onReleaseOutside=function

() {
clearInterval(scrollI);
};
downBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, 1);
};
sliderMC.onPress = function() {
this.startDrag(0, this._x, top, this._x, bottom);
scrollI = setInterval(scrollF, 80);
};
sliderMC.onRelease = sliderMC.onReleaseOutside=function () {
this.stopDrag();
clearInterval(sliderI);
};
function scrollF() {
var a = (myText.maxscroll-1)/(bottom-top);
myText.scroll = Math.round((sliderMC._y-top)*a+1);
}
function setSlider() {
var a = (bottom-top)/(myText.maxscroll-1);
sliderMC._y = a*(myText.scroll-1)+top;
}
function scrollBtnF(dir) {
myText.scroll += dir;
setSlider();
}


The only other thing that may be causing the problem is that I do have a couple of objects in the placeHolder itself (like the section backgrounds and a hotspot so you can drag each section) but wouldn't have thought that would create the problem, would it?

If anyone has any suggestions as to why you think this might be happening or if you've encountered something similar happening to you, please let me know as the site is due to be launched at the end of the week!!!

Thank you very much and I hope to hear from you.

Take care,

Mark

Scrollbar Tracker Behaving Oddly
Hi,

Thank you for reading my topic.

I am loading a text file using a movie clip with a dynamic textbox, scroll buttons and tracker inside. The text box and scroll buttons all work fine.

The scrollbar tracker scrolls the text but as soon as you drag it to scroll the .txt, it moves to a new start point. It's difficult to describe so I've uploaded the swf here. My fla can be downloaded from here.

Here is the code I have on the mc:


Code:
onClipEvent (load) {
this.loadVariables("test.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 7;
origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;
function initScrollbar() {
var totalLines = numLines+daTextBox.maxscroll-1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight-scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll-1);
}
function updateScrollBarPos() {
scrollbar._y = lineHeight*(daTextBox.scroll-1);
}
}
onClipEvent (enterFrame) {
if (needInit) {
if (daTextBox.maxscroll>1) {
initScrollbar();
needInit = false;
}
}
if (frameCounter%speedFactor == 0) {
if (scrolling == "up" && daTextBox.scroll>1) {
daTextBox.scroll--;
updateScrollBarPos();
} else if (scrolling == "down" && daTextBox.scroll<daTextBox.maxscroll) {
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}
onClipEvent (mouseDown) {
if (up.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if (down.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if (scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
scrollbar.startDrag(0, origX, deltaHeight, origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}
onClipEvent (mouseUp) {
scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();
updateAfterEvent();
}
onClipEvent (mouseMove) {
if (scrolling == "scrollbar") {
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight+1);
}
updateAfterEvent();
}
onClipEvent (data) {
needInit = true;
}
I'd really appreciate anyones thoughts on why this is or could be happening please.

Thank you very much and hope to hear from you.

Mark

Scrollbar Tracker Behaving Oddly
Hi,

Thank you for reading my topic.

I am loading a text file using a movie clip with a dynamic textbox, scroll buttons and tracker inside. The text box and scroll buttons all work fine.

The scrollbar tracker scrolls the text but as soon as you drag it to scroll the .txt, it moves to a new start point. It's difficult to describe so I've uploaded the swf here. My fla can be downloaded from here.

Here is the code I have on the mc:


ActionScript Code:
onClipEvent (load) {
    this.loadVariables("test.txt");
    scrolling = 0;
    frameCounter = 1;
    speedFactor = 3;
    numLines = 7;
    origHeight = scrollbar._height;
    origX = scrollbar._x;
    needInit = false;
    function initScrollbar() {
        var totalLines = numLines+daTextBox.maxscroll-1;
        scrollbar._yscale = 100*(numLines)/totalLines;
        deltaHeight = origHeight-scrollbar._height;
        lineHeight = deltaHeight/(daTextBox.maxScroll-1);
    }
    function updateScrollBarPos() {
        scrollbar._y = lineHeight*(daTextBox.scroll-1);
    }
}
onClipEvent (enterFrame) {
    if (needInit) {
        if (daTextBox.maxscroll>1) {
            initScrollbar();
            needInit = false;
        }
    }
    if (frameCounter%speedFactor == 0) {
        if (scrolling == "up" && daTextBox.scroll>1) {
            daTextBox.scroll--;
            updateScrollBarPos();
        } else if (scrolling == "down" && daTextBox.scroll<daTextBox.maxscroll) {
            daTextBox.scroll++;
            updateScrollBarPos();
        }
        frameCounter = 0;
    }
    frameCounter++;
}
onClipEvent (mouseDown) {
    if (up.hitTest(_root._xmouse, _root._ymouse)) {
        scrolling = "up";
        frameCounter = speedFactor;
        up.gotoAndStop(2);
    }
    if (down.hitTest(_root._xmouse, _root._ymouse)) {
        scrolling = "down";
        frameCounter = speedFactor;
        down.gotoAndStop(2);
    }
    if (scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
        scrollbar.startDrag(0, origX, deltaHeight, origX);
        scrolling = "scrollbar";
    }
    updateAfterEvent();
}
onClipEvent (mouseUp) {
    scrolling = 0;
    up.gotoAndStop(1);
    down.gotoAndStop(1);
    stopDrag();
    updateAfterEvent();
}
onClipEvent (mouseMove) {
    if (scrolling == "scrollbar") {
        daTextBox.scroll = Math.round((scrollbar._y)/lineHeight+1);
    }
    updateAfterEvent();
}
onClipEvent (data) {
    needInit = true;
}

I'd really appreciate anyones thoughts on why this is or could be happening please.

Thank you very much and hope to hear from you.

Mark

Designing A Dynamic Tracker, Need Advice...
Hello Everyone,

I am in process of designing a BMI tracker which would allow users to track their BMI for 52 weeks. I am designing it in FLASH but would like to capture the entered data by the user to a database (MS ACCESS or SQL). I will probably add more features which would also dynamically driven via DB. My questions are:

1. I am assuming I will be using ASP.NET with SQL or ACCESS, would it be easier to have DB spit out XML and then I populate that data in FLASH?

2. Since this tool will be online, having a database spit out XML for each request can probably bog down the server performance (I can be wrong here). Should I not use XML?

3. Are there any off the shelf tracker tools available which can customized?

4. What other technologies can I use to achieve this tool using Flash?

Thanks a lot for all your help.

Scrollbar Tracker Behaving Oddly
Hi,

Thank you for reading my topic.

I am loading a text file using a movie clip with a dynamic textbox, scroll buttons and tracker inside. The text box and scroll buttons all work fine.

The scrollbar tracker scrolls the text but as soon as you drag it to scroll the .txt, it moves to a new start point. It's difficult to describe so I've uploaded the swf here. My fla can be downloaded from here.

Here is the code I have on the mc:


Code:
onClipEvent (load) {
this.loadVariables("test.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 7;
origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;
function initScrollbar() {
var totalLines = numLines+daTextBox.maxscroll-1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight-scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll-1);
}
function updateScrollBarPos() {
scrollbar._y = lineHeight*(daTextBox.scroll-1);
}
}
onClipEvent (enterFrame) {
if (needInit) {
if (daTextBox.maxscroll>1) {
initScrollbar();
needInit = false;
}
}
if (frameCounter%speedFactor == 0) {
if (scrolling == "up" && daTextBox.scroll>1) {
daTextBox.scroll--;
updateScrollBarPos();
} else if (scrolling == "down" && daTextBox.scroll<daTextBox.maxscroll) {
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}
onClipEvent (mouseDown) {
if (up.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if (down.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if (scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
scrollbar.startDrag(0, origX, deltaHeight, origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}
onClipEvent (mouseUp) {
scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();
updateAfterEvent();
}
onClipEvent (mouseMove) {
if (scrolling == "scrollbar") {
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight+1);
}
updateAfterEvent();
}
onClipEvent (data) {
needInit = true;
}
I'd really appreciate anyones thoughts on why this is or could be happening please.

Thank you very much and hope to hear from you.

Mark

Fixed Size Scrollbar Compnent Tracker?
mx 2004. player 7.

the scrollbar component tracker(the little thing you grab with your mouse) expands in height inversely to the ammount of text it is scrolling. i.e. the more text you have, the smaller it gets.

is there any way to disable this... so that the tracker is always the same size no matter how much text there is?

thx.

Problem With Tracker For Scrolling Dynamic Text Box. Please Help
Hi all,

Thank you for reading my post...

I'm having some problems with scrolling a dynamic text field.

When I use _root in my code (see below), everything works fine but I have to use _parent as the swf that the scroll stuff is in is to be loaded dynamically from my main move.

When I use _parent, the buttons work ok but the scroll tracker moves to a random location on the stage and stays there and won't move - and also it won't scroll the text like it should.

Below is the code I'm using in the main timeline:


Code:
myLV = new LoadVars();
myLV.load("profile.txt");
myLV.onLoad = function() {
myText.htmlText = this.myText;
_parent.top = sliderMC._y;
_parent.bottom = sliderMC._y+trackMC._height-sliderMC._height;
};
upBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, -1);
};
upBtn.onRelease = upBtn.onReleaseOutside=downBtn.onRelease=downBtn.onReleaseOutside=function

() {
clearInterval(scrollI);
};
downBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, 1);
};
sliderMC.onPress = function() {
this.startDrag(0, this._x, top, this._x, bottom);
scrollI = setInterval(scrollF, 80);
};
sliderMC.onRelease = sliderMC.onReleaseOutside=function () {
this.stopDrag();
clearInterval(sliderI);
};
function scrollF() {
var a = (myText.maxscroll-1)/(bottom-top);
myText.scroll = Math.round((sliderMC._y-top)*a+1);
}
function setSlider() {
var a = (bottom-top)/(myText.maxscroll-1);
sliderMC._y = a*(myText.scroll-1)+top;
}
function scrollBtnF(dir) {
myText.scroll += dir;
setSlider();
}
I've uploaded my .fla to www.spindriftmedia.com/scroll2.zip and would be most grateful if someone could have a look at my file to see if they can see the problem for me please.

Thank you very much and I hope to hear from you.

All the best,

Mark

Question About Dynamic Text (making A News Tracker)
The idea:

I want to create a news tracker at the bottom of a page. It has to be done in flash. It will show some news item headers which it will read in from a PHP generated file. Once you click on the tracker you would be redirected to a newspage (perhaps displaying that particular item) The text has to scroll from the right to the left. If item 1 is completely viewable, item 2 has to slide in right behind it.. Here is an example picture of the idea..



In yellow it says nieuws which is dutch for "news"
In the black part there are 3 news items following eachother from right to left (first item = "hier komt het eerste nieuwsitem" second item = "vervolgens komt hier het tweede item" third item = "en ook het derde item komt hier achteraan zo automatisch")

Now, my question is.. how to do this?

I was thinking of making a movie clip with text in it and letting that movie clip slide from the right to the left. In this movie clip I would put a text box which would get the first variable from the PHP generated file. Then if there is a second news item, flash would duplicate the movie clip, making that new movie clip show the second news item etc. just untill all the news items are shown, and then the first item should be shown again sliding in behind the last item.

But the problem is, how do I know when the second movie clip has to start sliding? I will never be able to know when the first movie clip is out of sight since I can't ask how long the text is in pixels? or can I? Or is there some other way to solve this problem..?

Problems With Tracker When Scrolling Dynamic Text Field. Please Help
Hi all,

Thank you for reading my post...

I'm having some problems with scrolling a dynamic text field.

When I use _root in my code (see below), everything works fine but I have to use _parent as the swf that the scroll stuff is in is to be loaded dynamically from my main move.

When I use _parent, the buttons work ok but the scroll tracker moves to a random location on the stage and stays there and won't move - and also it won't scroll the text like it should.

Below is the code I'm using in the main timeline:


Code:
myLV = new LoadVars();
myLV.load("profile.txt");
myLV.onLoad = function() {
myText.htmlText = this.myText;
_parent.top = sliderMC._y;
_parent.bottom = sliderMC._y+trackMC._height-sliderMC._height;
};
upBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, -1);
};
upBtn.onRelease = upBtn.onReleaseOutside=downBtn.onRelease=downBtn.onReleaseOutside=function

() {
clearInterval(scrollI);
};
downBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, 1);
};
sliderMC.onPress = function() {
this.startDrag(0, this._x, top, this._x, bottom);
scrollI = setInterval(scrollF, 80);
};
sliderMC.onRelease = sliderMC.onReleaseOutside=function () {
this.stopDrag();
clearInterval(sliderI);
};
function scrollF() {
var a = (myText.maxscroll-1)/(bottom-top);
myText.scroll = Math.round((sliderMC._y-top)*a+1);
}
function setSlider() {
var a = (bottom-top)/(myText.maxscroll-1);
sliderMC._y = a*(myText.scroll-1)+top;
}
function scrollBtnF(dir) {
myText.scroll += dir;
setSlider();
}
I've uploaded my .fla to www.spindriftmedia.com/scroll2.zip and would be most grateful if someone could have a look at my file to see if they can see the problem please.

Thank you very much and I hope to hear from you.

All the best,

Mark

Volume And Seek Bar Tracker Triangles Remain On Screen
Hi,

I have FLVPlayback Players on several keyframes each with their own custom UI components. I find that when I play videos in the FLVPlayback players and I click a button that takes you back to a previous frame not displaying a FLV PLayback player, the volume and seek bar tracker triangles remain on the screen. Why is this? How can I prevent this?

Thanks

Problems With Tracker When Scrolling Dynamic Text Field. Please Help
Hi all,

Thank you for reading my post...

I'm having some problems with scrolling a dynamic text field.

When I use _root in my code (see below), everything works fine but I have to use _parent as the swf that the scroll stuff is in is to be loaded dynamically from my main move.

When I use _parent, the buttons work ok but the scroll tracker moves to a random location on the stage and stays there and won't move - and also it won't scroll the text like it should.

Below is the code I'm using in the main timeline:


Code:
myLV = new LoadVars();
myLV.load("profile.txt");
myLV.onLoad = function() {
myText.htmlText = this.myText;
_parent.top = sliderMC._y;
_parent.bottom = sliderMC._y+trackMC._height-sliderMC._height;
};
upBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, -1);
};
upBtn.onRelease = upBtn.onReleaseOutside=downBtn.onRelease=downBtn.onReleaseOutside=function

() {
clearInterval(scrollI);
};
downBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, 1);
};
sliderMC.onPress = function() {
this.startDrag(0, this._x, top, this._x, bottom);
scrollI = setInterval(scrollF, 80);
};
sliderMC.onRelease = sliderMC.onReleaseOutside=function () {
this.stopDrag();
clearInterval(sliderI);
};
function scrollF() {
var a = (myText.maxscroll-1)/(bottom-top);
myText.scroll = Math.round((sliderMC._y-top)*a+1);
}
function setSlider() {
var a = (bottom-top)/(myText.maxscroll-1);
sliderMC._y = a*(myText.scroll-1)+top;
}
function scrollBtnF(dir) {
myText.scroll += dir;
setSlider();
}
I've uploaded my .fla to www.spindriftmedia.com/scroll2.zip and would be most grateful if someone could have a look at my file to see if they can see the problem please.

Thank you very much and I hope to hear from you.

All the best,

Mark

Movie Clip Mouse Speed Control Depending On Mouse Press
Hi,
Please help me !
As iam developing a small ball game in flash, where i need to control the speed of the ball (i.e, to increase or decrease the speed of ball)when clicked on a button depending on mouse press .

I have done similar on key press but iam not able to do the same for mouse pressed.


Please help me out

Your help will be appreciated.

Thanks & Regards
Zabi

OnPress Doesn't Work If The Mouse Button Is Pressed Again But The Mouse Is Not Moved.
I have a very simple piece of code but it has one very annoying bug. When I press the button a second time, the code doesn't work. The only way to get the code to work is by moving the mouse a tiny bit, or moving the mouse off the button and back on.

Does anyone know a way to make a button that can be clicked many times without moving the mouse?


Code:
randommultiquiz.onPress = randommultiquizOnPress;
function randommultiquizOnPress() {
_root.attachMovie("connect", "newconnect", 200);
newconnect._x = 0;
newconnect._y = 0;
newconnect._xscale = 100;
newconnect._yscale = 100;
}

How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.

In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.

However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.

This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.

I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.

I am a novice at action scripting, so all help would be appreciated!

Thanks

M

How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.

In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.

However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.

This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.

I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.

I am a novice at action scripting, so all help would be appreciated!

Thanks

M

How Do I Create?: Scrolling Image Stops On Mouse Over-starts On Mouse Off
I’m trying to create this animation:

I have an long rectangular image (with more images going across it) scrolling FROM the right side of the screen to the left (very slowly). similar to a ticker.

I want the scrolling to stop when the viewer mouses over the menu strip. If they press on the image that they have just moused over, I have a movie clip I want to play for that image (a few images pop up, one bigger than the other). When the viewer mouses off, the movie clip disappears, and the menu continues scrolling to the left, from the right.

Greatly appreciated!!

Playing A Movie Clip On Mouse Over And Continue To Last Frame On Mouse Out
Hi All,

I have a movie clip on the timeline which is an animated mouseover button

Basically what I need to do is for the movie to be stopped at frame one when there is no mouse over and loop continuosly when I do have mouse over then on mouse out i want it to finish it's frames playing from where ever it was at when the mouse was moved out to the last frame and then display frame one so it is stopped again ready for a new mouse over.

Something I have found difficult to work out is that whilst it is doing the "out" play to to last frame, if you put the mouse back over again, it starts from frame 1 so looks like it jumps so i need the mouse over to also read what frame it is currently playing so that it can continue its endless loop from that frame to avoid it jumping about.

I hope that makes sense, it's really difficult to describe in words.

Here's the movie clip's action as it is now.

on (rollOver)
{
this.gotoAndPlay("over");
}
on (releaseOutside, rollOut)
{
this.gotoAndPlay("out");
}

ok so in the movie's timeline itself, the label "over" is a frame containing another movieclip which is basically a continous 30 frame loop and my movie timeline is stop();

so, on (rollOut) it plays at label "out"

I have placed a copy of the movie loop at the "out" frame which plays the movie slower at the end to make it a nice wind down stop

what I thought to do in action script is to read the current frame that the movie loop is at and make so the "out" position movie starts its playing frame from that frame number until it reaches the end frame where it jumps back to frame one of the timeline with the first stopped frame.

I've seen a command something like this below used to get the current frame number and take it away from the total to continue playing from that point, that's not totally right for what I am doing but it shows me the sort of thing i need to write but i don't know how to write an actionscript to read the current frame from the movie1 whcih is playing and start playing movie2 at "out" from that frame number?

on (rollOut) {gotoandPlay(_totalframes - _currentframe); }

maybe there is an easier way to get this to work, i've seen lots of similar examples on the web but nothing that specifically plays a lopp and then continues to the end on mouse out. it sounds simple but I've tried all weekend to do it without success?

Can anyone help me please?

Thanks,
Terrence.

Mouse Follow/stopfollow After Mouse Leaves Object (with Ease)
well, i think the title covers me entirely, i would like some help with a script.
The problem is, i have a scene with objects that at first they are static, when the mouse comes in and makes a move-over the scene and some objects,i have assigned multiple collision to the objects, i want when the mouse moves over a object, the object to follow the mouse,while colliding to all other objects and after a while i would like as the mouse moves away, the following to stop and the objects to return to its original spot with ease.

I know that this is a big one, but i would like some help if i could get

Detect Mouse _x & _y Attach Specific Clip And Have It Follow Mouse
I'm trying to make a clip that will have another clip attached (eventually it'll be a mask) when you roll over it. I want the mouse positon to be determined on rollover and a different clip (with different registration point) to be attached depending on which quadrant you rollover first. IE- you rollover the lower left quadrant of the mc first so an mc with an upper right registration point is attached and follows the mouse.

basically I want it to look like you're pulling a mask from out of nowhere onto the main mc from whatever corner you start on... (make sense?)

i'm trying to reconstruct what you see here (http://www.mullerphoto.com/)
this is the first baby step!

anyhow, here's my AS and i'll attach the .fla any help is great! I have the actionscript dictionary and am not afraid to use it, I just need help with the mechanics of how to actually do this (i.e.- which methods, properties, etc. to utilize) thanks!


Code:
leftfunction = function(){
if (patch._ymouse <= 100){
llowerfunction;
}else{
//this function starts the maskclip coming in from the upper left with a lower right reg point
_root.patch.attachMovie("lowerright", "lrclip", 1);
lrclip._x = _root.patch._xmouse;
lrclip._y = _root.patch._ymouse;
}
}

llowerfunction = function(){
//this function starts the maskclip coming in from the lower left with an upper right reg point
patch.attachMovie("upperright", "urclip", 1);
urclip._x = patch._xmouse;
urclip._y = patch._ymouse;
}

rightfunction = function(){
if (patch._ymouse <= 100){
rlowerfunction;
}else{
//this function starts the maskclip coming in from the upper right with a lower left reg point
patch.attachMovie("lowerleft", "llclip", 1);
llclip._x = patch._xmouse;
llclip._y = patch._ymouse;
}
}

rlowerfunction = function(){
//this function starts the maskclip coming in from the lower right with an upper left reg point
patch.attachMovie("upperleft", "ulclip", 1);
ulclip._x = patch._xmouse;
ulclip._y = patch._ymouse;
}

_root.patch.onRollOver = function() {
if (patch._xmouse <= 150){
leftfunction;
}else{
rightfunction;
}}

Custom Mouse Cursor Conflict With Mouse Trail
When I put mouse trails and custom mouse cursor script in the same scene the mouse trails work but the cursor does not change to the custom cursor. If I use the custom mouse cursor script in a seperate scene, on its own, it works fine. I think that the two scripts are conflicting.
Mouse trail script:

onClipEvent (enterFrame) {
//x movement
mx=_root._xmouse;
if (mx<_x) {
dx=_x-mx;
}
else {
dx=mx-_x;
}
moveSpeedx=dx/10;
if (mx<_x) {
_x=_x-moveSpeedx;
}
else {
_x=_x+moveSpeedx;
}
//y movement
my=_root._ymouse;
if (my<_y) {
dy=_y-my;
}
else {
dy=my-_y;
}
moveSpeedy=dy/10;
if (my<_y) {
_y=_y-moveSpeedy;
}
else {
_y=_y+moveSpeedy;
}
}

Custom mouse cursor script:
Layer 1(functions):

stop();
/* update the cursor coords */
function updateCursor() {
_root.cursor._x = _xmouse;
_root.cursor._y = _ymouse;
updateAfterEvent();
}

Layer 2(on event handlers):

onClipEvent(load) {
Mouse.hide();
this.swapDepths(100);
}
onClipEvent(mouseMove) {
_root.updateCursor();
}

Please help!

Mouse Direction Scroll With Mouse Over Image Enlargement...
Hi all..

Haven't had much luck finding a tutorial to help me do this one so any help locating it would be good.. I'm trying to design an image gallery where the images scroll left to right depending on mouse movement. Once a mouse is over an image it enlarges then returns to normal shape with mouse off.

any help appreciated..

cheers!

Mouse Over, MC Scales Up, Mouse Out, MC Returns To Original Size...
I have looked around and I cannot find a simple script to apply to a clip that does this...

On Mouse over - MC scales up, on Mouse out, MC returns to original size... with some easing.

Please help!!

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