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




Trouble With Loading A Movie Clip



Hi Everybody!

I need to load a movie clip into my projector. I'm using this code:

on (release) {
loadMovieNum("newmovieclip.swf",1);
}

The thing is that it loads in the front and the main movie clip remains in the back, but I can still execute the buttons located in the hidden movie clip. I mean, I can't see it, but I hit the button.

What's wrong? What can I do?

Thanks!




View Complete Forum Thread with Replies

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

Trouble Loading An External XML Gallery Into A Movie Clip
I am buidling a website in which i am importing external movie clips (swfs) using actions script 2.0
all of my imported movie clips so far work fine, but when it comes to import the xml gallery the who website goes in a loop. here is the script i am using to load the external movie clips.
/////////

this.createEmptyMovieClip("container");
container.loadMovie("xmlgallery.swf");
stop();

////////

is very basic but it works for what i am doing. the question is HOW DO I LOAD THE XML GALLERY if this basic script doesn't work for it is there another way to do it?

I appreciate the help THANKS!

Trouble Getting Movie Clip Name
I am duplicating a movieclip with a drag function inside of it.

I need to be able to figure out what mc I have just clicked on so I can modify that mc. I have tried to figure out the name of the mc and set a variable but I can't figure how to do it properly.

My first mc is called dragText_mc

My second is text2 created like so:

addT.fadeB.onPress = function() {
if ( twoTextFields == false ) {
DuplicateMovieClip("dragText_mc", "text2", 0);
text2._x = _root.pic._x;
text2._y = _root.pic._y - 17;
twoTextFields = true;

}
}


Below is 1 of many different ways I have tried to figure out if that mc is being used.

if (text2.onPress){
trace("You pressed on MC 2");
}

if anyone could help me it would be greatly appreciated!

Chris

Movie Clip Trouble
Hi,

I am trying to create a 'slide in bar where during the clip, a box will slide in to the movie and say something...no problems yet. I made that in a movie clip, and called it slideinbar, then I made a button in that movie clip that I want to link to another frame in scene 1.

I put actions on the button

something like,
on release go to frame 23 (i did it in basic actionscripting, so it lays it out properly of coarse) but all that happens is that the slidein window just goes to frame 23 in that movie clip. so then I told it to go to frame 23 of scene 1, still nothing. Is there anyway that I can get it to go to that frame in scene 1.

Movie Clip Trouble
Hi,

I am trying to create a 'slide in bar where during the clip, a box will slide in to the movie and say something...no problems yet. I made that in a movie clip, and called it slideinbar, then I made a button in that movie clip that I want to link to another frame in scene 1.

I put actions on the button

something like,
on release go to frame 23 (i did it in basic actionscripting, so it lays it out properly of coarse) but all that happens is that the slidein window just goes to frame 23 in that movie clip. so then I told it to go to frame 23 of scene 1, still nothing. Is there anyway that I can get it to go to that frame in scene 1.

Movie Clip Trouble
i have an attached movie clip and a external movie loading in on a button press, but the attached movie clip always appears above the externally loaded one no matter what i try, any ideas.

i'm about to cry.

Movie Clip Trouble...
Ok...so I am not too new to flash, and I am trying to put together a portfolio website because I am a graphic designer. At first to navigate through images in the portfolio I had hidden arrows but then I realized that people need to be informed that the arrows exist. So I added a movie clip underneath each hidden arrow of an arrow fading in and out twice. Well when I test the scene it works fine on the first image, but any subsequent image after the movie clips don't work. I have a stop on each frame and I'm not sure if thats the issue, or what the issue is. I can email my flash file if someone out there could please help me figure out my issue!

Thank you so much!

Movie Clip Trouble, Someone Please Help
Okay. So here's the problem.

I have a movie clip with 10 frames in it. But when I put it in my canvas and test the movie, I can only see the last frame. That's it. Just the last frame.

I tried setting it to Graphic Loop, and I see every frame in the time line appear correctly, but it still only shows up as the last frame.

Is there any reason why it would do this?

Trouble With Duplicate Movie Clip
Can I duplicate movie on to second level movie
like this:

I have movie "two" in movie "one"

duplicateMovieClip
(_root.one.two, "_root.one.two2" , (i+111));
setProperty("_root.one.two2", _x, 40);
setProperty("_root.one.two2", _y, 80);

this doesn't work to me

any sugestion please

