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




Navigation Bar Problem.... (fla. Attached)....



hi i have this nav bar that is actually a sqaure covering another square...
and when u roll over: the first squre kin'da goes up and reveals the other square....
all of that is that with AS only including the movement - no tweens - pure AS
(u will understand when u see the fla.)....
so after we got that let's move on to the problem:
my problem is that i want to apply this several times....
but i don't seem to achieve that....
(i want to apply it to several squares - Nav bar)
here are the flas.
thanks ahead....
its mx and mx 2004....



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-23-2004, 09:39 AM


View Complete Forum Thread with Replies

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

Help With Navigation (File Attached)
As I have been banging my head against the wall for the past two days with this problem, I hope someone can help me.

I am using a movie clip with buttons to navigate to different scenes within my movie. As this movie clip is re-used in each scene, I have correctly linked the paths

Ex: _level0.gotoandplay("scenename1");

When I click on a button it goes to the correct scene, but when I happen to click on the very same link right after that it goes to the next scene and not to the scene that it is visibly linked to

Ex: instead of going to "scenename1", it plays "scenename2" instead.

Each scene has been given its own label.

I have placed an example of the problem at: http://www.esellerate.net/flash/index.htm

To duplicate to problem, do the following:
1) Click on "menu" to get the menu to slide up
2) Click on "menuitem#1" (the menu will slide back down and "MENU1" will appear in the main screen)
3) Click on "menu" again
4) Click on "menuitem#1" again (the menu will slide back down and "MENU2" will appear in the main screen instead of the expected "MENU1")

I have also placed the fla file so that you can look at how I set it up: http://www.esellerate.net/flash/menu_test_02.fla

Once again, any help would be greatly appreciated.

Navigation Bar Problem.... (fla. Attached)....
hi i have this nav bar that is actually a sqaure covering another square...
and when u roll over: the first squre kin'da goes up and reveals the other square....
all of that is done with AS only, including the movement - no tweens - pure AS
(u will understand when u see the fla.)....
so after we got that let's move on to the problem:
my problem is that i want to apply this several times....
but i don't seem to achieve that....
(i want to apply it to several squares - Nav bar)
here are the flas.
thanks ahead....
its mx and mx 2004....

Navigation Bar Problem.... (fla. Attached)....
hi i have this nav bar that is actually a sqaure covering another square...
and when u roll over: the first squre kin'da goes up and reveals the other square....
all of that is done with AS only, including the movement - no tweens - pure AS
(u will understand when u see the fla.)....
so after we got that let's move on to the problem:
my problem is that i want to apply this several times....
but i don't seem to achieve that....
(i want to apply it to several squares - Nav bar)
here are the flas.
thanks ahead....
its mx and mx 2004....

Action Works Attached To A Button But Not When Attached To A Frame
can anyone tell me why the following button script works:

on (release) {
_root.welder.eyes.gotoAndPlay(2);
_root.welder.gotoAndPlay(2);
}

but this virtually identical script won't work in a frame (on the same timeline as the button):

_root.welder.eyes.gotoAndPlay(2);
_root.welder.gotoAndPlay(2);

i've been pulling my hair out all day over this. i can't think of an explanation as to why the second example wouldn't work. its baffling to me.

Attached Sound To An Attached Container
I am trying to have sound play when the user rolls over an image with this code below:


Code:
container._visible = 0;
thumbsnr = 4;
for (var i = 1; i<=thumbsnr; i++) {
mc = this["mc_"+i];
mc.onRelease = function() {
container._visible =1;
container.attachMovie(this._name, clip, 1);
};
}
the script i am using for the sound is this:


Code:
s = new Sound();
s.attachSound("sound_1");
s.start();
i have done the linkage but it still doesn't seem to be working.

Working With Dynamically Attached Movies Inside Dynamically Attached Movies
I'm trying to work with a movie I dynamically attached inside of another movie, what is wrong with this code for setting the _x and _y of the inner most movie, and how do i fix it?


