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








Seemingly Simple Gotoandstop Problem


I have an MC that plays in my timeline. On the last frame of the MC I put "gotoAndStop("Scene 1", "home");




Adobe > Flash General Discussion
Posted on: 01/03/2007 11:41:39 AM


View Complete Forum Thread with Replies

Sponsored Links:

Seemingly Simple GotoAndStop Problem
I have an MC that plays in my timeline. On the last frame of the MC I put "gotoAndStop("Scene 1", "home");

View Replies !    View Related
AHHHHHHHHHHHHH Getting No Were With Something Seemingly So Simple
okay... all I want to do is have a button... a button that does a little animation on rollover, but i want the small ani to continue even after the user has moved his/her mouse away. So it doesnt just jump back...

ill attached what I have so far (FLA and SWF).. whenever I ad the script on>press goto and stop fram 31...... nothing... doesn't even recognize the rollover any longer! ahhhhhhhhhh


please help

thanx

derek ptacnik

View Replies !    View Related
[F8] Stumped On The Seemingly Simple
Can anyone do me a solid and translate this desire into actionscript(2.0). Here goes... the process outlined in layman terms - on btn push user goes -to frame -to movie on that frame -to frame within that movie. Sounds simple but I'm stumped on the code. So, once again, upon the root timeline, there lies a frame, upon that frame there lies a movie, and within that movie there lies a frame, how would a btn on the main timeline get me there? Thanx

View Replies !    View Related
A Seemingly Simple Problem....
I have what is probably a very simple problem, but I've never been a very strong coder. Here goes:

I have a scene that plays til the middle, then has an action to stop. The scene has about 30 different links. What I want to happen is this: When the user clicks on any random link, the timeline plays til the end before proceeding to the respectively linked scene.

Try as I might, I can't seem to figure it out. Any help would be greatly appreciated!!

beth

View Replies !    View Related
Seemingly Simple Button Problem
I think I need someone who understands to just tell me what my stumbling block is.

I'm using Flash MX, on a mac, I have a button that has NO keyframes in it. I keyframe each state, Up, Over, Down, and Hit. Then I try to add an action to the Over state keyframe, but all of the actions are greyed out.

What I'm ultimately trying to accomplish is to have a caption for the button appear when the user hovers over the button.

What gives?

Thanks!

-spack

View Replies !    View Related
Seemingly Simple Button Problem
I have a situation where you moouse over a button and a MC plays creating a dropdown menu. sometimes if you rollover it quick it plays and when you rollout it doesn't go away it just stays open. is there a way to remedy? perhaps some sort of mouseover timer? am I missing something? should Idrink some more coffee? help please...

View Replies !    View Related
Seemingly Simple Array Question
I have an array with say, 10 entries. Entries 6,7, and 8 are populated as follows:

my_array[6] = 17;
my_array[7] = 19.5;
my_array[8] = 26;

If in another function, I had the number 19.5, how could I use that to return the number 6. I can't seem to find function that will look through an array for a value, and return that index number. Any ideas?

View Replies !    View Related
Resizing....I Hate To Even Ask Such A Seemingly Simple Q....
I can't for life of me figure out the following:

I have been given a new movie to work with that is 550x400
and I need to convert the movie to 578x291. The movie, in its original size appears in the middle of the stage and all I want to do is resize the stage AND keep the movie in the center.

How do I do resize the stage and keep the movie in its current orientation in relation to the stage without having moving every object, layer, motion guide, symbol by hand?

Thanks in advance.

B. Huston

View Replies !    View Related
Seemingly Simple Problem With Links
I would really appreciate any helpful advice that is available!

I am trying to create a cd using flash. The flash file needs to have links to pdfs that are also stored on the cd. The only thing that I can figure out how to link to is other flash files and internet files, not pdfs.

Anyone have any insight?

I have no action script knowledge whatsoever, so I attempted to use the Behavior link to website feature, and then just type in the file name, but that obviously didn't work.

Cd needs to go out today, and all else is set. So please help!! Thanks

View Replies !    View Related
Resizing....I Hate To Even Ask Such A Seemingly Simple Q....
I can't for life of me figure out the following:

I have been given a new movie to work with that is 550x400
and I need to convert the movie to 578x291. The movie, in its original size appears in the middle of the stage and all I want to do is resize the stage AND keep the movie in the center.

How do I do resize the stage and keep the movie in its current orientation in relation to the stage without having moving every object, layer, motion guide, symbol by hand?