Tnx
Cash

Having Trouble With Duplicate Movie Clip
for some reason when I am doing this mouse trailer there is one straggler that jus gets left behind and sits in one place.(flash5)Here is my code
frame1

Code:
startDrag (_root.drg, true);
frame2

Code:
CopyCount = CopyCount+1;
duplicateMovieClip (_root.drg, drg+CopyCount, CopyCount);
frame3

Code:
if (CopyCount > 60) {
CopyCount = 1;
}
gotoAndPlay (2);
a sample is here http://www.angelfire.com/fl3/binarys...straggler.html

the source fla is here
http://www.angelfire.com/fl3/binarys...s/greendrg.flajust right click and save as for the fla file

Having Trouble Stopping Movie Clip
I made movieclip inside a the main movie. I finally learned how to make a button open the movie clip but I cannot figure out how to make the button close it. I've tried several actions none seem to be right. Any help would be greatly appreciated!! Thanx W.Thompson

Movie Clip Button Trouble
Need to access a Named Frame in a movie clip that has a movie clip inside it from a button named "btn1"


I can get my button to access the external "work.swf" using
on (release) {
loadMovieNum("work.swf", 1);
}

However I need it to load frame 2 of "work.swf". I name Frame 2 "halsub1". So I tried
on (release) {
loadMovieNum("halsub", 1);
}

I know this is not rigght could someone tell me how to properly do this

Movie Clip Target Trouble
I'm having trouble getting from a movie clip with the instance name "mcpaint" back to a certain frame on the main timeline...

I tried attaching this action to a button on the last frame of the movie clip...
on (press, release, rollOver, rollOut) {
_root.mcpaint._gotoAndPlay(2);
}


I also tried this code on the last frame of the "mcpaint" movieclip
_root.mcpaint._gotoAndPlay(2);

am i supposed to be using the "with" tag?

i also tried this code:

with (_level0.gotoandstop(2)) {
}

I've been playing around with this for hours w/ no luck....any help would be appreciated...thanks

Trouble With Movie Clip (Flash 4)
Scenario: I have a movie clip I am inserting into my main movie. Now, in my movie clip, I have an action script that I want to GoTo frames of the timeline within the movie clip and not affect the frames in the actual main movie.

Whats happening is that my movie clip script is affecting the frames of actual main movie and not staying within my movie clip.

How can I keep my movie clip action script to only affect timeline within movie clip?

Thanks!

Duplicating Movie Clip Trouble
code:
mcname.DuplicateMovieClip("mc2", _x = 434);


Every time I use that script to duplicate a movie clip, it keeps doing it more than once. Also, The original MC also goes to the property which I had set for the copy, IE (_x = 434) in this example. What am I doing wrong?
Thanks.

Trouble With Buttons In Movie Clip
I have a movie clip with a button that says T for true in the up state and a second button on frame 2 of the movie clip with the T in a down state.

Likewise I also have a movie clip for false setup the same way.

The intended action is when a user comes to the screen and clicks the true button, the movie clip moves to frame 2 and shows true as being selected. To not have both true and false selected, I need to change the location in the false movie.

I have this on the root frame action. Problem is it only works for once and that is it.

review1t_mc.trueUp_btn.onRelease = function() {
_root.review1t_mc.gotoAndStop(2);
_root.review1f_mc.gotoAndStop(1);

};
review1f_mc.falseUp_btn.onRelease = function() {
_root.review1t_mc.gotoAndStop(1);
_root.review1f_mc.gotoAndStop(2);

};

Thanks in advance.

Movie Clip Placement Trouble
http://www.staticair.com/drawer-xml.html

basicly you can open this "window" wider to dynamicly place the icons
but the propblem as you can see, is when you resize the "window" quicky the icons get misplaced.

here is the script used to populate the icons and space them.


Code:
onClipEvent(load){
amount = 50;
yspace = 10;
xspace = 70;
cou = 0;
//GET AND PLACE ICONS-----------------------
function buildartlist(){
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function(success) {
if (success) {
menuItem = this.firstChild.childNodes;
for (var i = 0; i<menuItem.length; i++) {
item = lister.holder.attachMovie("itemClip", "itemClip"+i, i);
item._x = xspace*cou;
item._y = yspace;
item.icontext.text = menuItem[i].attributes.name
item.itemtext = menuItem[i].attributes.name+".txt"
item.imagename = menuItem[i].attributes.name
item.image = menuItem[i].attributes.fullimage;
item.myIcon = menuItem[i].attributes.iconer;
_root.listnum = menuItem.length
_root.totallistnum = i+1
if (cou<=across) {
cou = cou+1;
if (cou == across) {
cou = 0;
yspace = yspace+75;
}
}
}
}
};
menuXml.load("PRIVATEXML");
}
}


