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








[F8] For Loop With Mind Of Its Own


Code:
for (i=0; i<firstDay; i++) {
dateHolder[i].text = "";
}
for (i=firstDay; i<=_root.daysInMonth[month]; i++) {
trace(dateTracker + ":" + _root.daysInMonth[month]);
dateHolder[i].text = dateTracker;
dateTracker++;
}
for (i=i; i<=42; i++) {
trace(i);
dateHolder[i].text = "";
}
I have this series of loops I use to fillin dates of a calendar. The first one sets teh days before teh firstDay blank. The second nunmbers 1 to number of days in the month and the last is for blank days at the end of the calendar.

I trace both dateTrack and daysInMonth[month] and for august its 31. But my loop stops at 29? wtf?

Ive attached the whole file as well.




FlashKit > Flash Help > Flash ActionScript
Posted on: 08-14-2007, 01:57 PM


View Complete Forum Thread with Replies

Sponsored Links:

Bug In MX Or Bug In My Mind?
Hi All,


I am confused why as soon as I start moving the horizontal scroll position in the dynamic textfield (by clicking the button which increments the hscroll value), the background becomes solid white whereas initially it was transparent.

Is there a work around with this? or is it a bug?

I attached the file here.

Let me know your opinions.

Thanks a Bunch!
Butch

View Replies !    View Related
Out Of My Mind
Can anyone help me? I need to know how to change the colour of an mc on the fly. I'm sure it's pretty basic, but then again so am I...

View Replies !    View Related
Never Mind
never mind solved

View Replies !    View Related
Mind-Map
Hi, I'm looking at doing a mind-map type application in Flash.

I could do with some guidance on laying it out. Does anyone know of resources/tutorials that exist for doing something like this?

View Replies !    View Related
Please Take A Look If You Don't Mind.
Please Take a look at my attached .FLA so you can see what I'm trying to explain....All Help Is GREATLY appreciated
================================================== ==========================================


Basically I have 6 Layers

RedButton
Blue Button
Green Button
OrangeButton
Text
Actions

Each of the buttons corresponds to a different word which I have nested inside the "Text" movieclip which when pressed SHOULD bring up the word with a little alpha from 0-100
Each word has an instance name to be referred to as well.

Here's my action script for the first button

this.RedButton.on(release){
_parent.Text.Hello.gotoAndPlay(2);
}

When it compiles it gives me an error of "Field name expected after "." operator. Anyone know what this is or how I can fix my code....see any other errors? What's the best way to approach this movie?

Thank you for all your help...you guys are awesome.

View Replies !    View Related
Never Mind
Never mind.





























Edited: 08/17/2007 at 01:29:10 PM by driensche

View Replies !    View Related
Never Mind
Never Mind I got it.

Thanks





























Edited: 08/23/2008 at 02:55:42 PM by Dig

View Replies !    View Related
Mind Map
Hi,

has anyone done anything like a mind map? I want to have a menu where you click on a node and lines are drawn to its sub menus, any links to examples or tutorials would be great

p.s a mind map is like these:
http://images.google.co.uk/images?hl...=1&sa=N&tab=wi


Cheers,
G

View Replies !    View Related
I'm Losing My Mind.....
This is what I did late today while I had a creative spurt and now I'm sure Flash is corrupting my mind. Warhol, Monroe, and Flash together at last (kind of). It takes about 10-15 seconds on a cable modem and there's no preloader because it was kind of a quickie project for you guys as a Christmas card. All mouse controlled. Hope some of you like it. It looks best in the dark.

http://www.geocities.com/vegasdzl/

View Replies !    View Related
Losing My Mind
Can anyone tell me where I can
find a step-by-step tutorial on
the makings of a preloader MC
and how to place it in the movie?

I want to use a preloader as
first scene to play until second
scene (same movie) loads then
have the preloader stop and go
to first frame of second scene.

I've tried a number of things
but it's not working.

Help please!!

Thanks much in advance.

nd

View Replies !    View Related
I'm LOSING My MIND
I A M L O S I N G M Y M I N D . . .

I've been trying to figure this effect out for three hours.

The link below shows a tutorial that involves three similar alpha effects. I'm only concerned with the first one, the "alpha state change". It can look really cool when implemented .

It looks fairly easy to figure out. When you download the .fla, you can pretty much take everything apart and see how it is done.

I swear I have a file that I've created (strictly out of pure enjoyment with a twist of challenge) that is identical in every way to the tutorial. Nothing I do WORKS! I think I've tried everything, except pester our good friends here on the Flash Forum forsome help.

Here's the link: http://www.virtual-fx.net/tutorials/html/proximity.htm
If you'd like, I can email you my file. That's if you like to solve puzzles.

my email is spacerocket@earthlink.net

I'm using flash 5

cheers,
Jen

View Replies !    View Related
Im I Loosing My MIND?Help Please
I have Flash MX, so i its ok to post this here too.
This has me completely stumped.

on frame 1 i have four frames, actions, layer1,2,and 3
layer 1 = actions MC, layer 2 = MenuBar MC, Layer 3 = sub MC
the actions FRAME contains this script:


actions.gotoAndPlay(1);