Thanks in advance.

B. Huston

View Replies !    View Related
Argh - Problem With Seemingly Simple Geturl
I've got a flash movie up that I'm having problems with. The movie is trying to jump to a new url on the same server, and I keep getting

"The attempt to load 'Accessing URL:http://...' failed."

I am using geturl(jumpurl) inside the movie

I have tired variants of "_self" and "_top"

the way the movie works is it validates an entered password by passing it to a PHP script and the PHP passes back the URL to jump to based on the passoword/username. The URL ends up in jumpurl variable in movie.

I've debugged the passing of variables and as many things as I can and I'm still stuck. I think I'm overlooking something basic with getting out of the flash movie and to the new html page... I've considered doing a call to javascript but I'm not too hot with java and I want to open the new URL in the same browser window, not a new page.

I'd love some help on this. I've also checked out the file permissions on the site where everything sits and all seems to be well -

ANY HELP APPRECIATED! THANKS!

d.

(let me know and I can point you to URLs to check this out or give more info if needed - THANKS!)

View Replies !    View Related
Seemingly Simple Dynamic Text Problem
Hey,
i have a movie that loads in dynamic text from a text file. THe body shows up fine, but the header doesnt. I ran a trace action to make sure the text is getting loaded in, and it is, but will not show in the dynamic text box with the instance name "subject"..

FLA and .txt files are attached..

Help?

thanks,
-myk

View Replies !    View Related
Help - Seemingly Simple Active Button Question...
Hi all.

OK, help.

This is very simple. I know it is. And it's beyond me.

I have buttons (transparent) and little mc animations (tweened the good old fashioned way) that play underneath them on onPress.

What I want to do is make it so that when you press say "Home" the animation will stay in the "on" position until you click something else, anything else. That is to say, I want to say "This button just got clicked, play the animation, keep it in the "active" state while the user is looking at the page, and play the "inactive" state when the user clicks ANYTHING else."

Right now, I've coded each individual button like this:

on(release) {
content.loadMovie("about.swf");
buttonthing.gotoAndPlay ("off");
buttonthing3.gotoAndPlay ("off");
buttonthing4.gotoAndPlay ("off");
buttonthing2.gotoAndPlay ("on");
}

That's just silly, but I can't figure out any other way!

Any help with this would be great. I don't want to do anything complex, just a simple way of saying it with AS would be amazing.

Thanks!

-B

View Replies !    View Related
Help - Seemingly Simple Active Button Question...
Hi all.

OK, help.

This is very simple. I know it is. And it's beyond me.

I have buttons (transparent) and little mc animations (tweened the good old fashioned way) that play underneath them on onPress.

What I want to do is make it so that when you press say "Home" the animation will stay in the "on" position until you click something else, anything else. That is to say, I want to say "This button just got clicked, play the animation, keep it in the "active" state while the user is looking at the page, and play the "inactive" state when the user clicks ANYTHING else."

Right now, I've coded each individual button like this:

on(release) {
content.loadMovie("about.swf");
buttonthing.gotoAndPlay ("off");
buttonthing3.gotoAndPlay ("off");
buttonthing4.gotoAndPlay ("off");
buttonthing2.gotoAndPlay ("on");
}

That's just silly, but I can't figure out any other way!

Any help with this would be great. I don't want to do anything complex, just a simple way of saying it with AS would be amazing.

Thanks!

-B

View Replies !    View Related
Just Need One Knowledgeble Person To Answer A Seemingly Simple Question For Me...
I have a button that uses loadVariables to bring a txt file into a dynamic text box. I want to be able to click on a word in that txt file once it is loaded into the .swf and cause it to load a different txt file into that same text box. Instead of using a hyperlink to go to a different webpage, I want it to go to a different txt file in the same movie. Does this make sense?

Recap: This is what I want to do: clicking on a word in theory.txt causes history.txt to load into the same movie, same dynamic text box.


Please help me...this is the third or fourth time I've posted this message, and I've gotten a few views, no answers. Someone please answer!

Thankyou in advance,
Kaugummisch

View Replies !    View Related
Seemingly Simple Yet Immensely Annoying Flash And Php Proble
i've been having a hard time getting flash to read the output of a php script. the php seems to output name/value pairs ok when accessed in the browser but flash is getting the variables as 'undefined' when i try to trace them.

just to test my setup i followed the simple example here - http://www.heaveninteractive.com/web...th-php-part-1/ - but it still gives 'undefined' for both trace outputs.