onClipEvent (enterFrame) {
//PLACE CLIP AT EDGE-------------------------
_x=-_parent._x

//SET THUMB #-------------------------------------
across = Math.floor(_parent._x/65);

//RUN SCRIPT--------------------------------------
if (currentnumber != across) {
amount = 50;
yspace = 0;
xspace = 60;
cou = 0;
currentnumber = 0;
buildartlist();
currentnumber = across;
trace(currentnumber+" / "+across)
}}


thanks for any help

if you want to see the fla just et me know ill post it.

Having Trouble Controlling Movie Clip
Hello,
I am trying to control a movie clip by buttons on the left side. Each from of the movie clip is the corresponding "page" to a button. However, if you try to use the buttons, they do not always go directly to their intended destination. I am using the gotoAndPlay() method, but it doesn't seem to work.
you can view this at www.barryross.com/index_clip.swf
any help would be great, thank you...let me know what actionscript you need.
rossbar@interchange.ubc.ca

Nested Movie Clip Trouble
I have created a menu bar ( movie clip ) that when rolled over, moves down using the tweening class. Within this movie clip is another movie clip which acts as a button that must have roll over and clicked state awareness. The problem is that the button within the menu bar is not recognising that it is being rolled over or clicked. The menu bar is catching all the roll over and clicked states.

I need to be able to move the menu within the code while still being able to use the buttons within.

I thought about removing the code of the menu bar and replacing it with an outside listener, removing all state change listeners from the menu object.

Would this fix my problem? If not, what can?

Movie Clip Trouble With .ai File
I am fairly new to flash, however I do know my way around pretty well. I live traced a drawing and imported it into a movie clip to manipulate. As soon as I apply a shape tween to the timeline, the image gets distorted. Could my graphic be too complex? In the help section of Flash, it said that it could only import .ai files from Illustrator 10 and earlier. This did nothing when I resaved to version 10. Any help would be much appreciated. Thanks in advance.

Movie Clip Button Trouble
I have a Movie clip on the main stage called CV_mc. In the CV_mc movie clip I have a movie clip button called next_mc.

When I click the next_mc button I want to go to a frame labelled _pageTwo in the CV_mc timeline.

I have added this AS code to a layer in the CV_mc timeline at the same time as when the buttons appear.

next_mc.onRelease = function()
{
this.gotoAndStop("_pageTwo");
}

This wont work yet this will

next_mc.onRelease = function()
{
_root.CV_mc.gotoAndStop("_pageTwo");
}

Thanks in advance

Having Trouble Opening A .swf In A Movie Clip
Okay, so I have been searching around quite a bit to get this figured out.

I have my main .swf file which is pretty much my entire site and I want to open a few other galleries separately to quicken up the loading time. So I created the galleries I want to open as their own .swf files. when I use the loadmovie command it will open the gallery but nothing from the original main .swf file is there, so none of the navigation buttons or borders are there so I can't go from gallery to gallery.

I am trying to explain the best I can, if anyone can help me I would appreciate it a lot.

Draggable Movie Clip Trouble
Hi there
I createEmptyMovie clip 10 times. 1 of 2swf's are loaded randomly into the empty mc's. In those swf's is a button that when pressed makes the mc rotate and drag. The problem is that when you press the button, a mc you've already clicked on starts spinning again instead of dragging the new clip. I should be making the empty movie clip draggable instead of the swf. The abreviated AS for the button in the swf is this:

ActionScript Code:
out_btn.onPress = function() out_btn.onPress = function() {    hog.startDrag();    r = 0    gotoAndPlay('rotateStart');}out_btn.onRelease = function() {    hog.stopDrag(true,0,700,200,400);    }

I've tried a bunch of things-
1. changing it to parent.startDrag
2. the instance name of the empty movie clip - hedgehog10_mc.startDrag
3. putting it in the main timeline - but I'm not confident about writing that path..do I talk to it by level?
Here is a link so you can see the problem
hedgehog7.html
Here are the fla's
hedgehogs
There is so much more I need to do....this is just the tip of the iceburg. The next hurdle will be to trace how many of each of the two randomly loaded swf's are present and how many of each have been dragged and how many have not. Yikes!