Code:

this[iButton].attachMovie("More","M"+iButton,1000+iButton);
this[iButton].["M"+iButton]._x = 10;
this[iButton].["M"+iButton]._y = 10;

CuePoint Navigation Vs. CueSegment Navigation
Having problems throwing up a talking head slide show in MX2004 Pro.

1) The slider works going forwards, but not going backwards
2) The buttons seeking slides work going forward, but not going backwards

After talking with tech support, it seems the problem is with how they set up CuePoint navigation. Basically, a single time point = cue point triggers an event, which is a slide change. This is triggered from left to right in time, but not going the other way.

A slide show requires a different action script; however. It is not cue points that are linked with slides, but SEGMENTS in time are linked with STATES that correspond with a certain slide being in place.

Is there an action script expert out there who could help me program this into a slider that really works, going backwards and forwards?

If that is too ambitious, how can I subtract 300 milliseconds from q.time?

This will at least, hopefully, make the slide buttons work, since they will seek to a time point slightly before the actual cue point.

Jonas

CuePoint Navigation Vs. CueSegment Navigation
Having problems throwing up a talking head slide show in MX2004 Pro.

1) The slider works going forwards, but not going backwards
2) The buttons seeking slides work going forward, but not going backwards

After talking with tech support, it seems the problem is with how they set up CuePoint navigation. Basically, a single time point = cue point triggers an event, which is a slide change. This is triggered from left to right in time, but not going the other way.

A slide show requires a different action script; however. It is not cue points that are linked with slides, but SEGMENTS in time are linked with STATES that correspond with a certain slide being in place.

Is there an action script expert out there who could help me program this into a slider that really works, going backwards and forwards?

If that is too ambitious, how can I subtract 300 milliseconds from q.time?

This will at least, hopefully, make the slide buttons work, since they will seek to a time point slightly before the actual cue point.

Jonas

This._Y Of An Attached MC, Just Can't Get It Right. Help Please
Hi,

I am quite new to Flash, although I know a bit of Lingo.
I have a major problem with my maths ), but still I am not going to give it up.
My problem is that I try to attach 2 different clips into a smart clip.And I want the drag bar to sit on top of the content window.

this is my script(in the frame 1 of the smart clip):

this.attachMovie("dragbar","drag",1);
this.attachMovie("content","window",2);
//posX,posY are variables sent from smart clip parameters
window._X=posX;
window._Y=posY;
drag._X=posX;
drag._Y=posY-window._height/2; (I assume that the X and Y coordinates are the center of the MC. this is where I get confused. Maybe is all wrong).

Any help would be much appreciated. If you can just explain to me this _X and _Y business cause I just don't get it from the book. Sorry. I know is a bit stupid.

Targeting Attached MCs, Please Help
hi

i have a move where i attach a movieclip multiple times, using this code:

on (release) {
// add this object to the list of chosen objects
_root.items.push("green");
name = items[j]+j;
_root.attachMovie(items[j], name, j+1);
_root[name]._x = (j+1)*50;
_root[name]._y = (j+1)*50;
_root[name+"x"] = _root[name]._x;
_root[name+"y"] = _root[name]._y;
_root[name+"rotation"] = _root[name]._rotation;
_root[name+"height"] = _root[name]._height;
_root[name+"width"] = _root[name]._width;
j++;
}

can anyone tell me how i can target the new clips on the stage without changing this code? i am having a hard time finding out the PATH to the attached clips. thanks!

justin

Attached Mcs Hog Load
hi

if you use attached internal mcs they completely hog the loading process loading before everything in the first frame and stopping any preloader even appearing until theyve loaded..

anyone come across this or found a solution

cheers

neil