function CreateMenu (n) {
trace("inside CreateMenu" + n);
var newY = 18;
for (var i=0; i<n; i++) {
trace("duplicationg the clips - inside the Menu loop "+i);
duplicateMovieClip ("MenuBar", "MenuBar"+i, i);
this["MenuBar"+i]._y = newY;
newY = newY+18;
}
}


function CreateSubMenu (b) {
trace("inside CreateSubMenu" + b);
var BnewY = 18;
for (var t=0; t<b; t++) {
trace("duplicationg the clips - inside the Sub loop "+t);
duplicateMovieClip ("sub", "sub"+t, t);
this["sub"+t]._y = BnewY;
BnewY = BnewY+20;
}
}
stop();

The MC "actions" has one frame that calls the two functions,
which is this:

_parent.CreateMenu(4);
_parent.CreateSubMenu(6);
stop();


Now when i run the thing it traces out this:

inside CreateMenu4
duplicationg the clips - inside the Menu loop 0
duplicationg the clips - inside the Menu loop 1
duplicationg the clips - inside the Menu loop 2
duplicationg the clips - inside the Menu loop 3
inside CreateSubMenu6
duplicationg the clips - inside the Sub loop 0
duplicationg the clips - inside the Sub loop 1
duplicationg the clips - inside the Sub loop 2
duplicationg the clips - inside the Sub loop 3
duplicationg the clips - inside the Sub loop 4
duplicationg the clips - inside the Sub loop 5

Here is the deal
none of the MenuBar MCs do not display and all of the sub MCs do display.

When I switch these around in the actions MC like this:

_parent.CreateSubMenu(6);
_parent.CreateMenu(4);

For some reason it will diplay four of the "MenuBar" MCs
and only 2 of the "sub" MCs!!!!!!!

Totally stumped
any help would be completely apprectiated
Thanks,
Nathan

View Replies !    View Related
Type Has A Mind Of It's Own
I'm trying to get a lower case "e" to go from one color to another, but part of the outline insists on moving during the shape tween. The 2 Es are identical except for the color change. Why won't it just change color without changing shape during the tween?

Thanks,

JP

View Replies !    View Related
About To Lose My Mind
Hello everyone....I've been puzzeled before, but this is unreal...
I've lost a lot of work on what seems to be corrupt Flash flies. It can't save it, it won't open it. I'm working on a brand new Dell Pentium 4 with tons of Ram.

The movie contains a sizable Movie CLip with a large sound file. Everytime I try to bring in the Movie Clip, it locks. Then it won't save and all my changes are lost (again). I've already started over twice....and my deadline is tomorrow afternoon.

CAN ANYONE HELP ME?
andrea

View Replies !    View Related
Hey I Need A Bit Of Help If You Dont Mind
4 arial blue I was wondering if any one could help me, I wanted to make a ladder for my site. But I dont want a ladder that looks cheap and takes along time to update. So I was hoping I could use flash and have my members just post there wins and lost them selfs. If this is possible please help me out by either E-mailing me Teenster182@hotmail.com or by posting in forum. Thanks have a nice day.

View Replies !    View Related
This Needs A Master Mind
i was wondering if there is a way that i can make a loading for an html page (but wait here is the problem)
i have a html page that contains several flash pieces (6) and a certain amount of jpg and gifs ...
The problem is the size of the page is pretty big .. a good 500kb and the dialup users have to wait in front of a white page until all the elements are loaded ... I’ve seen some java script that says loading .. And when it's done it takes u to the page with all the component loaded....
I tried to create a master flash that loads all the flash movies and when they are loaded it will take the user to the actual page, but it seems that the Browser doesn’t recognize them and loads them again even though they are in the cache...
Anybody have an idea about this

thanks guys

View Replies !    View Related
Why Does Tweening Have A Mind Of Its Own?
why is it when i make a layer with a background then another layer named text. then i add two different sets of words on it( please on the top left and enter on the bottom right), insert a key fram at fram 15 and then right click in the frames to create motion tween that it just slides the text off of the freaaking document? i didnt even specify it to do anything!!! can someone please help?

View Replies !    View Related
Menu In Mind
G'day all. I've been toying around with some ideas and ways to go about this and this is what I've decided on.

I have 3 menu sections(duplicateMovies), that in turn have 3 submenu sections("), that in turn have their own sub(sub)menus("). The first menu section(when selected), does an accordian style drop revealing the 3 submenus, and when any one of those 3 menus is selected the same happens. All the time the entire menu opens/collapses as these actions are taking place. Now, at any point in time when a menu item is selected, that remains highlighted until another menu button is selected while all other buttons can still be highlighted onMouseover. The other main thing is that every button, when selected, loads an external movie into a container.

You can get the .fla with the general layout and idea of occurences here: http://www.cappuchico.com/buttons.zip.

That's a mouthful. But I appreciate any ideas anyone can give me. I'm a rookie a/s user but I'm hungry for more. Thanks for any help.

Bufffy

View Replies !    View Related
Confused Out Of My Mind
Okay, I have read some of the tutorials about like masking text, laser effect and a lot of that stuff and I cannot for the love of my life figure it out. I will site at my computer screen and stuff and just stare looking for stuff. Is there an easier way for me to learn? Do people teach it here? Something.....Thanks