Any help would be great!
Thank you thank you thank you - in advance

Trouble Targetting Movie Clip
Hi all,

I'm trying to put together a fairly simple animation. At the moment I've got an animation happening on the main timeline. When the playhead reaches a certain frame, a movie clip symbol gradually fades in from transparent to full opacity. On this movie clip is another animation but it's timeline is set to stop on the first frame. On the last frame of the main timeline I'm trying to target this movie clip to get it to play. I've put the following code on the last frame:

this.newanimation_mc.play();

... so that it will target this movie clip and play. But when I test I get the following error:

**Error** Scene=Scene 1, layer=plane movie clip, frame=30:Line 1: Statement must appear within on/onClipEvent handler
this.newanimation_mc.play();

Total ActionScript Errors: 1 Reported Errors: 1

Can anyone tell me why this might be happening?

Thanks for any help offered.

Having Trouble Dragging A Movie Clip
I was doing the equilibrium tutorial, in special effects, and I could not make the movie clip object draggable, I added this code to the movie clip--


on(press){
startDrag(this);
}
on(release){
stopDrag();
}

But whenever I previewed it I got this output--

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 2: on handlers may not nest within other on handlers
on (press) {

What code should I put in to make something draggable?

Thanks for the Help

¦wyatt¦

Draggable Movie Clip Trouble
Hi there
I createEmptyMovie clip 10 times. 1 of 2swf's are loaded randomly into the empty mc's. In those swf's is a button that when pressed makes the mc rotate and drag. The problem is that when you press the button, a mc you've already clicked on starts spinning again instead of dragging the new clip. I should be making the empty movie clip draggable instead of the swf. The abreviated AS for the button in the swf is this:

ActionScript Code:
out_btn.onPress = function() out_btn.onPress = function() {    hog.startDrag();    r = 0    gotoAndPlay('rotateStart');}out_btn.onRelease = function() {    hog.stopDrag(true,0,700,200,400);    }

I've tried a bunch of things-
1. changing it to parent.startDrag
2. the instance name of the empty movie clip - hedgehog10_mc.startDrag
3. putting it in the main timeline - but I'm not confident about writing that path..do I talk to it by level?
Here is a link so you can see the problem
hedgehog7.html
Here are the fla's
hedgehogs
There is so much more I need to do....this is just the tip of the iceburg. The next hurdle will be to trace how many of each of the two randomly loaded swf's are present and how many of each have been dragged and how many have not. Yikes!

Any help would be great!
Thank you thank you thank you - in advance

Having Trouble Getting My Rolloverbuttons To Play A Movie Clip
I created a flash movie thats supposed to play a movieclip after you roll over the button, but I keep getting an error message in the output when I play the .SWF file.If anyone could help fix this problem so it will play the movieclip when the mouse rollsover the button.

(I am still sort of a newbe a Flash)

"also the attachment says using layers in it but it has nothing to do with what its about i was just being lazy and forgot to rename it."

:confused:

Trouble Setting Colour Of Movie Clip?
Hi.

I use the following function in frame 1 to set the colour of a movie clip(s):


Code:
function clue()
{
for (i=1; i<=rana; i++)
{
trace("_root."+i+ranb);
myColor = new Color("_root."+i+ranb);
myColor.setRGB(0x0000ff);
}
}
I've had it working before, but for some reason it's stopped?? My movies are instantiated correctly according to the trace I do here.
I can send the FLA if it helps.

Thanks.

Movie Clip Location Trip Trouble
Hello All,

I'm working on a project where each menu button scrolls a movie clip onto the stage. I want each movie clip to be in position before playing and resetting when off stage. How can I accomplish this?

[F8] Trouble Masking Empty Movie Clip
I hope to get some help with this as this is driving me crazy!!

I am creating an image scroll gallery similar to the following:

http://www.oman3d.com/tutorials/flash/imagegallery/

I have the thumbnail images in place and I can get it to scroll properly, but I want the edges to be rounded. Basically, I just want a rounded rectangle to mask this whole thing. I created a rounded rectangle, converted it to a movie clip and exported it with an instance name of "Mask." When I play the movie you can see the whole stage regardless (the mask is being completely ignored). Can anyone explain to me how to mask the container of an empty movie clip??


The following is my action script:

this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 9;
var scrolling:Boolean = true;

for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i) ;
myThumb_mc = container["thumb"+i+"_mc"];
myThumb_mc._x = (i-1)*myThumb_mc._width;
myThumb_mc._y = (Stage.height-myThumb_mc._height)/2;
myThumb_mc._alpha = 50;
myThumb_mc.setMask(Mask);
myThumb_mc.onRollOver = function() {
this._alpha = 100;
};
myThumb_mc.onRollOut = function() {
this._alpha = 50;
};
}