Help With Attached Moives
I not to sure just how to explain the problem I am having
I am attaching a moive clip "window" and the script loops and
passes some verable from an array in to each window. the moive clip then attach more MC's to make up the buttons of the nav in each but I am have trouble given the button functionality.
help I can't work out what to do
here is a link to the fla
http://www.mac-10.net/new.fla
my coding is a bit poor.
I am very sorry if this doesn't make sense
if it doesn't take a look at the fla.


mac-10

Attached Sound
I'm trying to load a movie that contains an attached sound (so that I can adjust the volume and such). It seems that, when downloading the movie, it loads the attached sound first, then the preloading scene, then the main scene. Consequently, I see nothing as the sound is downloading, then the preloader zips by while it loads the little bit that's left of the main scene.

What can I do? Is there another way of controling volume besides attaching? Or, is there a way to changing the order of downloading? Or, is there a way of measuring the "bytesLoaded" of a linked asset?

Thanks-Regards,
Splatzz

OnRelease With Attached MCs
I am trying to put onRelease actions onto multiple attached MC's. I give each
attached clip the variable name imageItem. Farther down I call imageItem.onRelease. This only works for the last attached clip? I have done this before and it worked on all the clips. I am deperate, can anyone help??

This function is called multiple times from another function. I can add all the code if needed.

Thanks

(sorry, code tags don't seem to work?)


function populateImages() {
// number of items
if (imageCounter<imageLen && imageCounter<maxImages) {
// attach image container
imageItem = _root.attachMovie("image", "image"+imageCounter, imageCounter);
imageItem._alpha = 0;
imageItem._x = 10+Math.floor(imageCounter%5)*65;
imageItem._y = 10+Math.floor(imageCounter/5)*65;
image = navXML.firstChild.childNodes[XMLcounter].attributes.id;
// load image
_root["image"+imageCounter].loadMovie(image);
// attach loading bar
preloadbar = _root.attachMovie("loadbar", "loadbar"+imageCounter, imageCounter+1);
preloadbar._x = 10+Math.floor(imageCounter%5)*65;
preloadbar._y = 10+Math.floor(imageCounter/5)*65;
// loop loader()
this.onEnterFrame = loader;
} else {
butts();
}
// HERE'S THE PROBLEM!!!!!
imageItem.onRollOver = function() {
//imageSelected = this;
trace(this);
};
}

Preloader And Attached Mcs
Can anyone help me with this problem.

I have a movie that has 200 mcs that get imported at different
stages of the movie.

I would like to put a small animated preloader in the previous
scene that plays untill all of the movie has downloaded, (700k).

The problem is that when I test the movie it just loads the
whole movie before showing the animation.

Any ideas on how I could do it?

This is the code that I use, (the movie loops to this);

loadPercent = (Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%");
loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb de "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb");
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
// Check for finished loading
loadPercent = "100%";
// If loaded, final update to fields
loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb de "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb");
// Where to go once your movie is loaded
gotoAndPlay("go");
}

Attached Fla For Some Clues
hi,
i have been trying to add an on handler to a button(in attached fla) that has some onClipEvent actions attached to it. however whenever i do, the current actions stop working. i want to have the button activate a load movie action or gotoAndPlay action or any other action that would open another movie/MC.

any help will be much appreciated.
thank you in anticipation
janice

The Id's Of Attached Movies
if u have a for loop attaching movies to say, _root, it would look like this:

for(i=0; i<something; i++){
_root.attachMovie("movie", "movie"+i, i)
}

however, if u have a nested loop looking like this:
for(i=0; i<something; i++){
for(j=0; j<something2; j++){
_root.attachMovie("movie", "movie"+i+j, i*j)
}
}

with the first loop, i is a unique number each time, so each mc attached has a unique id. however, in the second example, if something and something2 are the same array, or at least are arrays with the same length, i dont see how to create unique id's, since there will always be matching pairs of i and j, such as 2-1, and 1-2 and so on. my solution has been to use really large random numbers, but somtimes there are two conflicting mcs that delete each other. how could i generate a unique random number every time, or a unique id somehow? thank you, i await your replies