View Replies !    View Related
Losing My Mind With MC's
I have asked this before and have tried and searched on so many forums and it just doesn't seem to want to work. Basically I have two MC's on a time line, one with an actual clip the other which is empty. The empty clip has the instance name of "back". What I need to happen is when the main file is loaded the first clip waits until the empty clip "back" loads an external swf. After the swf loads into the empty MC "back", both MC's then run simultaneously. I have added the preloader with some help but it doesn''t seem to do what it supposed to. The main clip executes right away and then the load clip executes after a few seconds. WHAT IS WRONG!!! Here is the code that I have been staring at, tweeking, whatever for the past few days:

this.stop(); //should stop the movie in the timeline
clipLoaded=false; //states that the MC is not loaded
back.loadMovie("/flash/grphix.swf"); //calls the external swf into the empty MC (I left the full URL out to shorten code)
this.onEnterFrame=function() { //the preloader that sets up the whole arguement
if ((back.getBytesLoaded()==back.getBytesTotal) &&
(back.getBytesLoaded<>0) && (!clipLoaded)) {
clipLoaded=true; //states that it is then loaded
this.play(); //begins to play the clips
}
}

ANY HELP PLEASE!!!!

View Replies !    View Related
It Boggels The Mind
I have bought album creator pro 3.3 from www.firmtools.com and the thing is really cool... However I have had a question posed to me by the client and I told them I would do some research on it and get back to him...

www.valdostametro.com the whole site is flash and it has its quarks... but under the "Photo Gallery" is where I need to focus on.

The client wants to be able to have the protection of people not being able to right click & save the photos as well as the fancy way it displays and navigates, far better then any other I have seen yet.

Well if you will go there and take a look at it you will see in the TOP LEFT of the album

"METRO MagazineCURRENT DIRECTORYIMAGE NAME.jpg"

Well the client would like the ability to have users of the site be able to buy the image thru pay pal and it be sent to them via e-mail where they can do whatever they wish with it.

(Now the e-mailing of the image doest not have to be a script, I have already worked out how to do that so no worries on that end)

I want to basically take the template and add a function to it where it will send the information from flash to pay pal... so we know what image# they are buying and that way it can then be sent out for them.

I have the source for the album template I am using; if anyone has any ideas or would like to see the template for yourself I will be more then happy to post it!

Thank you in advance.

View Replies !    View Related
Losing My Mind...
It's late, and eval is driving me nuts. I am trying to do this:
code:
myColor = new Color(eval("sampleBtn_sml" + activebutton).bg);
myColor.setRGB(0xAAB594);

What is wrong here? I know that the eval is targetting the right MC. I tried it in some other code. Does eval not work in this Color code?

RH

View Replies !    View Related
Must Be Loosing My Mind
Im kind of new to flash, but still I think there's an easier way to make a simple slider bar than writing 22(!!!!) lines of code. I present them to you dear gurus:
code:
slid = 0;
_root.bar_mc.slider_mc.onRollOver = function (){
slid = 1;
}
_root.bar_mc.slider_mc.onMouseDown = function (){
if(slid == 1){
slid = 2;
}
}
_root.bar_mc.slider_mc.onMouseUp = function (){
if(slid == 2){
slid = 1;
}
}
_root.bar_mc.slider_mc.onRollOut = function (){
slid = 0;
}
_root.bar_mc.slider_mc.onEnterFrame = function(){
if(_root.bar_mc._ymouse < 82 && _root.bar_mc._ymouse > -82 && slid == 2){
_root.bar_mc.slider_mc._y = _root.bar_mc._ymouse;
}
}


Can someone please help me, and show me a way to make it shorter???

edited: title edited by nunomira

View Replies !    View Related
Preloader With Mind Of Its Own
this is a very weird thing for me.
i created a preloader with the following script on the first frame:

code:
stop();
_root.onEnterFrame=function(){
total=_root.getBytesTotal();
carregado=_root.getBytesLoaded();
percentagem=Math.round(100*carregado/total);
_root.barrah_mc._xscale=percentagem;
if (percentagem==100){
play();
}
};


and i have quite a big fla file, with like 10 layers, a few animations and movie clips, and i have code on the last frame.

the weird thing is that when i make a preview the loading bar only apears on the last second like loading from 95% to 100% in a glimpse and the stop command that i have at the end of the file just stoped working, it entered in a loop.
playing from the first to the last frame constantly.

if some one can help me out i would apreciate it.
thanks in advance.

View Replies !    View Related
Mind Map Interface
iKarma Network Viewer
A flash based "mind map" interface to the new iKarma.com reputation management system. Just 22k using actionscript and pulling data from SQL using .ASP
Click here
iKarma.com gives workers in the service sector (like flash coders) a reputation engine similar to the one used by widget sellers on eBay.

View Replies !    View Related
Mind Busting
i make a cirlce. make it into a movie. add another keyframe and rotate it once. when it animates it wobbles. the circle is symentrical. i have tried a lot of things but this is driving me nuts.

View Replies !    View Related
Please Help This Fragile Mind
trying to create a automatic fade for when sounds are triggered, but the fade system doesnt work and i cant see why!!