container.onEnterFrame = function() {
if (scrolling){
this._x += Math.cos((-_root._xmouse/250)*Math.PI)*15;
if (this._x>10) {
this._x = 10;
}
if (-this._x>(this._width-250)) {
this._x = -(this._width-250);
}
}
};


Thanks in advance for all of your responses.

Movie Clip Trouble Registering Wron
Hi. I have a movie clip I'm incrementing. Then if the movie clip goes past a certain coordinate it registers strike + 1 on a variable I have set up. The problem is that the movie clip sometimes increments it by two or three depending on how slow the movie clip is moving.

ActionScript Code:
onClipEvent (enterFrame) {
    _x -= _root.speed;
    if (_x<=68.0) {
        _root.strike += 1
    }
}

How can I make it to where no matter what it only increments the strike variable by one. If the movie clip is moving extremely fast this does not seem to be a problem as much.
Hope this makes sense.

Trouble With A Movie Clip Inside A Button
Hello,

I have a button that has movieclip inside of it that shows 2 sub categories. I need it so that when you click on one of the categories it goes to a frame that is on the main stage. However I cant seem to get it to do anything outside of the button. I've tried making 2 invisible buttons over the movieclip where the 2 categories are but I still cant get it to go to a different frame on the main stage.

Any suggestions?

Thanks-

Having Trouble With General Movie Clip Position
Hi all. I am squeeky new to action script and I am trying to accomplish something like this example I found:
for (var j = 0; j<10; j++) {
_root["duplicate"+j]._xscale = 50;
}



This is my code:
//move picker
for (var j = 0;j < myPicks; j++){
myRack = ("rack" + j);
rackColor = new Color(myRack); //works
if(rackColor.getRGB().toString(16)== "ffff00"){
//move to rack
trace(myRack); //works
trace(rack1._x); //works
trace(myRack._y); //doesnt work??????
var mx = _root.myRack._x;
trace(mx);
moveClip(myRack._x, myRack._y); //doesnt work
}
}
}

The selected lines produce undefined. I feel this should be a simple fix, hopefully. I would appreciate any help you might could offer. Thanks.

Trouble W/ Button Inside The Movie Clip
Hai all, i'm new in this flash technology , that's why i'm having a trouble with my recent project.
In my project i have 4 scenes, at 2nd scene i have a button inside a movieclip. I'm trying to make that button go to the 4th scene, the script is " on (release) { _root.gotoAndPlay ("scene 4",1)} but it seem didn't work, the result is the movie jump into the 1st scene instead of going to the 4th scene. Can anyone help me please.
I'm sorry if this kinda thread has already shows up, but hey i bet the answers are simple.
Thanks all
May the force be with you

Having Trouble Starting A Movie Clip From Rollover
I'm not completely new to actionscripting but it's definitely not one of my strong points. But anyways, I'm trying to make it so that the rollover state on my button triggers a movie clip (maybe two) on another part of the page. How difficult is this and could someone help me with the coding?

Loading External Movie Clip With A Button Inside Another Movie Clip Help
Hi,

I am working on a scrolling thumbnail movie clip, that when you click on the thumbnail button inside the movie clip it will load an external movie clip. I have an empty movie clip on the main stage, and have been trying all sorts of code, but for some reason it doesn't like that I am inside a movie clip using buttons. It can't seem to find the external swf.

I have tried:

on (release) {
loadMovie (ithink.swf, "loader");

and

on (release) }
if (firstTime == true) {
loadMovie("ithink.swf", _root.loader);
firstTime = false;
} else {
_root.clicked = "ithink.swf";
_root.loader.gotoAndPlay("goback");
}
}

and so far nothing, for some reaosn when I click on a button outside of the movie clip with the above code it loads... and than the other works too, but if I click on the buttons inside the scolling movie clip first they won't work.