Duplicating Attached MC
Can i duplicate Attached MC??
I have this code but it doesn't seem to work

this.DMC2.attachMovie("kartaMC","kartaMC",1);

for(i=1;i<=30;i++)
{
duplicateMovieClip(this.DMC2,"kartaMC"+i,i);
}

or this

duplicateMovieClip(this.DMC2.kartaMC,"kartaMC"+i,i );

MC's don't appear. should i attach MCs for each Duplicated MC?

GetProperty Of Attached Jpg?
If I do createEmptyMovieClip and then attach a jpeg via loadMovie, is it possible to get the height and width?

Help...movie Attached
www.customfangrills.co.uk/webFlash2.swf

please ignor all design issues as this is a demo. just set up for technical reasons.

1.click on the buttons for each section in order from left to right, see how each new section (colour) sits on top.

2.now when you goto each section randomly the bg colour reverts back to the previous section. this is because all the animaiton is in one tmieline.

how can i create my desired effect .(1) each section coming in on top when navigation randomly.

load movie clip maybe??

please help me im stumped.

maybe sombody could do me a simple fla version of 3 colours for me to edit.

thanks.

Attached MC Disappears?
I have a movieClip which animate with a couple of Tweens

Each keyframe has the same variable name

I have place another movieClip, through attachMovielip(), into the animated movieClip.

The problem is that halfway through the animation the attached movieClip disappears. It is almost as if the variable name has changed or it is another MC in the animation. The link gets broken and I can find out why. I've checked the variables and it is definitly the same MC in tweened animation.

Any ideas?

Cheers

Help: Tooltip In A MC (.fla Attached)
The tooltip works when is in the _root... but it doesnt when i insert it in a MC... i have some problems with actionscript... so if any can help me...

Put Onclipevent On Attached Mc
hi!
it´s possible to insert an onclipevent on attached mc?
i´m attaching a mc from library to de main movie, and i want to call a onclipevent that run by that attached movie.... could i?
thanx

Why This 10k Fla(attached) Drop A 6M Swf?
in my flash7 , winxp , and how to handle this wired thing..thx..

Question.. Fla Attached......
I have the attached.. i need to know how to fix the following error. Whenever you point your mouse over the bottom left of the screen a text box pops up.... that text box should only pop up, however, when i point my mouse over the green guy standing above the center. I made it pop up, changing the character to a button, then creating a keyframe by double clicking it on the edit screen, then going to "over", and pasting the textbox there. however, as said before, it appears where it would normally show up by pointing my mouse to where it would be.

Swf Buffer...with Mp3 Attached
hey guys...well i posted here a bit ago a question on making an mp3 player. i got that all figured out and it works beautifully i might add...now...here's what i want. i have the mp3 player programed that when you press play it does loadMovieNum and then it simple loads an swf from another server online and attached to that swf file is the mp3. now...what i want is a way to BUFFER the song i'm playing. example, the files that contain the songs are, on average, about a megabyte...so for a 56k user you can imagine that'd take a bit and they currently have no idea how much longer they have to wait. what i want is a bar that will appear and start on the left side of the mp3 player and extend to the far right side meaning it's 100% done. about half way i want the song to start playing even though it's not completely loaded yet. is this possible streaming an swf instead of an actualy mp3, or would i have to chagen the foratm of my mp3 player? thanks for da help!

Help With Attached File
I am trying to create a swatch selector for a paint shop, and have a problem with my flash file (attached). I am trying to make it so that when one of the small color swatches are clicked, a larger version of the same swatch appears in the white space on the right of the layout. I have already converted the first small swatch to a button as I assumed that was needed for this. Is it also possible to select an image (say a crackle jpeg or something) and when that swaych/style is clicked that it shows on a layer OVER the basic color swatch on the right? Also, how do I make a reset button?

If someone could tell me or show me how to code this that would be awesome. I attached the file in Flash 7 format. Any help would be awesome.