here is the loop

Code:
for (h=0; h == 100; h++) {
_root.sound5.setVolume(_root.sound5.getVolume+1);
trace("h="+h);
}


all looks good to me, but then i am blonde

View Replies !    View Related
[F8] Please Help I'm Losing My Mind
i have been up for about 48 hours on coffee trying to get this right. if you go to www.stickerjunkie.com they have a text preview box where you can strech and size your sticker. i have it sio that the user can type in what they want but i can't get it to size right. if anyone has any ideas or a tutorial where i can go i'll love you forever. now i am going to sleep for a few be back in about 2 hours. thanks

ginxy

View Replies !    View Related
[f8] Help--i'm Losing My Mind (i Think)
Hi--

I am trying to mask a movie clip that uses duplicateMovieClip to create the effect of letters falling through the air.

I have searched through these forums to find a solution, and have tried setMask (among other solutions) but no luck!

I have attached the FLA, which some of you might recognize as Alphabet Rain from the FlashKit FLA files.

I think I'm losing my mind on this one, and I'm hoping someone can give me a simple, easy to understand answer to help me with this mask.

Many, many, many thanks!

View Replies !    View Related
Losing My Mind
Can anyone help elaborate on why my btn's are still not working?
I'm not getting no where with this!

here is the FLA... Again...
http://idisk.mac.com/jasoninch/Public/MENU_2.fla

and here is the past thread: http://board.flashkit.com/board/show...mx.transitions

View Replies !    View Related
Losing My Mind....
I've been working on a class all evening and it was working fine - all of a sudden I'm getting 'null object reference' errors whenever I try and call the constructor...

I've wiped all the code out of the constructor and I can't even get a trace out of it...the IDE is confirming that I'm targeting the correct classpath and I'm not getting compiler warnings. Also if I drag an instance of the class onto the stage from the Library it seems to work fine...it's only freaking out when I use the 'new' operator to create a new instance (and no, nothing is static anywhere)...I am absolutely losing it...any ideas?

View Replies !    View Related
[F8] Losing My Mind
Hope someone can help.
I have a pretty simple flash website, but Im still having problems.
I have it all set up perfectly, and when I preview it, its perfect...

So, I publish it, then view the html in Internet Explorer, its perfect..
So I load it onto the internet...

And the buttons make it jump to random different parts of the movie!!!

The buttons are fine in the previews and everything, but somewhere along the upload ftp process, they get screwed up!

Ive even tried to fix it in dreamweaver, and its a no go.
Ive tried downloading three or four different types of ftp loaders...still does it.

I dont get it, why is the preview perfect and the finished product screwed up??

Any help would be greatly appreciated!

Thanks!!

-N

View Replies !    View Related
Before I Lose My Mind
I have a problem accessing the variable from my php file into flash. Now I do have it working in two of my three files what I don't get is why it works in only two of the 3 files. Please guide the way on this one for me, it is very dark.

These are three separate swfs that send info to the same php file, the variable I need sentinto flash and back out is the (studentID) if anyone can tell me a better way that would be great. to grab and send varialbe from php to flash and back out.

The only difference between the codes are whats being sent in the Userdata part.





MyCode: Not working only sending the email info not the studentId which I want;

stop();
var userData:LoadVars = new LoadVars();
var myFeedback:LoadVars = new LoadVars();
var myStudent:LoadVars = new LoadVars();
function doSubmit():Void {
if (!emailAddress.text.length) {
_root.gotoAndStop("form");
} else {
//userData = new LoadVars();
userData.emailAddress = emailAddress.text;
userData.sendAndLoad("../register.php?ck="+new Date().getTime(), myFeedback, "POST");
_root.gotoAndPlay("go");
}
}
submit_btn.onRelease = doSubmit;
myFeedback.onLoad = function() {
if (this.feedback == "OK") {
myFeedback.studentId = this.studentId;
myFeedback.sendAndLoad("../register.php?ck="+new Date().getTime(), myStudent, "POST");
} else {
feedBack_txt.text = this.msg;
}
};





My: code that does work and sends the studenId with the phone.

stop();
var userData:LoadVars = new LoadVars();
var myFeedback:LoadVars = new LoadVars();
var myStudent:LoadVars = new LoadVars();
function doSubmit():Void {
if (!lastName.text.length || !firstName.text.length || !zipcode.text.length) {
_root.gotoAndStop("form");
} else {
//userData = new LoadVars();
_root.name_mc.gotoAndPlay(2);
userData.lastName = lastName.text;
userData.firstName = firstName.text;
userData.zipcode = zipcode.text;
userData.income = income.text;
userData.clientId = _root.clientId;
userData.sendAndLoad("../register.php?ck="+new Date().getTime(), myFeedback, "POST");
}
}
submit_btn.onRelease = doSubmit;
myFeedback.onLoad = function() {
if (this.feedback == "OK") {
myFeedback.studentId = this.studentId;
myFeedback.sendAndLoad("../register.php?ck="+new Date().getTime(), myStudent, "POST");
} else {
feedBack_txt.text = this.msg;
}
};

View Replies !    View Related
Losing Mind, Please Help.
I'm trying to collect all of my button activities into a single function (instead of having to re-type the code repeatedly), and use variables to call it. Any help would be appreciated.