Any suggests or ideas!!?

I would really appreciate it... I am beyond frusterated!!

New To Flash Im Having Trouble W Pasting Movie Clip To Button
every time I try to drag and drop my movie clip from the library into the over state of my button, an alert comes up saying that I cannot paste a symbol inside symbol. Please help if you can!
Shells

[F8] Having Trouble With Dynbamic Text Inside A Movie Clip
hello all - i have a main stage where on the first frame my "home" movie clip displays. i did this by dragging/dropping, and then i put a stop action. all works fine.

inside this home movie clip on the main stage, there are links to other movie clips. for example, to get to my faq's page - you click that button, then it takes you to frame 4 on my main stage, where my faq's movie clip (followed by stop action) has been dragged/dropped and displays properly.

within the faq's movie clip this process is repeated, with buttons taking to you various pages (different frames where different movie clips play - all works fine).

so now i want to add a dynamic text field within my faq's movie clip. i have read numerous tutorials where i have created the text file but i have not been able to display it with success within my faqs movie clip.

here is some code that my dvd tutorial instructs me to place on main stage as i practice getting this to work:

var myMCL:MovieClipLoader = new MovieClipLoader ();
var myListener:Object = new Object();

myMCL.addListener(myListener);


var myLV:LoadVars = new LoadVars();

myLV.onLoad = function (success:Boolean) {
if (success) {
_level5.loadedInfo.htmlText = myLV.info;
} else {
_level5.loadedInfo.text = "There has been an error loading the requested information. Please contact the webmaster.";
}
}

and here is some code that i place on the faqs button within my main movie clip that takes me back to main stage and plays faq movie clip all successfully:

on (release) {

//Movieclip GotoAndPlay Behavior
_root.gotoAndPlay("4");
//End Behavior

}

and finally, here is some code that i place within my faqs movie clip in an attempt to display my dynamic text within the faqs movie clip - so far unsuccessful:

_level0.myLV.load("vars/faqs.txt");

NOTE:
i have published this to view - not working.
i have my faqs text file starting as info=
i have eliminated white space within my text file
i am using flash 8 pro

can anyone offer some sugestions? thanks!

[CS3] Trouble With Flash Movie Clip Links In Dreamweaver
Hi,

I have a dreamweaver website and on here i have a links page which i have made an animation, in flash. I have then saved the *.SWF in my website folder and embedded it into my links page within dreamweaver.

On my dreamweaver page, i use 2 frames, a top nested frame, then my main frame. The links in the flash animation dont open in a new page and only open in the mainframe of my website leaving the top nested frame looking very ugly against another website.

The Actionscript code i have behind each link, in flash seems right.

on (release){
getURL("http://www.mysite.com", "_blank");
}

Any ideas guys?

Thanks Alot

- Ryan

Trouble Making Buttons Work In Movie Clip
I have a menu movie clip with some buttons animated in it. The buttons within the Menu movie clip have instance names and are of the type "Movie Clip" (not of type "Button"). The movie clip is linked to myMenu.as. Within myMenu.as, I am attempting to use addEventListener to make the buttons functional. But it is not working. What am I missing??

On the stage:var myMenu_mc:myMenu = new myMenu();
addChild(myMenu_mc);
myMenu_mc.x = 0;
myMenu_mc.y = 0;within myMenu.as:

package {

import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.text.TextField;

public class myMenu extends MovieClip {

public function myMenu() {
trace("menu has appeared.");
instructions_btn.addEventListener(MouseEvent.CLICK , instructionsPress);
instructions_btn.buttonMode = true;

}

public function instructionsPress(e:Event) {
trace("Instructions pressed");
}
}
}

Trouble Controlling Root Timeline From Movie Clip
This is probably simple, but I'm new to AS3 and am stumped!

I'm trying to control the root timeline from a movie clip. On the last frame of the movie clip, I have:

MovieClip(root).gotoAndPlay (10);

which successfully brings me back to frame 10 on the main timeline. However, from here, none of the ActionScript that is on Frame 1 seems to work... the rollovers aren't working, except on those embedded in a separate movie clip.

Any suggestions?

Make A Layer On Main Timeline A Movie Clip? Having Trouble
When I highlight a layer on the main time line that has a tween, etc and hit F8, I have a choice to make it a movie clip, button, graphic. When I choose Movie Clip, it does create it, but when I view the movie clip there is only one frame? Where did my tweening go?