The Big Q , Files Attached...
ok,,, movie "Testing" is loading "dc_sub"

why cant I see the type in the comboBox list when loaded.

HOWEVER,, u can see it when just looking at dc_sub because i embeded the fonts.... so is it a bug?

anyone know the answer?

feel free to use the coding if u need to know how to use combobox with xml

HELP I Can't Unload These Attached Mc's
howdy ~ trying to remove an attached mc once it plays for about 40 frames and just can't seem to do it! the mc's are loaded through linkage.

the code for load/initiation:


Code:
kNbrJumpers = 10;
kMinSpeed = 5;// minimum rise speed
kMaxSpeed = 30;// maximum rise speed
kMinSway = .0008; // minimum sway
kMaxSway = .0001; // maximum sway
kSwayAmplitude = 20;
scale = (random(50) + 70); //scale
kScale = 2;

SW = Stage.width;
SH = Stage.height;

moveJumper = function()
{
var a = this.phase + getTimer()*this.sway;
var sway = Math.sin(a);
this._x += sway;
this._rotation = sway*kSwayAmplitude;
this._y -= this.speed;
if (this._y < -this._height) {
this._y = SH+this._height;
this._x = SW+this._width;
}
}

for (i = 1; i <= kNbrJumper; ++i)
{
var mc = _root.attachMovie('jumpinggirl', 'jumpinggirl_' + i, i,
{_x:random(SW), _y:random(SH)});
mc._x = random(SW);
mc._y = random(SH);
mc._xscale = scale;
mc._yscale = scale;
mc.onEnterFrame = moveJumper;
mc._alpha = 20 + random(60);
mc.phase = Math.random()*2*Math.PI;
mc.speed = kMinSpeed + Math.random()*(kMaxSpeed - kMinSpeed);
mc.sway = kMinSway + Math.random()*(kMaxSway - kMinSway);
mc.gotoAndStop(random(3) + 1);
}


the code(s) for removal (none of which work, dammit!):


Code:
//script placed on timeline

_root.unloadMovie['jumpinggirl', 'jumpinggirl_' + loopCount]; //1st attempt

_root.unloadClip['jumpinggirl', 'jumpinggirl_' + loopCount]; //2nd attempt

_root.removeMovieClip['jumpinggirl', 'jumpinggirl_' + loopCount]; //3rd attempt

'jumpinggirl' + i.removeMovieClip(); //4th attempt


i know this is deceptively simple - doh

thx all

Masking An Attached Mc-how?
hi.
I need to put a mask over a MC I am attaching to scene 1 so that when the MC changes size it will not overflow the mask.

thx
shaf

Slide Bar Attached To MC
I have some pages that have areas outside the stage and I want to make a slide bar at the bottom so users can pan back and forth on the page to see it all. I think I have to convert the whole area to a movie clip (it contains buttons) and then attach it to a slider so that when you slide the bar to the left the movie clip slides (not jumps) right and vice versa. I have looked through many tutorials and message boards but most deal with scrolling text which I can’t use because it uses a text box and what I have can’t be put into a text box. Besides I want it to go right and left not up and down. Some mention a scrollpane but I don’t think Flash MX has this feature. Can anyone help?

Attached Sounds
Hi,

Using Flash MX v.7

I have an attached sound that plays during a specific .swf. Is there a way to get rid of that sound when the clip unloads without stopping all sounds?

Thanks in advance for reading this.

Deck

AS To Button Attached To DB For Var
I have a button on a flash file that I would like to populate it from the database using ASP page...here is the code


the button will have a mailto: for launching email contact to the person chosen in the database....

the db file:

strContactInfo = ContactInfo;

so the variable is set (strContactInfo - dynamic text field if needed)

var set up for pulling the info from database to populate the rest of the button code...

var theUrl = "mailto:"+ContactInfo;

here is the code on the button...

on (press) {
getURL(theUrl);
}