var myButton;

function ButtonRollOver() {
myButton.onRollOver = function() {
gotoAndPlay("Over");
};
myButton.onRollOut = function() {
gotoAndPlay("Over");
};
}

_root.MainLogo_mc.Logo1_mc = function() {
myButton = this;
ButtonRollOver();
};

View Replies !    View Related
I'm Losing My Mind
sorry to announce my anguish publicly, but this is really driving my crazy. I am trying to create a blog on the homepage of a website, which i've NEARLY done.

One small thing holds me back from success, its an annoying news flash piece of script, which separates each post and flashes it. To wittness it pls visit http://www.oconnellconstruction.co.nz/phptest/main.html .

What i am wanting to do is remove this 'feature', permanently.

i've tryed and tryed, but to on avail.

heres the code


Code:
#initclip
// initialize the NewsTickerClass----------->
NewsTickerClass = function () {
this.init();
};
// register the Object-Class with the Movieclip------------->
Object.registerClass("hlnewsticker", NewsTickerClass);
// define INITialisation-function------------------->
NewsTickerClass.prototype.init = function() {
// get rid of the cross that helped positioning --->
this.crossMC._visible = false;
// setting up a counter ---------------------------------->
this.count = 0;
// dynamic Textfield-Properties ------------------------>
this.myTextTarget = this._parent[this._targetInstanceName];
this.outerxPos1 = (this.aniRangeX/2)+(this.myTextTarget._x+this.myTextTarget._width);
this.outerxPos2 = (this.aniRangeX/2)-(this.myTextTarget._x+this.myTextTarget._width);
this.outeryPos1 = (this.aniRangeY/2)+(this.myTextTarget._y+this.myTextTarget._height);
this.outeryPos2 = (-this.aniRangeY/2)-(this.myTextTarget._y-this.myTextTarget._height);
this.centerYpos = this.myTextTarget._y;
this.centerXpos = this.myTextTarget._x;
this.animType = 0;
//check the types of animation for the 'ifs' in the function theMoveOut -->
if (this.xAnim == true) {
this.animType += 1;
}
if (this.yAnim == true) {
this.animType += 2;
}
// Animation-Properties -------------------------------->
this.brakespeed = 5;
this.myTime = 0;
this.beginLoad();
};
// function to load the textfile and check if loaded ----->

/////////////////////DSCRIPTS CUSTOMIZATION STARTS ////////////////////////////////
/*
An unique idenetifier to prevent the news from being chached.
This is important because without this user will not see the news update
as long the news file remains chached in his or her computer.

This unique identifier has been added at http://dscripts..awardspace.com
by modifying the original "HEADLAB-NEWSFLASH" component
*/

// Declaring a variable as unique identifier.
time=new Date().getTime();

/*
Here come the part where DSCRIPTS toweaked the compnent script to prevent chaching.
If you have php support and want to prevent chaching just change the file url to yours one
Note that if you change the file paramater in component option it will not work. because to tweaking.
You have to change it here. */

NewsTickerClass.prototype.beginLoad = function() {
loadVariables( "reader.php?now="+time, this);


/////////////////////DSCRIPTS CUSTOMIZATION ENDS ////////////////////////////////

this.onData = function() {
if (this.news != "") {
this.splitArray();
delete this.onData;
}
};
};
// function to split the Textfile into an Array ----->
NewsTickerClass.prototype.splitArray = function() {
//create an array that will hold the single texlines.---->
this.myArray = new Array();
//splits the text sepparated by "," -->
this.myArray = this.news.split("|");
this.setTextfield();
};
// function to set the Textfield and ----->
NewsTickerClass.prototype.setTextfield = function() {
if (this.myTextTarget.html == true){
this.myTextTarget.htmlText = this.myArray[this.count];
}else{
this.myTextTarget.text = this.myArray[this.count];
}
if (this.yAnim == true) {
this.myTextTarget._y = this.outeryPos1;
}
if (this.xAnim == true) {
this.myTextTarget._x = this.outerxPos1;
}
// reset accelspeed -->
this.accelspeed = 0;
this.theMoveIn();
};
// function for the Move-In Animation ----->
NewsTickerClass.prototype.theMoveIn = function() {
this.onEnterFrame = function() {
if (this.yAnim == true && this.centerYpos<this.myTextTarget._y) {
this.myTextTarget._y += ((this.centerYpos-this.myTextTarget._y)/this.brakespeed)/this.brake;
}
if (this.xAnim == true && this.centerXpos<this.myTextTarget._x) {
this.myTextTarget._x += ((this.centerXpos-this.myTextTarget._x)/this.brakespeed)/this.brake;
updateAfterEvent();
}
if (this.centerYpos>=this.myTextTarget._y-0.5 && this.centerXpos>=this.myTextTarget._x-0.5) {
delete this.onEnterFrame;
this.theStopInterval();
}
};
};
// function that lets the Text stand still for the amount of Time in seconds,
// that a user defined in "stopTime" ----->
NewsTickerClass.prototype.theStopInterval = function() {
delete this.onEnterFrame;
this.intervalHandle = setInterval(this, "onInterval", 1000*this.stopTime);
};
NewsTickerClass.prototype.onInterval = function() {
clearInterval(this.intervalHandle);
this.theMoveOut();
};
// function for the Move-Out Animation ----->
NewsTickerClass.prototype.theMoveOut = function() {
this.onEnterFrame = function() {
this.accelspeed += this.acceleration;
if (this.xAnim == true) {
this.myTextTarget._x -= this.accelspeed;
}
if (this.yAnim == true) {
this.myTextTarget._y -= this.accelspeed;
}
switch (this.animType) {
case 1 :
if (this.outerxPos2>this.myTextTarget._x) {
this.count++;
if (this.count>=this.myArray.length) {
this.count = 0;
}
delete this.onEnterFrame;
// call the setTextfield function again
// this is where the whole thing starts looping
this.setTextfield();
}
break;
case 2 :
if (this.outeryPos2>this.myTextTarget._y) {
this.count++;
if (this.count>=this.myArray.length) {
this.count = 0;
}
delete this.onEnterFrame;
// call the setTextfield function again
// this is where the whole thing starts looping
this.setTextfield();
}
break;
case 3 :
if (this.outeryPos2>this.myTextTarget._y && this.outerxPos2>this.myTextTarget._x) {
this.count++;
if (this.count>=this.myArray.length) {
this.count = 0;
}
// call the setTextfield function again
// this is where the whole thing starts looping
delete this.onEnterFrame;
this.setTextfield();
}
break;
}
};
};
#endinitclip