How can I do this?

Thanks,
Andrea

Flash 8 -- Trouble With Getting Button To Control Parent Movie Clip
I am making an e-learning where i have a shell file that holds a movie clip that loads in the lesson pages as they are called from a separate actionscript file. in the actionscript file, i have a global variable adds or subtracts, and then functions which place the lesson pages in the shell, etc. at the end of one of the lesson pages, i have a movie clip button that i need to remove itself and advance the user to the next page in the lesson.

my question is, how do i get the button on one lesson page to unload that lesson page from the shell movie clip, and then advance the user to the next part of the lesson?

Flash Beginers: Loading A Movie Clip Into Another Movie Clip
I just need a simple way to load a movie clip into another holder movie clip based on a mouse event. PLEASE HELP, i know it's easier than it must seem.

Trouble Loading A Movie And Html
All of this is on two different computers at home, I am not dealing with a server at all yet.

I have named everything in small caps (i.e., movieloader.swf,...home.swf,contact.swf,work.swf)

I have the loadMovie() method loading these other movies into vaious MCs in my movieLoader.swf

They work fine when I just look at the swf, but when I load the swf into a web page, it doesn't work.

I have tried keeping them all on the same level.
I have tried moving them into a swf folder without change the code in the movie.
I have tried changing the code in the MC to home.loadMovie("swf/home.swf) and it still doesn't work.

Any working ideas would be appreciated. Thanks

Having Trouble Loading Up Flash Movie...
Hey guys... i'm having trouble loading up this flash movie/webpage that i've made.

The issue i think has to do with preloading (which i don't understand... although I did make a preloader... already attached to the beginning of my flash file).

I've attached the necessary files to run this... the problem is.. sometimes when i run this through Flash MX it works and runs fine in test... and then sometimes when on a server it works.. and other times it doesn't.

The rollovers fail to load and work... and sometimes the animation in the middle just doesn't load. (It seems liek these things happen at random moments).

I'd appreciate anybody's help!

Thanks in advance!

Loading Movie Onto Level Trouble
I have a button that is a few levels down in movie clips. When It is pressed, it is supposed to load diamonds.swf. It does this, but not on the first press. On the first press the _root time line goes to and plays "fade," but doesn't execute the rest of the script.
Am I missing some code that should be here?


on (press) {
trace (_root._currentframe);
if (_root._currentframe == 26) {
_root.gotoAndPlay("fade");
_root.menu.gotoAndPlay("close");
}

unloadMovieNum(12);
loadMovieNum("diamonds.swf", 12);

}

Loading Movie Onto Level Trouble
I have a button that is a few levels down in movie clips. When It is pressed, it is supposed to load diamonds.swf. It does this, but not on the first press. On the first press the _root time line goes to and plays "fade," but doesn't execute the rest of the script.
Am I missing some code that should be here?


on (press) {
trace (_root._currentframe);
if (_root._currentframe == 26) {
_root.gotoAndPlay("fade");
_root.menu.gotoAndPlay("close");
}

unloadMovieNum(12);
loadMovieNum("diamonds.swf", 12);

}

Trouble Loading External Movie
ok...i hope the name of the topic is right...and i hope i posted this in the correct section but i made a movie using easing...its the outline of a square and i have the height and width both set to 1...first i have it falling and bouncing onto the stage...and then it expands and then it closes and jumps back off the stage...here is the actual animation: http://tccn.centraldown.com/box.html

and here is the code:

First Frame:


Code:

stop();
start_btn.onRelease = function() {
drop(mx.transitions.easing.Bounce.easeOut);
}
function drop(easeType) {
mc = square;
begin = -8.5;
end = 199.5;
time = 20
dropTween = new mx.transitions.Tween(mc,"_y",easeType,begin,end,time,false);
dropTween.onMotionFinished = function() {
expand(mx.transitions.easing.Bounce.easeOut);
}
function expand(easeType) {
mc = square;
begin = 1;
end = 429.8;
time = 20;
expandTween = new mx.transitions.Tween(mc,"_width",easeType,begin,end,time,false);
expandTween.onMotionFinished = function() {
expandAgain(mx.transitions.easing.Bounce.easeOut);
_root.gotoAndStop(2);
}
function expandAgain(easeType) {
mc = square
begin = 0
end = 213.9
time = 20
expandAgainTween = new mx.transitions.Tween(mc,"_height",easeType,begin,end,time,false);
}
}
}
Second Frame:


Code:

stop();
close_btn.onRelease = function() {
closeExpand(mx.transitions.easing.Bounce.easeOut);
}
function closeExpand(easeType) {
mc = square;
begin = 429.8;
end = 1;
time = 20;
closeExpandTween = new mx.transitions.Tween(mc,"_width",easeType,begin,end,time,false);
closeExpandTween.onMotionFinished = function() {
closeExpandAgain(mx.transitions.easing.Bounce.easeOut);
_root.gotoAndStop(1);
}
function closeExpandAgain(easeType) {
mc = square
begin = 213.9
end = 1
time = 20
closeExpandAgainTween = new mx.transitions.Tween(mc,"_height",easeType,begin,end,time,false);
closeExpandAgainTween.onMotionFinished = function() {
jump(mx.transitions.easing.Bounce.easeIn);
}
function jump(easeType) {
mc = square;
begin = 199.5;
end = -8.5
time = 20
jumpTween = new mx.transitions.Tween(mc,"_y",easeType,begin,end,time,false);
}
}
}
now...i tried making this into a imageViewer...by creating two functions (openBox(pic); and closeBox();)
now i have a box on the stage w/ the instance name box_mc...and an empty mc on the stage w/ the instance name container_mc..i also have a few buttons on the stage..in the openBox(pic); function, i load a movie into container_mc and set its alpha to 0 so that u can't see it right away...and when it loads...i start all the easing to make form the box...and i set all the properties to fit the size and position of whatever the container_mc's size and position is...but it just doesn't seem to work...here is the code i have so far(i only have code for the openBox(pic); function at this moment:


Code:

function openBox(pic) {
with(container_mc) {
loadMovie(pic);
_alpha = 0;
_height = pic._height;
_width = pic._width;
_x = (_root._width/2)-(container_mc._width/2);
_y = (_root._height/2)-(container_mc._height/2);
}
drop(mx.transitions.easing.Bounce.easeOut);
function drop(easeType) {
mc = box_mc;
begin = box_mc._y;
end = container_mc._y
time = 20
dropTween = new mx.transitions.Tween(mc,"_y",easeType,begin,end,time,false);
dropTween.onMotionFinished = function() {
expandX(mx.transitions.easing.Bounce.easeOut);
}
function expandX(easeType) {
mc = box_mc
begin = box_mc._width
end = container_mc._width
time = 20
expandXTween = new mx.transitions.Tween(mc,"_width",easeType,begin,end,time,false);
expandXTween.onMotionFinished = function() {
expandY(mx.transitions.easing.Bounce.easeOut);
}
function expandY(easeType) {
mc = box_mx;
begin = box_mc._height;
end = container_mc._height;
time = 20
expandYTween = new mx.transitions.Tween(mc,"_height",easeType,begin,end,time,false);
expandYTween.onMotionFinished = function() {
showPic();
}
function showPic() {
mc = container_mc
begin = 0
end = 100
time = 20
showPicTween = new mx.transitions.Tween(mc,"_alpha",easeType,begin,end,time,false);
}
}
}
}
}
and i call on this action when you press the button on the stage w/ the instance "b1" here is the code for that:


Code:
on(release) {
openBox('picture.jpg');
}
attached to this mesage is also a .zip folder w/ the FLA the SWF and a JPEG that i have loading into the stage when you press the b1 button on the stage...so if u have any idea why this doesn't work...if you could help me...that would be GREAT!!! thanx in advance!

Loading Movie Trouble (probably Obvious)
Hi there,

I've loaded movies into each other before, but this time I'm having a bit of difficulty. To sketch what I'm working on:

main.swf -> loads nieuws.swf
nieuws.swf -> contains textfield with dynamically loaded content (actionscript)

The code in nieuws.swf is (mc_nieuws is a movieclip that resides in the library, and is loaded at runtime)
_global.nieuwsMovie = this;
nieuwsMovie.attachMovie("mc_nieuws", "mc_nieuws1", 50);
nieuwsMovie.mc_nieuws1.txt_datum.text = "test";

This works perfectly when it's not loaded into the main.swf. BUT ... When the nieuws.swf is loaded into main.swf, the text doesn't show up
(The rest of the nieuws.swf-movie does)

Anyone who might know why?
Pls help me out here.

Thanks in advance!
Kasper

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