if i trace (evt.target.data) i get

Code:

%3C%3Fphp%0A%0A%24returnVars%20=%20array%28%29%3B%0A%24returnVars%5B%27username%27%5D%20%3D%20%22John%20Doe%22%3B%0A%24returnVars%5B%27email%27%5D%20%3D%20%22johndoe%40hotmail%2Ecom%22%3B%0A%24returnString%20%3D%20http%5Fbuild%5Fquery%28%24returnVars%29%3B%0A%0A%2F%2Fsend%20variables%20back%20to%20Flash%0Aecho%20%24returnString%3B%0A%0A%3F%3E

so i can see the values in there, but flash is unable to access them.

as you can tell i'm not the most experienced as3 bod. any ideas my fellow scripters?

View Replies !    View Related
A Seemingly Very Simple Embedded Font Problem, Completely Unsolvable?
Hi,

I've posted on this issue in one form or another several times over the past few weeks, and it remains completely un-resolved. I keep telling myself to just move on but there HAS to be a way of doing this. It seems so simple! Thanks to all of the members who have already offered their suggestions and taken a few stabs at it themselves.

I'm going to strip the problem down to the nitty gritty here:

-mc_A and mc_B each have dynamic text fields that use Verdena Bold.
-mc_A loads mc_B into a container on it's main timeline.
-mc_A has a dynamic text field offstage on frame one which is set to Verdena Bold and has chosen chars embedded. This textfield is also within a mc in it's library called "text_mc".
-mc_B needs access to those characters

That's it! Before you just say "font symbol", or "shared library item", please give it a shot. Here's what I ran into:
If I just use attachMovie it works great.
If I try to publish mc_B without embedding the font, I can't adjust its alpha
If I embed the font, the size raises accordingly
Font Symbols not only require me to import about 20k of gibberish, but I couldn't get them to work at all without again embedding characters.
Dragging an instance of text_mc from mc_A to mc_B didn't work either

You have no idea how many hours I've spent on this. If I quit now it means that I've just flushed all of those hours down the toilet. Can anybody please post a working example?

BTW, I'm using Flash8 but publishing for Flash7.

View Replies !    View Related
GotoAndStop No Not A Simple One
ok i have a health bar and at very end of it (when you die) i want the main timeline to gotoAndStop ("gameOver") but how

View Replies !    View Related
Simple Gotoandstop Help
ok i havent done flash in for ever, so im just now getting back into it, and ive forgoten so much...


Code:
stop();
ball.onPress = function(){
ball._x = Math.random()*600;
ball._y = Math.random()*600;
ball._width = 25 + Math.floor(Math.random()*41);
ball._height = 25 + Math.floor(Math.random()*41);
hits++;
}
time = 5;
clearInterval(idsetInterval());
id = setInterval( function(){
time--;
},1000);
if (time == 0){
gotoAndStop("Scene 2", 1);
}
everything works, except the gotoandstop, once time hits 0, it goes into negitives, and it stays at the current frame. help please

View Replies !    View Related
GotoAndStop(2) Error (simple)
Hey guys,
Here's a strange error. i have a two frame fla with the command gotoAndStop(2) on the first frame. It works fine and jumps to the 2nd frame when you export the swf. However, when you view the swf in an html file it doesnt work. It just hangs on frame 1. Any ideas as to why this might be the case. Is it possible that flash player 7 could be glitchy?
thanks guys
Don

View Replies !    View Related
A Simple GotoAndStop Is Failing Me.
Can someone please look at my swf file and tell me why the One Player button doesn't change to the second frame of the scene when clicked. I have tried so many different things and nothing seems to work.

http://www.ethland.com/Bunny's Quest 2.fla

EDIT: Fixed the link and forgot to add that I am using Flash Professional 8.

View Replies !    View Related
Simple GotoAndStop Issue
I've got 2 scenes in my movie.

The first is the "main" mc and holds my homepage.
The second is tittled "content" and holds a single frame named "ad".

On a button inside a mc on the main scene, I use the following action script.

on (release) {
gotoAndStop("content", "ad");
}

View Replies !    View Related
Simple Question About GotoandStop
here's the thing. I created a movie clip (named it "symbol 1") and placed it on the stage... now, inside that movie clip, I have a bunch of buttons that use the command gotoandstop... the thing is that I need to control the MAIN timeline and NOT the MC's timeline... like if i put gotoandstop frame 7, it will go to frame number 7 in the "symbol 1" mc and not in the main timeline... I tried labeling the frame in the main timeline (named it "frame1") that I wanted the button to go to but doesn't work. Any ideas on how I can control the main timeline by using buttons inside an existing MC?