View Replies !    View Related
Anyone Mind Taking A Look?
Please Take a look at my attached .FLA so you can see what I'm trying to explain....All Help Is GREATLY appreciated
================================================== ==========================================


Basically I have 6 Layers

RedButton
Blue Button
Green Button
OrangeButton
Text
Actions

Each of the buttons corresponds to a different word which I have nested inside the "Text" movieclip which when pressed SHOULD bring up the word with a little alpha from 0-100
Each word has an instance name to be referred to as well.

Here's my action script for the first button

this.RedButton.on(release){
_parent.Text.Hello.gotoAndPlay(2);
}

When it compiles it gives me an error of "Field name expected after "." operator. Anyone know what this is or how I can fix my code....see any other errors? What's the best way to approach this movie?

Thank you for all your help...you guys are awesome.

View Replies !    View Related
AS3 Nub Is Losing His Mind...
OK... so I'm getting hung up on the simplest piece of code here, aside from stop();, and it's really getting aggravating. I keep getting the following errors when I test my movie:

1120: Access of undefined property home_btn. -- home_btn.addEventListener(MouseEvent.CLICK, goHome);
1120: Access of undefined property portfolio_btn. -- portfolio_btn.addEventListener(MouseEvent.CLICK, goPortfolio);
1120: Access of undefined property services_btn. -- services_btn.addEventListener(MouseEvent.CLICK, goService);
1120: Access of undefined property info_btn. -- info_btn.addEventListener(MouseEvent.CLICK, goInfo);
1120: Access of undefined property contact_btn. -- contact_btn.addEventListener(MouseEvent.CLICK, goContact);

Here's a copy of my code:


Code:
stop();

//Navigation Buttons
function goHome (evt:MouseEvent):void {
gotoAndStop("home");
//trace("Home clicked");
}
home_btn.addEventListener(MouseEvent.CLICK, goHome);

function goPortfolio (evt:MouseEvent):void {
gotoAndStop("portfolio");
//trace("Portfolio clicked");
}
portfolio_btn.addEventListener(MouseEvent.CLICK, goPortfolio);

function goService (evt:MouseEvent):void {
gotoAndStop("services");
//trace("Service clicked");
}
services_btn.addEventListener(MouseEvent.CLICK, goService);

function goInfo (evt:MouseEvent):void {
gotoAndStop("info");
//trace("Info clicked");
}
info_btn.addEventListener(MouseEvent.CLICK, goInfo);

function goContact (evt:MouseEvent):void {
gotoAndStop("contact");
//trace("Contact clicked");
}
contact_btn.addEventListener(MouseEvent.CLICK, goContact);
I'm instantiating all my buttons. The names stay consistent across all the keyframes. I've tried instantiating the buttons on the same keyframe that the script lives on, and instantiating prior to the script's keyframe. I'm officially stumped. I have no idea wtf I'm doing wrong. I'm copying the same format I've seen in every damn tutorial I've seen for basic AS3 button interactivity, yet I get these errors.

Any help is much appreciated. An additional FYI, I'm retarded when it comes to programing. I can do basic stuff, and edit existing code (usually) when I need to, but I'm a dumbass when it comes to writing my own stuff. Trying to learn, though. Just make sure to keep your answers simple, for stupid here.

/edit

Looked for a way to attach my fla, but it appears I don't have access to do so yet. I can host it if need be. Just let me know.

View Replies !    View Related
Never Mind: I Figured It Out
I figured out how to do what I wanted. If I could figure out a way of completely deleting this post I would.





























Edited: 10/18/2007 at 02:58:37 PM by NewbieMAH

View Replies !    View Related
I'm Loosing My Mind...
I might be in over my head with this but something in this code is messing with me...