but it doesn't work, can someone help me? must be simple enough...

thanks...

Can't Remove Attached Mc
Hi guys i wonder if someone can tell me where i am going wrong.

I Have an mc in the libary, linkage is "del"
Here is the code i use to attach to the movie
code:
delbt.onPress = function () {
if (typeof(_root.del) == undefined) {
_root.attachMovie ("dele", "del", _root.getNextHighestDepth ());
_root['del']._x = 100;
_root['del']._y = 100;
_root['del'].deleText.text = "Are you sure you want to delete this news story, newsID:" + newsID + "?";
_root['del'].newsID = newsID;
} else {
_root['del']._x = 100;
_root['del']._y = 100;
_root['del'].deleText.text = "Are you sure you want to delete this news story, newsID:" + newsID + "?";
_root['del'].newsID = newsID;
}
};

This works fine to a point.
in the "del" mc i have a button to remove "del" mc if no longer required.
code:
on (release) {
unloadMovie(_root.del)
}

I discovered that this only remove the content and not the mc that holds it "del"
So i tried
code:
on (release) {
_root.del.removeMovieClip ();
}

But this does nothing.

Anyone.

thanks
Paul

Dragging Attached MC's?
I want the user to be able to click on an MC which will cause another MC to be attached and then I want the user to be able to drag that MC around without dragging the MC it was attached to...is this possible?
Here's my code...

Code:
OriginPositive_mc.onRelease = function() {
this.attachMovie ("ParticlePositive", "ParticlePositive_mc", this.getNextHighestDepth())
}
ParticlePositive_mc.onPress = function() {
this.startDrag(false, 0, 0, 650, 368)
}
ParticlePositive_mc.onRelease = function() {
this.stopDrag()
}

Attached Movieclips
I am having some trouble attaching actionscript to an attached movieclip. im trying to make a game where it is like a top down shooter, but i need actions in the bullet to tell it what direction to go, but if i attach 1, i cant figure out how to put actionscript in it. any help would be appreciated, thanks.

How Can I Get Which Attached Movie On New Name
hi

i am attaching a movie to newgride1 , the newcolor value will change by mouse click on a button, how can i know the value from the attchedMovies newName (i mean which newcolor it hav clicked)

thanks


var _loc3 = this.newgrid1.attachMovie(newcolor, "obj" + String(objCountx), objCountx);

[F8] Incrementing An Attached MC
Hi guy

looking for some help?

I am attaching 1 button from the library that will get its instance name increament by 1, when a cuepoint has been fired through an FLV, but all I am getting is the value 0, what am I doing wrong?

the trace value that I'm getting is


Code:
nav1
buti = 0
---------
1697 of 1697 KB loaded (100%)
nav2
buti = 0
---------
nav3
buti = 0
---------
nav4
buti = 0
---------
nav5
buti = 0
---------
nav6
buti = 0
---------