Thanks

View Replies !    View Related
Simple Button GotoAndStop, Can't Get It In AS3?
I'm trying to learn this fancy AS3 jazz and keep getting an error when I do a simple gotoAndStop. Does anyone know what I'm doing wrong?

Code:

skipBtn_mc.buttonMode = true;

skipBtn_mc.addEventListener(MouseEvent.CLICK, skipClick);
skipBtn_mc.addEventListener(MouseEvent.ROLL_OVER, skipOver);
skipBtn_mc.addEventListener(MouseEvent.ROLL_OUT, skipOut);

function skipOver(event:MouseEvent):void
{
skipBtn_mc.gotoAndStop("over");
}

function skipOut(event:MouseEvent):void
{
skipBtn_mc.gotoAndStop("up");
}

function skipClick(event:MouseEvent):void
{
gotoAndPlay("small");
}

Error:

1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:SimpleButton.

1119: Access of possibly undefined property buttonMode through a reference with static type flash.display:SimpleButton.

View Replies !    View Related
Simple GotoAndStop Issue
I have a movie clip on the stage and have given it the instance name "team1". inside this movie clip there are two states. at frame1 it says one thing, then at frame 10 has an image.

team1 stops at frame 1 and what i want to do is when the main time line reaches say frame 50, i want the team1 movie clip to gotoAndStop at frame 10, thus showing the image and not the text.

i tried doing it by putting this on the main timeline at frame 50:

team1.gotoAndStop("team");

but it doesn't work. What have I missed as I know this is possible.

Sean

View Replies !    View Related
Simple GotoAndStop Won't Work In This Script
This script is on the MC. Everything works except the last onRelase function which just won't go to "disable". If I change "disable" to "fadein" it will work. Please see the attached timeline pic to get better idea and please do let me know what I'm doing wrong.


onClipEvent (enterFrame) {

_root.navbtns_mc.webnav.onRollOver= function() {
webnav.gotoAndPlay ("fadein");
}
_root.navbtns_mc.webnav.onRollOut = function() {
webnav.gotoAndPlay ("fadeout");
}
_root.navbtns_mc.webnav.onRelease = function() {
webnav.gotoAndStop("disable");
}

}

View Replies !    View Related
[F8] Simple Button GotoAndStop Command...
I seem to be having the hardest time making a movieclip instance tell another movie clip instance to gotoAndStop on a certain frame label via mouseclick. I've done this before easily, but for some reason the code isn't working this time. Here's what I have for actions:
stop();

// these actions work correctly

aboutMyself.onRollOver = over;
aboutMyself.onRollOut = out;

education.onRollOver = over;
education.onRollOut = out;

family.onRollOver = over;
family.onRollOut = out;


function over() {
this.gotoAndStop("over");
}
function out() {
this.gotoAndPlay("out");
}

// these actions are not working correctly

this.aboutMyself.onRelease = function() {
this.aboutMeNav.gotoAndStop("about");
}

this.education.onRelease = function() {
this.aboutMeNav.gotoAndStop("edu");
}

this.family.onRelease = function() {
this.aboutMeNav.gotoAndStop("fam");
}aboutMeNav is the movie clip I'm trying to direct. The first set of functions are making the movie clips act as rollover buttons, and the second set are giving them the action to do their job. Am I going crazy?

View Replies !    View Related
Probably Very Simple -undefined Method GotoAndStop
Hi I get this error message in the compiler window

1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.displayisplayObjectContainer.

menuItem2_mc is on the main timeline.
"home" label is on the main timeline

here is my code

Code:
this.menuItem2_mc.addEventListener(MouseEvent.MOUSE_UP, clickMenu2);

function clickMenu2(event:MouseEvent):void {
parent.gotoAndStop("home");
}
what is wrong?
thanks mark

View Replies !    View Related
Make This Simple GotoAndStop Work
I boggled with this simple script.

This script is on the MC. Everything works except the last onRelase function which just won't go to "disable". If I change "disable" to "fadein" it will work. Please see the attached timeline pic to get better idea and please do let me know what I'm doing wrong.


onClipEvent (enterFrame) {

_root.navbtns_mc.webnav.onRollOver= function() {
webnav.gotoAndPlay ("fadein");
}
_root.navbtns_mc.webnav.onRollOut = function() {
webnav.gotoAndPlay ("fadeout");
}
_root.navbtns_mc.webnav.onRelease = function() {
webnav.gotoAndStop("disable");
}

}

View Replies !    View Related
Make This Simple GotoAndStop Work
I boggled with this simple script.

This script is on the MC. Everything works except the last onRelase function which just won't go to "disable". If I change "disable" to "fadein" it will work. Please see the attached timeline pic to get better idea and please do let me know what I'm doing wrong.


onClipEvent (enterFrame) {

_root.navbtns_mc.webnav.onRollOver= function() {
webnav.gotoAndPlay ("fadein");
}
_root.navbtns_mc.webnav.onRollOut = function() {
webnav.gotoAndPlay ("fadeout");
}
_root.navbtns_mc.webnav.onRelease = function() {
webnav.gotoAndStop("disable");
}

}

View Replies !    View Related
Simple Code, Wierd Problem With GotoAndStop()
function updateImage(thumbClicked) {
var showFrame = thumbClicked + 1;
_root.imageWindow.imageFrames.gotoAndStop(showFram e);
}



sinple code..

it changes a movie clip frame based on the picture that i want to show..

since the 1st frame is BLANK i need to add + 1 to the .gotoAndStop();

but wheni do that.. every thumb clicked just shows the last frame in the movie clip..

when its without the +1 then its one frame behind..

any suggestions... PLEASE.. simple things like this just bug me..

View Replies !    View Related
Simple _root.gotoAndStop Not Working, Any Ideas?
I have a movie clip playing, once the movie clip finishes there are two buttons displayed on the last frame of the movie clip (which has a stop action on it); thus giving you the choice to proceed to one of two pages. I want the button to send you back to the main timeline, so I had this script:

on (release) {
_root.gotoAndStop(6);
}

And the other button was the same script, but frame 5 instead of 6. The button that is supposed to send you to frame 5 doesn't work at all, and the button assigned to send you to frame 6 sends you to frame three.

EDIT: I noticed that frame six was going to 3 (half the value of what it was supposed to go to) and frame five wasn't going anywhere (I guess because there is no frame 2.5). I tried changing the code to:

on (release) {
_root.gotoAndStop(12);
}

And the other code to (10); The above code places you on frame 6, and the code set to (10); sends you to frame 5. Why is it cutting the numbers in half? I can leave it like this for now because it works fine.. I'm just wondering why it is doing this.

View Replies !    View Related
Brutally Simple GotoAndStop/Loop Fails?
Here is a very simple script which checks that the swf is running on its valid domain, and loop continuously if so, and if not puts up a message and stops there. Instead when the domain check fails (as expected) it stops at an inexplicable frame. I've tried different frame labels and even frame numbers, even extra frames in between to no avail. Please help me 'cuz I'm wiggin' out!

//FRAME 1
if( isRegisteredDomain(domainList, _level0._url) == 0){
_root.gotoAndStop("UNAUTHORIZED");
//this.unloadMovie();
}

//FRAME 2: Labeled "Loop"

//FRAME 3-30 straight animation and no AS

//FRAME 31
_root.gotoAndPlay("Loop");

//FRAME 32 Labeled "UNAUTHORIZED"
stop();

View Replies !    View Related
Simple Code Error: Button GotoAndStop
Hey guys, can someone tell me what's wrong with this code? I'm trying to have a button go to a certain frame, then play an external flv file.

THANKS!


soloBTN.onRelease = function() {
soloBTN.gotoAndStop (30) {
ns.play("solocollaborativereel.flv");
}
}

View Replies !    View Related
Simple GotoAndStop Error: Call To Undefined Method
I'm new to AS3 and am trying to simply make a button within a movie clip send me back to the first frame and stop. But i'm getting Error 1180:

"Call to a possibly undefined method ExplanationClip."

Here's my code:

Code:
import flash.events.MouseEvent;
CloseBtn.addEventListener(MouseEvent.CLICK, Explain);
function Explain(event:MouseEvent):void{
ExplanationClip.gotoAndStop(1);
}


I also tired ExplanationClip(root) and ExplanationClip(parent) to fix this, but still no luck. Thanks!

View Replies !    View Related
Creating Shapes, Seemingly From Nowhere
In an example that came with Flash 5.0, they had one under Help>Samples>Circular Motion that had a line go from the origin to the mouse.

I didn't understand the code.

Someone help? No obligation. Even a tutorial would be warmly (and graciously) accepted.

~Crickett

View Replies !    View Related
Seemingly Easy Problem..
Hey,
i'm just trying to make a small cursor follow the mouse in a certain section of a movie i'm making.. But am getting some odd results.. For testing, i created a new movie with nothing but a ball. Made the ball an object and put the following code on the ball:

Code:
onClipEvent(enterFrame) {
if(_xmouse>6.8 && _xmouse>351.8) {
this._x = _xmouse;
}
}

the ball moves real jerky, and a ghosted image of the ball appears onscreen, both flashing rapidly....

what am i doing wrong? the code make sense to me, but cant seem to figure out the flashing (no pun intended). I also tried adding updateAfterEvent(), but still no help...

thanks,
-myk

View Replies !    View Related
Seemingly Faultless Code
I'm making a site for my mate's band, yadda, yadda, yadda.

Anyway, I've just about finished, and I've got the problem now that everything works fine, except for one bug on the menu.

See the attached file, and then click "Menu", and rotate it to the right.
After "Homepage", clicking again it does nothing. Click again, and it skips past "News" and goes straight to "Biographies".

I've checked my code several times, but can't see any problems with it!

Any help, please?

Download .fla here

View Replies !    View Related
Pics Seemingly Overlapping...?
hey guys-

been workin on the photo section for a guys site. got this code goin into parsing the xml, gettin the appropriate information into an object, attaching the thumbnail movieclip to the stage, getting the right thumb pic loaded into it, preloading it, etc etc. well everything is tracing back right, but no pics were showing up. so i changed the url to the loadMovie command to the normal sized pic (which should be called when clicking on the thumbnails once all this is said and done). well now i see the pics show up momentarily but then are gone after the next pic is loaded. yet all the thumb holder clips are on seperate levels. can anyone think of why this might be happening based on the below code? i can zip up the used elements (.fla, .jpg, etc) if anyone can take the time to check it out for me. i've been tryin to get over this little hurdle for like two weeks now and really need to get it over w/ so i can continue w/ the development, so thank you very much for any time you spend on tryin to help me out! peace-


Code:
initParse = function () {
pics = [];
var picNodes = picXML.firstChild.childNodes;
for (var i = 0; i<picNodes.length; i++) {
var picURL = picNodes[i].attributes.url;
var picThumb = picNodes[i].attributes["thumb"];
pics.push({url:picURL, thumb:picThumb});
}
_root.createEmptyMovieClip("thumbsHolder", 10);
thumbsHolder._x = 100;
thumbsHolder._y = 50;
buildThumbs(thumbsHolder);
};

buildThumbs = function(clip) {
var i:Number = 0;
var amt = pics.length-1;
var xSpace = 0;
var ySpace = 0;
var xInc = 70;
var yInc = 60;
var buildIt = function() {
var mc = clip.attachMovie("thumbsHolderMC", "thumb_"+i, i, {_xscale:0, _yscale:0});
mc._y = ySpace;
mc._x = xSpace;
mc.scaleTo(100, .60, "easeOutExpo");
xSpace += xInc;
(i == 4 || i == 8)?ySpace += yInc:null;
i++;
if (i > amt) {
clearInterval(doBuild);
loadThumbs(clip);
}
}
var doBuild = setInterval(buildIt, 150);
}

checkIt = function (j) {
var tB = mcArr[j].holder.getBytesTotal();
var lB = mcArr[j].holder.getBytesLoaded();
//trace("mcArr[j]: "+mcArr[j]+" | typeof: "+typeof (mcArr[j]));
var per = Math.round(100*(lB/tB));
// If the loaded bytes exeeds 10 AND load percentage is 99 or greater...
if (lB>10 && per>=99) {
trace('mcArr['+j+']: '+mcArr[j]+' loaded successfully');
var dep = mcArr[j].getDepth();
clearInterval(doCheck);
mcArr[j].gotoAndStop("loaded");
j++;
loadIndividual(j);
}
};
//
loadIndividual = function (i) {
// Execute the code in this function only if the movieclip array has not been exhausted.
if (i<mcArr.length) {
mcArr[i]._alpha = 100;
//trace("mcArr[i]: "+mcArr[i]+" | typeof: "+typeof (mcArr[i]));
mcArr[i].holder.loadMovie(pics[i].url);
//trace("pics[i].thumb: "+pics[i].thumb);
doCheck = setInterval(checkIt, 200, i);
}
};
//
loadThumbs = function (mc) {
// hold all the thumbs mc references needing to be preloaded;
mcArr = [];
var j:Number = 0;
var k:Number = 0;
for (var i in mc) {
// Restrict content of array to only movieclips.
if (typeof (mc[i]) == "movieclip") {
// Include FULL movie clip path.
mcArr[j] = mc[i];
j++;
}
}
mcArr.reverse();
loadIndividual(k);
};

stop();

View Replies !    View Related
Seemingly Easy Problem With If And Else Ifs
ok so i was tryin to learn something new but its not working as i want it to:

i have a nav of 3 buttons: gpl, brownfields, and toxic
i also have a movie clip of a tab behind each button, which is just text, and the tab movie clip is just a fade in animation and a fade out animation, each named differently, active_gpl active_brown and active_toxic

so i want my code to play the fade in animation when u click the button, and to check to see if the other buttons have a tab and to fade those out.


ActionScript Code:
var gplBTN = false;
var brownBTN = false;
var toxicBTN = false;

stop();

gpl.onRelease = function() {
    active_GPL.gotoAndPlay("start")
    gplBTN = true;
    if (brownBTN = true) {
        active_brown.gotoAndPlay("finish");
        brownBTN = false;
    }
    else if (toxicBTN = true) {
        active_toxic.gotoAndPlay("finish");
        toxicBTN = false;
    }
    else {
    }
}
brownfields.onRelease = function() {
    active_brown.gotoAndPlay("start")
    brownBTN = true;
    if (gplBTN = true) {
        active_GPL.gotoAndPlay("finish");
        gplBTN = false;
    }else if (toxicBTN = true) {
        active_toxic.gotoAndPlay("finish");
        toxicBTN = false;
    } else {
    }
}

toxic.onRelease = function() {
    active_toxic.gotoAndPlay("start")
    toxicBTN = true;
    if (brownBTN = true) {
        active_brown.gotoAndPlay("finish");
        brownBTN = false;
    }
    else if (gplBTN = true) {
        active_GPL.gotoAndPlay("finish");
        gplBTN = false;
    }
    else {
    }
}

the problem is, when i click a button, it will play the fade out of another button even when it should be false...so it looks kinda weird

any help?

View Replies !    View Related
Flashvars Seemingly Not Working
I'm having issues getting Flashvars and url encoded variables working in CS3 / AS3. I swear I have everything setup correctly, but variables are not passed. And, when I publish, I get: 1120: Access of undefined property _root compile error. I can't even get the Adobe example to work: I know I must be missing something really simple, any help would be greatly appreciated. Code below.











Attach Code

AS:

var my_video:String;
my_flv.source = _root.my_video;

HTML:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="player" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="player.swf" />
<param name="FlashVars" value="my_video=video.flv>
<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />


<embed src="player.swf" FlashVars="my_video=video" quality="high" bgcolor="#ffffff" width="550" height="400" name="player" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

View Replies !    View Related
GetDefinitionByName Seemingly Not Working
Alright, weird issue here, out of nowhere basically. Trying to instantiate a class using a string, which works absolutely fine outside of one class ("NavButton").


ActionScript Code:
trace(NavButton.work); // traces MOTHER F***ING WORK!classReference = getDefinitionByName("com.cfms.NavButton") as Class;// returns ReferenceError: Error #1065: Variable NavButton is not defined.  


I can manually instantiate the class through new NavButton(). It's importing fine, it's compiling fine, I can trace static vars fine, I can manually make the class. All of my other classes from the package work fine with getDefinitionByName...

PS. I've stripped everything from the class in case of conflicts, or something...


ActionScript Code:
package com.cfms {    import com.cfms.SiteSprite;    class NavButton extends SiteSprite {        public static var work:String = "MOTHER F***ING WORK!";        function NavButton(xmlInfo:XML) {            super(xmlInfo);          }    }}


ARGH! What am I missing here?

View Replies !    View Related
So Easy, Seemingly...Japanese Language
Hi,
This should be simple, but I've looked and read and can't figure it out.

I'm using Flash MX. I want to give my users the options of displaying text in Japanese (and other languages). Currently, I have a dynamic text field that updates in English.

I want to do the same dynamic text in Japanese. I don't know Japanese, so I won't need to be typing it in. However, I have a translation that I just want to cut and paste into the .fla.

What are the steps I need to do for this? I've read the Macromedia site and can't see how to do it easily. I'd rather not have to reset my OS language.

Please help!
Maria

View Replies !    View Related
Seemingly Easy GotoAndPlay Problem...
First post here..