On a webpage it's supposed to work like THIS dudes combined preloadbar and transition(shuffle through his works and see what I mean)

but what I got is THIS

First time you hit a button you'l get the awfull NaN for percentage text next time you hit the same button it works as intented. When you hit the other buttons only the transition is working...


****.....can anybody see whats going on??


Code:
_root.createEmptyMovieClip("container_mc", 0);
container_mc.depthTrack = 0;
_root.createEmptyMovieClip("Preloader", _root.getNextHighestDepth());
_root.createEmptyMovieClip("percentText_mc", _root.getNextHighestDepth());
_root.percentText_mc.createTextField("percentTextField", _root.getNextHighestDepth(), 0, 0, 150, 20);
newTf = new TextFormat();
newTf.font = "myVerdana";
newTf.size = 12;
newTf.color = 0xff0099;


_root.percentText_mc.percentTextField.embedFonts = true;


Preloader._x = 410;
Preloader.moveTo(0, 0);
Preloader.beginFill(0x006699, 70);
Preloader.lineStyle(1, 0x006699, 0);
Preloader.lineTo(410, 0);
Preloader.lineTo(410, 307);
Preloader.lineTo(0, 307);
Preloader.lineTo(0, 0);
Preloader.endFill();
trace(Preloader._width);
Preloader._xscale = 0;
function Preload(Target) {
var Percent:Number = 0;
container_mc.depthTrack++;
var dT = container_mc.depthTrack;
loaderMC = container_mc.createEmptyMovieClip("image" + dT, dT);
loaderMC._alpha = 0;
loaderMC.loadMovie(Target);
onEnterFrame = function () {
Percent -= (Percent - ((loaderMC.getBytesLoaded() / loaderMC.getBytesTotal()) * 100)) * .25;
_root.percentText_mc._x = Preloader._x - Preloader._width;
if (loaderMC.getBytesTotal() < 1) {
_root.percentText_mc.percentTextField.text = "0 percent loaded";

} else {
_root.percentText_mc.percentTextField.text = Math.round(Percent) + "percent loaded.";
_root.percentText_mc.percentTextField.setTextFormat(newTf);
}
Preloader._xscale = -Percent;
if (Percent > 99) {
delete onEnterFrame;
var dT = depthTrack;
if (dT > 1) {
removeMovieClip(container_mc["image" + (dT - 1)]);
}
percentText_mc.percentTextField._alpha = 0;
loaderMC._alpha = 100;
scaleToZero = new mx.transitions.Tween(Preloader, "_xscale", mx.transitions.easing.Regular.easeOut, Preloader._xscale, 0, 1, true);
}
};

}



btn1.onRelease = function() {
Preload("http://www.mentalindustries.com/pretra/pic01.jpg");
}
btn2.onRelease = function() {
Preload("http://www.mentalindustries.com/pretra/pic03.jpg");
}
btn3.onRelease = function() {
Preload("http://www.mentalindustries.com/pretra/pic02.jpg");
}

View Replies !    View Related
Hey All Going Out Of My Mind Trying To Find This
I am trying to build a portfolio page for my company and I am going out of my mind looking for a scrolling menu verticle...

Here is what I need if anyone knows of a tutorial or anyone can tell me how the heck to do this.

I need one box with images / or lables with a scroll bar ... I have no idea how to do the scroll thing. I am action script retarted but good at copy and paste. Then on click of the left it will load up on the right with info and possibly this will scroll as well.

Any ideas. Let me know I would greatly appreciate it... Thanks
Jeremy

View Replies !    View Related
Ive Lost My Mind. PLZ HELP
Hi, I have a scene in flash mx with 5 buttons at the bottom of the stage. When you click on the buttons I want the image on the stage to fade out and another to fade in. Thank you in advance guys.

View Replies !    View Related
Lossing My Mind
Can anyone help elaborate on why my btn's are not working?
I'm not getting anywhere with this!

Here is the past thread: http://www.kirupa.com/forum/showthread.php?t=245774

And here is the FLA... Again...
http://idisk.mac.com/jasoninch/Public/MENU_2.fla

View Replies !    View Related
If You Dont Mind.....Help.
Please Take a look at my attached .FLA so you can see what I'm trying to explain....All Help Is GREATLY appreciated
================================================== ==========================================


Basically I have 6 Layers

RedButton
Blue Button
Green Button
OrangeButton
Text
Actions

Each of the buttons corresponds to a different word which I have nested inside the "Text" movieclip which when pressed SHOULD bring up the word with a little alpha from 0-100
Each word has an instance name to be referred to as well.

Here's my action script for the first button

this.RedButton.on(release){
_parent.Text.Hello.gotoAndPlay(2);
}

When it compiles it gives me an error of "Field name expected after "." operator. Anyone know what this is or how I can fix my code....see any other errors? What's the best way to approach this movie?

Thank you for all your help...you guys are awesome.

View Replies !    View Related
If You Dont Mind.....Help.
Please Take a look at my attached .FLA so you can see what I'm trying to explain....All Help Is GREATLY appreciated
================================================== ==========================================


Basically I have 6 Layers

RedButton
Blue Button
Green Button
OrangeButton
Text
Actions