Code:
ns.onCuePoint = function(infoObject:Object) {
buttons = 12;
i = 0;
trace(infoObject.name);
for (var b = 0; b<buttons; b++) {
butMaxNumber = 12;
this.attachMovie("but", "but"+i, i+1);
if (i<butMaxNumber) {
trace("buti = "+i);
this["but"+i]._x = 212.0;
this["but"+i]._y = 227.3;
if(i<=0) {
i++;
this["but"+i].btn = infoObject.name;
this["but"+i].onRollOver = function() {
trace("this button : "+this._name);
};
this["but"+i].onRelease = function() {
//i = butMaxNumber-1;
trace("Deleting button : "+this._name);
this.removeMovieClip();
};
break;
//i++;
}

}
}
trace("---------");

Can't Remove Attached Mc
Hi guys i wonder if someone can tell me where i am going wrong.

I Have an mc in the libary, linkage is "del"
Here is the code i use to attach to the movie

ActionScript Code:
delbt.onPress = function () {
    if (typeof(_root.del) == undefined) {
        _root.attachMovie ("dele", "del", _root.getNextHighestDepth ());
        _root['del']._x = 100;
        _root['del']._y = 100;
        _root['del'].deleText.text = "Are you sure you want to delete this news story, newsID:" + newsID + "?";
        _root['del'].newsID = newsID;
    } else {
        _root['del']._x = 100;
        _root['del']._y = 100;
        _root['del'].deleText.text = "Are you sure you want to delete this news story, newsID:" + newsID + "?";
        _root['del'].newsID = newsID;
    }
};
This works fine to a point.
in the "del" mc i have a button to remove "del" mc if no longer required.

ActionScript Code:
on (release) {
    unloadMovie(_root.del)
}
I discovered that this only remove the content and not the mc that holds it "del"
So i tried

ActionScript Code:
on (release) {
    _root.del.removeMovieClip ();
}
But this does nothing.

Anyone.

thanks
Paul

Dragging Attached MC's?
I want the user to be able to click on an MC which will cause another MC to be attached and then I want the user to be able to drag that MC around without dragging the MC it was attached to...is this possible?
Here's my code...




Code:
OriginPositive_mc.onRelease = function() {
this.attachMovie ("ParticlePositive", "ParticlePositive_mc", this.getNextHighestDepth())
}
ParticlePositive_mc.onPress = function() {
this.startDrag(false, 0, 0, 650, 368)
}
ParticlePositive_mc.onRelease = function() {
this.stopDrag()
}

Preloading Attached Swf?
Help?

I've looked at other examples of preloaders, but I'm having a problem with loading a swf into empty movieclip with a progress bar.

Here's what I'm doing:

Main flash file ------------

I've a empty movie clip called "host" and a button which loads the swf file into "host" on just one frame.

on (release) {
host.loadMovie("squareMC.swf");
host._x = 0;
host._y = 0;
}

In the loaded movieclip (squareMC.swf) I have 3 frames.
The first frame has a component (JXL movie preloader lite).
It has this code in it:

onClipEvent(load){
this.stop();
_parent._parent.stop();
}

onClipEvent(enterFrame){

this.amount = Math.round((_parent._parent.getBytesLoaded() / _parent._parent.getBytesTotal() * 100));
_parent.preload_txt = this.amount + "%";
this.gotoAndStop(amount);

if(this.amount == 100){
_parent._parent.play();
_parent.gotoAndStop("done");
}
}

It works when loading this swf but doesn't work with this
swf file is loading into a movieclip..

Is it a problem with scope? Is the code not finding the swf?


Please help?

Thanks

I'll attach a zip file.

Variable In Attached Mc?
To make sure to problem wasn't somewhere else I took a blank document and tried the following:

on my main timeline first frame:

Code:


Code:
refmc = _root.attachMovie("found", "found_mc", 1); trace(_root.found_mc.toestand);
trace (_root[found_mc[toestand]]);
trace (_root.found_mc["toestand"]);
trace (_root["found_mc"][toestand]);
trace (refmc.toestand);
trace (refmc[toestand]);
trace(refmc["toestand"]);


and in my library a mc called 'found', linkage 'found'....

and on frame 5 of the mc that's gonna be attached:

Code:


Code:
var toestand:Boolean = true;
stop();


Result:

movieclip is attached, but traces x times 'undefined'.... ??? what am I doing wrong?

How To Stop Mc In Attached Mc
In my presentation I attach a movie thus:

ActionScript Code:
// attach history section
_root.attachMovie("old_Film", "film", 150);

"film" has a soundObj called VSound and a movieClip animation playing in it with instance name "effects_mc"

On the main time line I have a pause / play button in a movie clip. I can successfully target the audio in the movieClip "film" and stop it from playing. however, I can't seem to target a movieClip inside the attached movie and stop it using the movieClip.stop() command.


ActionScript Code:
on (release) {
    myMusicPosition = _root.film.VSound.position/1000;
    _root.film.VSound.stop();
    _root.film.effects_mc.stop();   
}

Is this the wrong syntax? How do you stop the mc playing inside the attached mc?

Attached MovieClip
I have an issue with ActionScript and linking it back to a movieclip. I hope you guys can help.

I bring a movieclip in from the library as follows:

on (release) {
if (_root.HaloMouseD == 2) {
HM += 1;
HaloM = attachMovie("HaloM", "HaloM"+HM, HM++);
HaloM._x = _xmouse;
HaloM._y = _ymouse;
}
}

So, it "spawns" fine, and the movie clip goes to where the mouse is located when is pressed. The issue, however, is having it hit another object on a hitTest. I have an "Orb" with the following code:

onClipEvent (enterFrame) {
if (this.hitTest(HaloM)) {
unloadMovie(this);
}
}

Is there anything wrong with the above code? It doesn't work at all, and I have no clue why. The orb is just sitting on the stage so far, but it will also be "spawned" by attachMovie, so basically what I'm asking is how do you add ActionScript to a movieClip that had been taken from the library by attachMovie?

Thanks!

Inserting An Attached MC Into Another MC
got a little problem - maybe one of you guys can help...

This is a bit of code from Lee brimelow Carousel turtorial. What I'm looking to do is put this carousel inside another movieclip so I may then tween it upon a release function. Anyone have any suggestful tips that will lead me in the right direction?

-codejunky-









Attach Code

var home:MovieClip = this;
var xml:XML = new XML();

xml.ignoreWhite = true;

xml.onLoad = function () {
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;

for(var i=0;i<numOfItems;i++){
var t = home.attachMovie("item","item"+i,i+1);
t._alpha = 55;
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.icon_mc.inner_mc.loadMovie(nodes[i].attributes.image);
t.onRollOver = over;
t.onRollOut = out;
t.onRelease = released;
}
}
xml.load("Pics/Nav/icons.xml")

Find All M.c. That Are Attached To Another Mc.
I have an mc1.
Lots of other mc's are attached to mc1.

At the moment I am storing the attached mc's in an array, but is there a way just to get the names of all clips attached to a another movie clip?.

thanks to any responders. J

Help Me Out With My AS (i Attached My Code :) )
I have applied this code to all of my my bottons (by the way i have 5)...


ActionScript Code:
onClipEvent (enterFrame) {    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {        this.nextFrame();    } else {        this.prevFrame();    }}


The thing is I want to make it so when I click a button (with the above code attached), the button stays at the last frame.

Also, can someone give me an example where an if then statment says something like, if MovieClip1 is on its frame1, MovieClip2 goes to its frame2. Thanks.

MX Question FLA Attached Plz S.o.s
please take a look at this fla file and tell me what is wrong with it that after it loads in the main.swf animation won't play
the AS I have in the frame to load external.swf is image.loadMovie("test.swf"); but it won't play I tried to add _root.image...;_level..etc, still animation won't play in the main movie.
thank you guys

Mp3 Files Attached :)
http://gomidesign.com/mp3/player.fla
http://gomidesign.com/mp3/track1.swf
http://gomidesign.com/mp3/track2.swf
http://gomidesign.com/mp3/track3.swf
http://gomidesign.com/mp3/track4.swf

need your help guys..and girls...

i've downloaded sumones mp3 player and configured it a bit from flashkit...

1. i have a main movie that loads the mp3 player into a container

2. that container references swf files that contain the mp3s...that's how they play..

3. what i would like done is to add a preloader to the mp3 player that loads the first 10-20 percent of each mp3 then it plays whatever has been loaded so far...but i dont know how to tell it to read the preloader then load the mp3....it's a lil tricky and confusing to me...

4. if anyone can help i would greatly appreciate it..

5. please dont send me to kenny bellew ....been there and i still dont know .lol...

6. help is needed ASAP....(client needs this done)...thanks

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