I have to make a flash game by next Wednesday for school and i've run into a problem. The game involves flying a helicopter through obstacle courses. When the helicopter reaches the pad at the other end, it should change scene to the next level.

The helicopter itself is a movie clip, as well as the pad and all the obstacles. This is the problem area of code- this is on the helicopter.

if (hitTest(_level0.wall6)==true) {
_root.gotoAndPlay("Scene 3",1);
}

Flash does detect the helicopter entering the pad but refuses to change scene. I've tried with _parent.gotoAndPlay, _root._root.gotoAndPlay (and many more), and I get no luck.

Any help would be appreciated.

View Replies !    View Related
[CS3] Still Struggling With A Seemingly Basic Concept
Using AS 2.0.
My idea is to have seperate movie clips play when I press different buttons, but each one must play its outro before moving on to the next.

Each clip has an intro, a stop, and an outro.

Im using the attachMovie command to bring the movie up, but how do I get the current movie's outro to play before moving on to the next?

Basically, its a bunch of colored buttons used to signify a vehicle's different color. Clicking on each changes the color of the car but I want the colors to fade between, not just change.


My goal is to be able to do this with the car's color;
http://www.dodge.com/en/2008/charger/

The only thing I CANT do is have external movie clips.

View Replies !    View Related
(seemingly) Layered Flash Websites
Hello!

I've noticed a few websites (made by hi-res! in particular) seem to be layered in some way, for example on http://www.hi-res.net . You can stretch the browser window, and the image in the background re-scales to fill the window, however, the text and links do not rescale.

Simelarly, some websites have a flash element in the top left hand corner of the browser, with another flash element in the opposite bottom right hand corner, which do not rescale when the browser window changes size.

I want to create website that works in this way, and have created a .swf that is set in dreamweaver to 100%. When I load extra flash movies on top of this main .swf, all of the movies scale together. How do I make the browser scale one flash movie and not the other?

Any help will be greatly appreciated. (I'm sorry if I wasn't very good at explaining this!)

Paul

View Replies !    View Related
.bytesLoaded Gives Seemingly Random Numbers
I'm using .getbytesLoaded on a movieclip to determine how much data is loaded (obviously) and its generally giving the right numbers.. But sometimes, for no reason, it just gets them wrong.. Maybe 1 call out of 5 is wrong.

When you convert it into a percentage form (with .bytesTotal) the percentage goes up normall, ie - 11, 12, 13.. then 4.. 5.. 16.. 17.. 18.. 9.. 0..

HELP!

View Replies !    View Related
Flash Site Breaks, Seemingly For No Reason
I build this site: http://www.refindfurniture.com

The portfolio section has a dynamically loaded image gallery which loads images into a blank movie clip and centers them. It works fine, but if you click on the buttons enough times, eventually they start showing up in weird places (really far left or right) and if you reload it enough times, sometimes it loads all the images in a quick succession in the top left of the screen.

Does anyone know why a flash movie would hvae buggy behaviour like this? I've seen stuff like this before, where it acts strangely if you click on buttons very quickly.

View Replies !    View Related
Gotoandstop
Hi I have a big problem in Flash5...

I'm using the GotoandStop funktion, and I think I have found a bug!

This is my code that doesn't work...

gotoAndPlay (variable);



the variable is a dynamic number... this wont work... why is that

View Replies !    View Related
Gotoandstop: Help Help Help
I need help..please

MovieA:
I have a button w/ the following script
on (release) {
loadMovieNum ("movN.swf", 1);
_level1.gotoAndStop("NormanE");
}


Movie "movN.swf":
1st frame is empty with script "stop"
2~6 frame: is label "JohnL" (picture)
7~11 frame is label "NormanE" (picture)

Objective:
When I click on the button, I want it to load up movieN and stop at the NormanE frame.

Problem:
First click, it will load up movN and stay at the first frame. "I know it's the [stop] that cause the problem"
If you click on it again, it will go to NormanE frame, but then NormanE frame will disappear and conintue to play back to the first empty frame.

HELP:

I need to know how I can stop at the NormanE frame and not let it continue to play back to that first stop frame. Is it because of the _level1 script? PLease help me..

PS. I tried to place stop at every place..and that didn't seem to help.

View Replies !    View Related
Gotoandstop?
When using the gotoandstop() command, how can I use the value in a combobox's data field as the frame number to goto?

I'm a newbie so please keep that in mind in your reply.

Thanks for any help.

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