Each of the buttons corresponds to a different word which I have nested inside the "Text" movieclip which when pressed SHOULD bring up the word with a little alpha from 0-100
Each word has an instance name to be referred to as well.

Here's my action script for the first button

this.RedButton.on(release){
_parent.Text.Hello.gotoAndPlay(2);
}

When it compiles it gives me an error of "Field name expected after "." operator. Anyone know what this is or how I can fix my code....see any other errors? What's the best way to approach this movie?

Thank you for all your help...you guys are awesome.

View Replies !    View Related
Flash Mind Map
Hi guys,

I've been looking for a Flash or DHTML (JavaScript) based online mind mapping app/script. Something like:

http://www.ikarma.com/user/networkvi...sp?userid=8128

http://www.liveplasma.com/index.php?...archtype=artis

http://www.doubleyou.com

Any suggestions are much appreciated!

View Replies !    View Related
Mind Blowing
This site was mind blowing for me when i highed up the volume of speakers it blowed the windows too lol lets c what u say about ithttp://www.tokyoplastic.com

View Replies !    View Related
How To Create What I Have In Mind
Dear guest,

A year ago I started to use flash and did a lot of tut's to get the basic of Flash. I created websites fully in flash and it works great. But this sites were made by basic not to much actionscript base. Now I'm trying to use more actionscript etc. I google the world wide but I can't find anything thats close to my idea.

First I will tell my idea so u can help me better so u can send me straight to my idea.

My background containts a banner and one button to "open" the navigation. The buttons "inside" the navigion allows the visitor to explore the site. When he / she clicks a button a new screen will show up and contains information or again buttons to retreive news etc.

When I use the basic of Flash I can make this, but it will be very messy and will reach a lot of mb's. I found a tutorial about levels and setup my background into level 3 etc etc and load them. But I'm not sure if its the right thing for my idea. Becus there are a lot of ways to create this idea from me. And do I have to make MCs and set them invisible and if the visitor hit the button it will show up.? Also I want to make the contents draggeble and "closable". Do I have to create different fla.'s and one main that loads the others?

Perhaps u can send me to the right links with tuts that are the closest to my idea. U can see the idea as a operating system as Windows.

Regards,
NaZa

View Replies !    View Related
HELP I'm Losing My Mind Here
K, here's the situation. I'm trying this whole countdown thing out. I've searched google and here for countdown tut's, and as great as they all are, they're all very different from each other. I've built a construction page with flash mx 2004 for a website. It has motion tweens and all. What I need to do is add a countdown clock once all the frames have played through. An example is at www.parasuco.com. I want to have the same sort of thing. Now, I understand that I need a dynamic text box for the time to display. But what is the code? How can I accomplish this?
I'm sorry for the length of this, but it's been a while since I've had to do this. And my brain is fried now. Please, please, please... anyone... help????

View Replies !    View Related
HELP I'm Losing My Mind Here
K, here's the situation. I'm trying this whole countdown thing out. I've searched google and here for countdown tut's, and as great as they all are, they're all very different from each other. I've built a construction page with flash mx 2004 for a website. It has motion tweens and all. What I need to do is add a countdown clock once all the frames have played through. An example is at www.parasuco.com. I want to have the same sort of thing. Now, I understand that I need a dynamic text box for the time to display. But what is the code? How can I accomplish this?
I'm sorry for the length of this, but it's been a while since I've had to do this. And my brain is fried now. Please, please, please... anyone... help????

View Replies !    View Related
Countdown AS / Mind Of Its Own
ActionScript Code:
var cur = 501;
function set_num() {
        if (cur != 35) {
                cur -= 1;
                num.text = cur;
       // } else {
       //         clearInterval(set_num_id);
       }
}
set_num_id = setInterval(set_num, 10);


I have this AS that starts at 500 and counts down to 35 and stops. Sometimes it works and sometimes it doesn't.

I've narrowed it down to being an AS bug, or a Flash player bug.

I've tested this file as an .exe and it works fine but when it's a .swf file it stops at 35 then slowly keeps counting down even into negative numbers. But sometimes it does stop at 35 like it is programmed

Does anyone know why this is happening?

Thanks.

View Replies !    View Related
Programmers-help My ONE TRACKED MIND
I’m really stuck on what to do next. I have the majority of actionscript down now, and I’m looking to get my teeth into something else that will help with my flash sites. I’m really looking to learn a programming language that works well with flash 5 (back end stuff) like letting me send e-mail through a server and the main thing I would like to do is query data bases.
I’m reading a java script book at the mo and it looks just like action script. So I don’t know if java would be the way to go. But then I have seen lots of PHP stuff of flash and I’m thinking that that would be more beneficial to learn. Also as I have access to msdn stuff and I have seen that a lot of programmers are excited about DotNet and I’m told that it uses XML. I’m I right in thinking that XML has no real power???
I see lots of ASP too!!! I know that asp uses VB or Java so which is the future? Which is the most logical route to take?
I don’t want to lean a language that is not powerful or will be dead in a few years, but on the other hand I not want to lean c++ (well not @ the mo) that is going to take me the rest of my life to make it say “hello world”.
PLEASE PLEASE help.

Thanx Ste

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved