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




Loading .swf Movie From Buttons - Help



Hey guys....im new to flash but learning fast. My friends and I decided to make a php site with a major difference. Include a floating flash layer. check it it out on www.adrena-lan.com.au/test.php

So my prob is this.
I went out and bought a flash template from templatemonster.com. The number of the template is #6618. If you do a comparison you will see how much I have changed it.

The template has 6 .swf elements. IE. main.swf, main-1.swf, main-2.swf, etc. What I want to do is create a 7th .swf element (main-7.swf) and have it load from a button within main-1.swf, where main-1.swf appears.

The actionscript that drives the main menu buttons to the existing .swf files is....

on (release) {
if (_root.pressed_link<>4) {
_level2.gotoAndPlay("dissappear");
_root.pressed_link = 4;
}
}

The number 4 represents the .swf file number as in (main-4.swf)

but when I apply it to a button within the "main-1.swf" file...no go.

So im losing heaps of sleep...

Can you assist with the actionscript needed?

Thanks.



Ultrashock Forums > Flash > Flash Newbie
Posted on: 2005-03-22


View Complete Forum Thread with Replies

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

Loading Buttons VS Buttons In The Main Movie
Hi!
I want to ask if it's faster to have the buttons in the main movie itself and these buttons loads other external SWFs into the container?
What about if the buttons themselvs are loaded SWFs?
Do these two different solutions have anything with smoothness and playback speed of the movie?

mx-guest2004

Buttons In One Movie Loading Movie Clips In Another?
I am making a paper dollish project to experiment with loading movie clips and ran into a problem. The way I have it set up the "main" animation loads and a character is displayed. There is a button that when clicked loads a "picker" movie on top of the animation that allows the user to select a clothing piece. What I want it to do is when a piece is clicked the "picker" movie is unloaded and the clothing piece is loaded on top of the figure in the "main" movie. The problem I ran into was The load movie script in the "picker" didn't recognise the place holder movie clip in the "main" movie. I imagine that I have to specify which movie to load my "clothing" movieclip into. How is this achieved or is it even possible?

Buttons Loading Different Movie Clips
i am trying to get a button, actually a row of buttons to load different movie clips when its pressed. i have created the button and attached:

on(release){
mc1._visible=1;
}

and on the movie clip that i gave an instance name of mc1 i added:

mc1._visible=0;

i know there is something i am missing. if you can help or show me something to read that would be great. i have looked through many tutorials and tried different things, but no luck yet. thx

Loading Movie For Sound Buttons
i am attempting to attach music tracks to 4 buttons. i have converted my music tracks to .swf's and have coded the buttons to load them as movies. but it is not working, i am not hearing any sound. would i need to add a play command?

the code that i used is:

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


the error messesage that i am getting is:

Error opening URL "file:///G|/foryou1.swf"


when i test my movie, i get no sound at all...

What have i done wrong?www.blusyde.com

[MX] Buttons Not Loading Movie Clip On IE
I'm new to flash and what I have is a thumbnail of an image that I would like to load a movie clip of the larger image that I have. It works when running the movie clip in Flash and running the site in Firefox, but the movie clip image does not come up in Internet Explorer.

This is the structure of my site. I have a main flash that contains the navigation bar. When you click the Home, Bios, or Contacts page I load another movie clip using the following: _root.testMovie.loadMovie("bios.swf");

Inside the bios page I have thumbnail buttons of pictures. When you click on any of these thumbnails I load the bigger movie clip of the bigger picture like so:

_root.testMovie.screen.loadMovie ("\pics_mc\Myrrha.swf");

Any help on this would be greatly appreciated.

Loading Scenes From Movie Clip Buttons
hello
this is probably very simple.
i have a button in a movieclip on one scene ion release i want this button to load the next scene. i rememeber something aboput get target but i can't really remember how to do it. thanks you for any help:confused: :confused:

[CS3] Multiple Movie Clips Loading With Buttons
So I have 10 movie clips in a flash file that i want to load one after the other using next and previous buttons.

I have play and stop buttons programed that work:
------------------------------------------------------------------------
stop();

function playMovie(event:MouseEvent):void
{
this.play();
}

function stopMovie(event:MouseEvent):void
{
this.stop();
}

playBtn.addEventListener(MouseEvent.CLICK, playMovie);
stopBtn.addEventListener(MouseEvent.CLICK, stopMovie);
------------------------------------------------------------------------

Now i need to advance the movie clips using a next button and going to previous clips using a previous button.

Do i need to create an array to do this?

Or is there another way?
such as the gotoAndPlay function?
for simplicity sake movie clips are named:
mc1
mc2
etc. up to mc10

Loading Movie Into Target From Complex Buttons
I used the code below to create an animated button. Now what I want to do is to load an external swf into a container when the user clicks the button. What code should I add (if possible) to allow the MC to do this??

And can i just create a container movie like normal? or do i have to put anything special on it?

stop();
this.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
}
};
this.onRollOver = function() {
rewind = false;
play();
};
this.onRollOut = function() {
rewind = true;
};
//i think i get rid of this? (below)
this.onRelease = function() {
_root.gotoAndStop("port1");
};

Any help would be appreciated! Thanks.

Buttons Loading And Unloading Movie Clips
I have created a page with a scrolling buttons bar of thumbnail images. I would like to have large versions of the thumbnails load on the stage when a button is active and disappear when another button is made active.

I can achieve this by loading a swf for the large image into a movie clip on the stage. But I am wondering if there is a way to do this using a movie clip for the large image so that I can have an intro and outro animation as the large clip appears and disappears from the stage.

Also, is it more efficient to be loading a large number of swfs or stick with movie clips?

Any help anyone can provide would be great.

Loading A Movie Clip Using Buttons, (really Simple For Experts)
hey everyone, i need someone to show me how u can load a movie clip when your mouse cursor goes over a button....



http://www.zekestudios.com/flash/main.html
go to this page and go over the music button... that is close to what i am trying to do...

if u can help me do that then pls answer back,

Thanks!!

Loading Buttons Into Movie Clips In Ordered Sequence?
I originally posted this in the 'Scripting & Backend' forum, but thought I'd try over here too as it's busier, and this is likely more about Actionscript than anything else anyway;

Here's a brief run down of something I need to do... I wonder if anyone has any suggestions on how best to do it. The simplified version is as follows;

I have 5 buttons labelled 1, 2, 3, 4 and 5. They are 30x30pixels and each in a seperate swf file called button1.swf, button2.swf and so on.

I need to load these buttons into a main flash file called main.swf. In this swf I've placed 5 empty movie clips with the instance names slot1, slot2, slot3, slot4 and slot5.

I can load the buttons into these slots very easily by using;


Code:
loadMovie("button1.swf", "slot1");
loadMovie("button2.swf", "slot2");
loadMovie("button3.swf", "slot3");
loadMovie("button4.swf", "slot4");
loadMovie("button5.swf", "slot5");
That of course works fine, but here's where it gets more complicated. I have php based admin tool that the client can use to choose which buttons are to be added to main.swf. So they can opt to have any or all of them appear as they like. This tool will generate a URL with the info about which buttons are to be included, sort of like this;


Code:
http://www.mysite.com/admin.php?button1=yes,button2=no,button3=yes
etc etc

Now I can probably make the Flash file read that url somehow and show only the buttons they've opted to display (haven't really sorted that out yet actually) but what I need is not only that but somehow to make it so that if they choose button1, button 3 and button 5 (for instance) that those three buttons will appear in the first three slots of main.swf

I can't have buttons 1, 3 and 5 show up in slots 1, 3 and 5... I need them in 1, 2 and 3... all grouped together. If they select all five buttons, then all five slots will be filled. If they select just button 4, then it needs to go into the first slot in main.swf

Not sure how best to go about this and I'm open to any suggestions.

Sorry for the long post, I just wanted to be clear about everything.

David

Loading External .swf Files. But My Buttons Are In A Movie Clip
Hey guys,


i need some help with my flash website. I'm not very experienced and i know this is a frequently asked question but how do i go about in loading a external .swf file with a preloader.
i've got it to work using _root.

But my problem is when i use it with buttons that are located within a movie clip (my animated menu is a movie clip) it doesnt want to work any more. I'm using Flash 6.

Any help would be appreciated...with comments =)

Thanks!!

Loading Buttons Into Movie Clips In Ordered Sequence?
I posted this over at Flashkit recently but thought I'd add it here as well in the hopes of getting this sorted out.

Here's a brief run down of something I need to do... I wonder if anyone has any suggestions on how best to do it. The simplified version is as follows;

I have 5 buttons labelled 1, 2, 3, 4 and 5. They are 30x30pixels and each in a seperate swf file called button1.swf, button2.swf and so on.

I need to load these buttons into a main flash file called main.swf. In this swf I've placed 5 empty movie clips with the instance names slot1, slot2, slot3, slot4 and slot5.

I can load the buttons into these slots very easily by using;


Code:
loadMovie("button1.swf", "slot1");
loadMovie("button2.swf", "slot2");
loadMovie("button3.swf", "slot3");
loadMovie("button4.swf", "slot4");
loadMovie("button5.swf", "slot5");
That of course works fine, but here's where it gets more complicated. I have php based admin tool that the client can use to choose which buttons are to be added to main.swf. So they can opt to have any or all of them appear as they like. This tool will generate a URL with the info about which buttons are to be included, sort of like this;


Code:
http://www.mysite.com/admin.php?button1=yes,button2=no,button3=yes
etc etc

Now I can probably make the Flash file read that url somehow and show only the buttons they've opted to display (haven't really sorted that out yet actually) but what I need is not only that but somehow to make it so that if they choose button1, button 3 and button 5 (for instance) that those three buttons will appear in the first three slots of main.swf

I can't have buttons 1, 3 and 5 show up in slots 1, 3 and 5... I need them in 1, 2 and 3... all grouped together. If they select all five buttons, then all five slots will be filled. If they select just button 4, then it needs to go into the first slot in main.swf

Not sure how best to go about this and I'm open to any suggestions.

Sorry for the long post, I just wanted to be clear about everything.

David

Loading Movie To Level 1, Cancelling Out Level 0 Buttons?
I have a movie (main.swf) and when you click one of the buttons, it loads section.swf on top of main.swf onto level 1

When section.swf appears on the screen, everything is fine BUT... the buttons on the main.swf work THROUGH the section.swf which is on level 1. Is there anyway to cancel out the buttons on level 0 when a movie is loaded ontop of it to level 1????

TIA

Multiple Buttons Loading MC Buttons On Single Stage
Hello,
I need three buttons , working independent of each other, to "turn on" the MC in three seperate boxes, all on the same timeline- further, I want these MCs once "turned on" to actually be buttons that can then send the user to a different page. I can make this work if it's only one button, using two frames (by "hiding" the already launch MC over the top of it- then sending the link to frame two etc) but I need ALL three buttons visible, in whatever order the viewer clicks them! (Think of a wall with three windows and the MCs are the window images!) SO: the viewer clicks a button (any or all three) that turns on the movie clip and the movie clip can then be clicked to launch to a new page. Is this even possible?
-sorry for the long explanation- thanks for any help!
ras.

ActionScript In Buttons To Reference Movie Clips Inside Buttons
I want to reference a movie clip inside a button, to use tell target on the button. Is there a way to use something like:

tellTarget (this.movieclipname) {
}

that way i can use multiple instances of one object, rather then having to make a different action for every single time i want to use it.

Hiding Buttons Or Movie Clips With Buttons With Actionscripting
Greetings,

I really need someone's help. I am trying to hide buttons from screen when certain conditions are set. For example, I have a variable called Amount. Now, I have a textfield that displays the value of Amount. Three buttons are visible. Each button has actionscript so when click each button would subtract some amount from the variable Amount. Button 5 will subtract 5 from Amount and button 10,20 accordingly. Now, when Amount is less than 20. I wanted to make the 20 button disappear from the screen (not using timeline, object oriented actionscripting). Then when Amount is less than 10 the 10 button will disappear.

I tried making the button disappear with "five._visible=false;" However, I was told I could not do that with buttons. So, i created a movie with button inside. It disappears with "moviefive._visible=false;" But the button does not work when visible. I can see the little hand when I place the mouse over the button, but it does not work. It does not subtract from the variable Amount.

When someone clicks the five button, five button has code that will subtract 5 from Amount and if statements that will "twenty._visible=false;" if the Amount is now less than 20.


Could someone please help me. Thank you very much. I really appreciate any assistance you could provide.

Thanks again

Buttons, Buttons, And More Buttons...oh And Movie Clips Too
MY QUESTION IS AT THE END and UNTIL THEN IS A BACKGROUND... PLEASE HELP!

moving along...
Ive now made several .fla files for my hour long movie. each .fla file ranges from 2-20mb. not too shabby... Ive done the load movie thing and it ran fine... i havent put any sound yet.. but i'll ask about that question later...

okay.. so the whole thing has about 30 slides... i have 5 .fla files which has 3-5 movie clips in each... each movie clip has about 1-3 slides.

everything is fine so far... (no audio, but im not there yet)

Since i dont have sound cutting software currently... i thought id make movie controls for this video....

originally i put the controls in the original timeline.. not the movie clips.. but my pause didnt work and my play acted like a fast forward... my fast forward would go to the next movie clip(which i anticipated)... but I wanted the fast forward to jump every 12frames..

so here comes the problem....

i copy pasted the buttons in the same exact place in every movie clip.... so it should ,in theory,work like it was on one timeline.. but it wont export.. the file is still the same size.. (insignificantly larger ,less than a mb)..

my question is:

does having buttons on every movie clip ( which frames length range from 400-2000, avg.1000) have a problem with flash...??????????not allowing me to export.. or maybe it's just having so many errors it wont run... in fact... when i close it down (because it wont let me cancel..) it wont let me re open the .fla again.. unless i restart the computer

Movie With Buttons Via AttachMovie, Buttons Not Working
'm developing a flash menu (using flash MX) for a website I'm building (it's a gallery to show off my travel photos and my journal entries). I have the basic layout the way I want but I am having a problem accessing buttons within an attached movie.


Code:
//quick hack to get onRelease functionality for a movieclip
_global.MovieClip.prototype.onRelease_ = function(murl){
this.onEnterFrame = function(){
this.onRelease = function(){
trace(murl);
delete this.onEnterFrame;
}
}
}

//when a user places their mouse over a menu item, it will scroll out from the right
//if there are submenus associated with this item, loadsubMenu function will be called
MovieClip.prototype.topmenuOut = function(tmo_speed,has_sub1,toload,temp_name){
if(has_sub1 eq "" || has_sub1 ne "false" && has_sub1 ne "true"){
has_sub1 = "false";
}
this.onEnterFrame = function(){
if(this._x > 0){
this._x -= tmo_speed;
}
else{
if(has_sub1 eq "true"){
_global.isShowing = this;
this.loadSubMenu("add_",toload,temp_name);
}
delete this.onEnterFrame;
stop();
}
}
}
//when a user moves their mouse away from a menu item, if it is "exposed" it will move
// back to its default
MovieClip.prototype.topmenuIn = function(tmi_speed,has_subm){
if(has_subm eq "" || has_subm ne "false" && has_subm ne "true"){
has_subm = "false";
}
this.onEnterFrame = function(){
if(this._x < 214){
this._x += tmi_speed;
}
else{
if(has_subm eq "true"){
_global.isShowing = "";
}
delete this.onEnterFrame;
stop();
}
}
}
//called from topmenuOut if there are submenus present; will attach the appropriate movie //as set in the movieclip that the mouse is currently placed over and will attach the //submenu clip to the current movieclip
//all calling (top level menus) movies have had their linkage set to export for actionscript //and first frame and reference names set
//in addition the submenu is faded in and out depending if todo (passed from calling menu //movie) is set to add_ or del_
MovieClip.prototype.loadSubMenu = function(todo,omovie,temp_movie){
if(todo eq "add_"){
temp = this.attachMovie(omovie,temp_movie,100,{_x:0,_y:54});
temp._alpha = 0;
temp.onEnterFrame = function(){
if(temp._alpha < 100){
this._alpha += 5;
}
else{
delete temp.onEnterFrame;
}
}
}
if(todo eq "del_"){
temp.swapDepths(99);
temp.onEnterFrame = function(){
if(temp._alpha > 0){
this._alpha -= 5;
}
else{
delete temp.onEnterFrame;
temp.removeMovieClip();
}
}
}
}
//from a menu movie (acting as button) on the main timeline(called //guestbook) and defined in the movie itself
on(rollOver){
topmenuOut(5,"true","subm_guestbook","temp_guestbook");
}
on(rollOut){
if(_global.isShowing eq this){
loadSubMenu("del_","subm_guestbook","temp_guestbook");
topmenuIn(5,"true");
}
else{
topmenuIn(5);
}
}
on(release){
this.onRelease_("hello");
}
The problems lies in the fact that I have a movie called mov_subm_guestbook, exported for AS and first frame with the label: subm_guestbook. When you hover over the top level menu "guestbook", it will move from right to left then the submenu will be show (attached to guestbook via attachMovie) with the fade in and fade out effects working. However I cant access any of the two buttons in the submenu. I have defined both as buttons and nothing. I've used

Code:
Button.prototype.swapDepths = MovieClip.prototype.swapDepths;
to set the depth of the buttons within the attachedMovie to something high like 10000 using <instancename>.swapDepths(10000). But still no go.

I've tested out the submenu with "Test Scene" and the buttons work then, just not if I attach them to another movie with attachMovie.

I'm still new to actionscript (but I'm really familiar with other types of coding and scripting) and I would appreciate any help.

Thanks.

bungilo

Fast Forward And Rewind Buttons To Control Movie Clips AND Main Movie
I am creating a software training movie in Flash (MX). The main movie has text, sound and animations directly on the main timeline, and also includes external swfs (video screen captures) that are loaded dynamically into a movieclip target.  

loadMovie("bkr_openpgm.swf", "mc_finvideo");

I'm not importing these videos because they can be quite large after importing (my video capturing software can export as swf and avi). I will never play more than one movieclip at a time (so I use the same movieclip to load all movies: mc_finvideo), and there can be many frames in between movie clips where there's only non-movieclip stuff going on on the main timeline.  After I finish playing a movie clip , I unload the movie from the movieclip using the following on the frame on the main timeline where the movieclip should end

mc_finvideo.unloadMovie()

I have play, pause, fast forward and rewind buttons on the main timeline that control the main movie just fine. The play and pause buttons also control the movieclip fine.

However, I'm having problems with the rewind and fast forward controlling the movieclip. The button logic works fine (moves play ahead or back 100 frames) UNLESS I click the rewind button at a point within 100 frames AFTER a movie clip has unloaded. Then (assuming the last movie clip was at least 100 frames long), the movie goes back to a frame where there should be a movie loaded, but of course there isn't, since the frame that loaded the movie clip wasn't hit.
Here's the code for the rewind button's on release event:

    intCurrFrame = math.round(_currentframe);
    intMCCurrFrame = math.round(mc_finvideo._currentframe);

    //if the movieclip is closer than 100 frames
    //  to the beginning, go back 100 frames
    //  otherwise unload it
    if ((mc_finvideo._currentframe - 100) > mc_finvideo._totalframes) {
            mc_finvideo.gotoAndPlay(intMCCurrFrame - 100);
    } else {
            mc_finvideo.unloadmovie();     
     }
    this.gotoAndPlay((intCurrFrame - 100));


The fast forward button is similarly problematic -- if I click fast forward within 100 frames of a frame where a movie clip will load, the frame that the movie fast forwards to has no movie clip playing because the frame that loads the clip was skipped over.

Can anyone help me make this work? (Maybe I'm going about this whole thing the hard way?)
I can post a sample fla if it will help clarify.

Thanks

Loading A Frame In _root And Also Loading An External Movie Problems.
First of all, hello everyone and nice to meet you

I have been hacking at a problem for a couple of days now and I am in need of help to solve it. Please excuse my noobishness, but I have a lot to learn when it comes to flash.

Here is my scenario:

I have my main movie (_root)
In the actions layer of my main movie I have:

Code:
this._lockroot = true;
I have a button that loads a new external movie at the end of which I want to load a particular frame in the main movie. I call this from the external movie:

Code:
on (release) {
_root.gotoAndPlay(610);
}
Everything up to here works brilliantly....But my problem arises when I also try to load an external movie onto level 5 at the same time as I am instructing the main movie to play frame 610 from an external movie. I want the external movie to call frame 610 in main, and also load a new external movie on level 5 in the main movie. I have tried about every way of loading movies that I can think of but I can never get the external movie to load along with frame 610 of the main movie. I even tried _root.loadMovieNum("myexternalmovie",5) right after my first root call, like this:

Code:
on (release) {
_root.gotoAndPlay(610);
_root.loadMovieNum("myexternalmovie",5)
}
Is that possible or do I have to approach this entirely differently? Thanks for any responses

Help Problems Loading External Text And Loading The Movie Into The Explorer
Hola a todos!

I have some troubles with my movies. I'll explain.
(Sorry for my poor English - I'm Spanish!)
I'm developing a website for a Real State Agency in Spain. My idea is make it enterely with Flash, but It's the first time I face Flash. I've found in the tutorials of kirupa.com the greatest help! But, still that, I need more help!

My first problem comes when loading the .swf into the explorer. I made a simple .html file that calls the .swf file to be loaded. The explorer says it's loaded, but I have to press the "Reload" button to see the movie. Can you say me why?!!!!

My second problem... well. I'll need a few minuts to explain it!

I have created a main scene. Inside the main scene I load the movies of the different sections of the site. This new movies loaded onto the main movie contain texts from external .txt files. There's no problem with the texts that are just a few words, as in the section "Acerca de". But when I need a bar to show the whole text I find that the bar doesn't work in the first time that the movie is loaded, and you have to click again in the section to access the whole text, I mean, to make the bar work. Have I explain myself?

Well. I think you should visit the site to see my problems.
Is this: http://www.wk-inmobiliaria.com/FLASH

This website is, of course, incomplete. I'm still working on it.

Could someone help me????

---- Help me Obi Wan: You're my only hope!!!!

Thanks a Lot.



Raul.

Loading Bar That Shows Loading Time Of HTML Page Not The Movie
Hi,

I have a flash intro that I'm using for my site, but I would like to (if possible), have an intro HTML page that uses JS to pre-load the images on the site and show my loading FLASH movie while the page pre-loads.

I would like the flash movie's loading bar to reflect the images that are pre-loaded on the HTML page.

Question-1: Is that possible to do?

Question-2: Where do I start? I don't even have a loading bar. All I want is just a simple rectangle that has a bar inside that moves from left to right indicating that the page is almost finished loaded. Then when the page has pre-loaded the images I need it to re-direct to the main page.

Can someone help me accomplish this, or tell me where to find out how to do this.

Thanks!

NATE

design@spyderix-designz.com
http://www.spyderix-designz.com

Main Movie With Buttons Link To Movie Clip
Basically, in Scene 1 (my only scene), I have buttons that call certain parts of a movie clip.

I've pulled the movie clip into the scene where I want it, and named the instance.

The movie clip has different things happening along the time line that relate to the different buttons. Each one has a stop action, as needed.

I placed the action of onrelease, tell target for each button to go and play the correct scene. Which it does - the first time. If the user hits one button, it goes to the right frame of the movie clip, etc, but if you hit the same button twice, then it jumps to a different button's place.

If there are only two buttons, it keeps switching back and forth.

If there are more than two buttons, only the last button is the messed up one - and if you hit it twice in a row, it goes back to the first button's frame of the movie clip.

Make sense? Any ideas of how to stop this. I even followed an example of this in a book EXACTLY and I get the same problem.

Thanks.

Buttons That Play A Movie In Reverse And Loads A Movie
Let's say i have a movie that plays, scene and the buttons are placed on the movie and and the movie stops, okay now my problem is that, I would like to know if its possible, and how to do this:

Once my movie and buttons are loaded on the scene, i want to know if there is a way, that i can make it so that, once i click on one of my buttons, the movie goes to a certain frame on the movie so it looks like its playing backward to a blank screen, and after its to a blank screen i want it to load the appropriate movie for the button i clicked.....

I tried to this a while ago, and it did not work, since i have 12 buttons that are linked to open and play 12 different movies...

any kind of help would be greatly appreciated......

thanks

Two Emptymovieclips--buttons In Top Movie Can't Load Bottom Movie
Here's the Big Picture:
I have a Flash masthead with a menu bar. The masthead also has a rounded shape with a mask so anything underneath it will be revealed around the mask. It loads into an emptymovieclip at, say, level 10. Each item on the menu bar loads a specific SWF file into a second emptymovieclip at, say, level 5. Everything else on the main stage will be below these two empty movie clips.

I have buttons with instance names in the masthead. The script that controls the buttons and everything else is in a frame on the main stage.

Here's the ActionScript:

Code:
_root.createEmptyMovieClip("masthead",10);
masthead._x = 0
masthead._y = 0

_root.createEmptyMovieClip("body",5);
body._x = 0
body._y = 0

loadMovie("masthead.swf","masthead");

home.onRelease = function() {
loadMovie ("home.swf","body");
};
geninfo.onRelease = function() {
loadMovie ("geninfo.swf","body");
};
agenda.onRelease = function() {
loadMovie ("agenda.swf","body");
};
registration.onRelease = function() {
loadMovie ("registration.swf","body");
};
speakers.onRelease = function() {
loadMovie ("speakers.swf","body");
};
activities.onRelease = function() {
loadMovie ("activities.swf","body");
};
contact.onRelease = function() {
loadMovie ("contact.swf","body");
};
home_btn2contact.onRelease = function() {
loadMovie ("contact.swf","body");
};
What's (Not) Happening:
The masthead appears as expected, but none of the body items appear in the level-5-emptymovieclip when any of the menu buttons are clicked. Flash's debugger says the syntax is correct, but that doesn't tell me if I'm using an incorrect function, or I'm assigning a function incorrectly.

At this point, I can't tell if I'm coding the buttons incorrectly (I double-checked all the instance names and they match), or if I'm using emptymovieclip incorrectly, or whether the assigned movies are loading at all (I double-checked all the movie names and they match), or if the assigned movies are actually loading but somehow hidden (I tried assigning different positions to the emptymovieclips so something in the "body" will peek out from behind the "masthead"; no dice), or something else I haven't thought of.

I searched for an answer and there are plenty of instructions on how to do things right, but hardly any on what not to do, and none that matched my situation. So I'm hoping you fine folks have some insight to share. Anyone?

[F8] External Movie W/ Buttons Need To Link To Another Loaded Movie
Hello fellow Flashers.

I have a file "index.swf" that is my main flash file. I have loaded another flash file "summercamp.swf" into a empty movie clip titled "scEmptyclip" that is located on "index.swf".

On the external loaded "summercamp.swf" I have another external loaded file that is a scroll down menu "scScrollMenu.swf" with buttons that need to link to labeled frames on "summercamp.swf". The empty movie clip that loads the scroll down menu is "sdmEmptyclip".

So the question is how do you code a button in a loaded movie inside an empty movie clip that on release it will unload the movie clip, go back to the "summercamp.swf" loaded movie and play the labeled scene?

If you need to see the site it it:
http://www.chucktropolis.com/alina/

index.swf is the initial animated page with the buttons
summercamp.swf is where the summer theatre camp button takes you
scScrollMenu.swf is the green scroll down menu on the summer camp page.

Any info is greatly appreciated.

Buttons Within A Movie To Link To A Frame Label In Another Movie
hi there got a bit prob guys here is the site im working on

http://www.brownsville.org.uk/graph.../bone/index.htm

if you look at the site you will see the scrolling nav bar at the bottom which is its own movie within the my main movie i need to create a links in this scrolling nav bar to frame labels within the main movie anyone got any idea how to do this? thanks in advance!!

Loading .swf Files While Main Movie Clip Is Loading
Hello,

I know How to do a Loadmovie command, but I can only get it to work when I goto the Movie Clip that I have that command in. For ex:

In movie clip B I have a command: loadMovie ("Submovie.swf", "_root.MovieClipB");
Which works fine.

What I want to do is while movie clip A is playing I what a command to Start the Load movie function into MovieClip B.

I have tryed many diff. commands and Cannot get it to work
Any help?
Thanks

Movie Loading Into Bankmc Is Loading Blank After Its Been Published
I created this site where it loads movies into a blankmc on in the main Fla file. It works fine when I view it on my computer. And Broadband connections show no problem. But on dial up connection. when you click a bar on the navigation. The fla movie loads in blank. You have to click another button then click on the previous but to load. Why is that?
here is the site (its for some community developer)
Doubletree Lake Estates

Thanks for you time..Let me know if you need to see the file and I'll attach it.

Patrick

Loading Dynamic Textbox While Dynamically Loading Movie
Hi All,

So, I've got a movie on the stage (but offstage) called: Card. Inside this MC is a dynamic textbox called: CardName. I'm using a for loop to create a column of cards w/ their corresponding textboxes.

Here's the code:

for (var j = 1; j<=6; ++j)
{
var name = "Card_"+j;
var y = (j-1)*game.spacingY + game.originY;
game.path.attachMovie("Card", name, ++game.depth);
game.path[name]._x = x;
game.path[name]._y = y;
game.path[name]._width = game.cardSizeX;
game.path[name]._height = game.cardSizeY;
game.path[name].CardName.text = "card #" + j;
}

The cards and the textboxes inside the card MCs load fine but the actual textboxes don't change from the default text I've hard-coded in. How can I reach the dynamic textbox inside the card Movie Clip to manipulate the text.

Thanks.

Loading Two Movies & Loading Entire Current Movie
well, having a bit of problems with figuring out my preloader :/. Iv been able to figure out how to load a single external movie with a dynamic preloader graphic that tracks percent and stuff, but i have not been able to figure out how to load multiple external files but useing the same graphic to track the percentage of the loading for the two as if they where 1. Also have not been able to figure out how to make a preloader for the current movie. LIke have the preloader at the beginning of the movie and have it stop, and run the preloader for the load of the rest of the movie file, then continues to play the intro of the same file after loading has been compleated. my code for what i'm able to do is below, any help woudl be helpfull :). Thank you guys and girls^^









Attach Code

var requestObj:URLRequest = new URLRequest ("waterIntroAnimation.swf");
var loaderObj:Loader = new Loader();
loaderObj.load(requestObj);

b1.visible=false;

loaderObj.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,preloadProgress);
loaderObj.contentLoaderInfo.addEventListener(Event.COMPLETE,preloadComplete);

function preloadProgress(event:ProgressEvent):void{
var loadedPercent:int = event.bytesLoaded/event.bytesTotal *100;
preloader_mc.loadingBar_mc.loaderText_txt.text=loadedPercent+"%";
preloader_mc.loadingBar_mc.loaderMask_mc.scaleY=loadedPercent/100;
}

function preloadComplete(event:Event):void{
preloader_mc.visible = false;
b1.visible=true;
}

Loading External Images Loading Bar (Movie Clip)
I have managed to have external images loaded with the progress bar. However, when I place these items into a movie clip the preloader no longer works. can someone please take a look at the flash file for me.

http://www.bloggot.co.uk/file.zip

Loading Mc With Buttons
hello,

i want to load a mc when somebody hits a button, i don't know the actionscript for it. could somebody help me?

Loading And Buttons...
Ok so I have a pretty good grasp of how to use flash now, at least the non coding part... so now I want to make a button in flash mx right in the beginning of my movie that will stop and let the user click on it to start the movie, I know how to create the button just dont know how to script it. Also even before that I would like some sort of loading bar thingie.. i've seen it in a lot of flash movies but I don't know how to do it at all... Any help will be very appreciated.

Thank you.

Please Help Buttons Not Loading Mc....?
hi all!

my index page is not loading the swf files from the buttons. can someone please take a look and assist me?

files (index, contact) are here

my index button script is:

b1.onRollOver = over;
b1.onRollOut = out;
b1.onRelease = home;

function over() {
this.gotoAndPlay(2);
}
function out() {
this.gotoAndPlay(16);
}
function home() {
_root.emptyMC.loadMovie("home.swf");
}

the emptyMC on my index page is instance named "emptyMC".

thanks so much.

Buttons Not Loading Swf's
Hi,

I'm trying to load external swf files from some navigation buttons. They all work fine apart from the ones that are part of the dropdown labelled as profile and events. The buttons that drop down won't load swf files at all as with the header buttons profile & events for that matter.

I have included the navigation menu fla to show you the problem.
The navigation menu is an external swf to a master.swf page so when I click on any button the swf file is loaded onto the master page. The gallery, links and contact buttons all work fine.


hopefully, someone can point me in the right direction.

cheers Rob.

Loading Buttons.... HELP
I am having a problem with a personal project i am working on... It is somewhat of a racing handicap program that connects to a web service. What i would like to be able to do is when i select a "track" from a dynamically loaded list populated by the webservice, i want the available races to load as well as buttons. Some tracks have 10 races, some have 20. I have left room for all 20 but i only want to display the actual amount... meaning i dont want 20 race buttons coming up for a track that has 10 and i want the 10 to be centered in the movie. Can any one help me with this? i am using as2.0

THANKS IN ADVANCE!!!!

Buttons Not Loading Swf's
Hi,

I'm trying to load external swf files from some navigation buttons. They all work fine apart from the ones that are part of the dropdown labelled as profile and events. The buttons that drop down won't load swf files at all as with the header buttons profile & events for that matter.

I have included the navigation menu fla to show you the problem.
The navigation menu is an external swf to a master.swf page so when I click on any button the swf file is loaded onto the master page. The gallery, links and contact buttons all work fine.


hopefully, someone can point me in the right direction.

cheers Rob.

Loading Swf Into A Swf Using Buttons
Hello,

I am a graphic designer and I am trying to code a small section of my folio site in Flash.

I have used Flash, but years ago, Actionscript 1.0 and I'm trying to get my head round 3.0. Tough.

What I want to do is have buttons that load a swf into the parent swf at a certain size and position. I have got as far as creating the buttons and loading external swf's, however when another button is pressed the movies play on top of each other.

I know you have to use the unload() function but I have no idea where or how.
Any help on this would be amazing, also some tips on scaling and positioning the swf would stop me smashing my head off my monitor. I've looked everywhere for a simple explanation nowhere.

I have this code so far:


ActionScript Code:
rewind_btn.addEventListener(MouseEvent.CLICK, rewind);
function rewind(event:MouseEvent):void
{
var ldr:Loader = new Loader();
var url:String = "rewind.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
}

spear_btn.addEventListener(MouseEvent.CLICK, spear);
function spear(event:MouseEvent):void
{
var ldr:Loader = new Loader();
var url:String = "spear.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
}

Cheers,

Ali

Loading Different FLV´s By Different Buttons
Hi thier,
Any body can help me please, I´m trying to learn actionscript 3.0 and I´m new in this cool world, Í know that I´m not good yet but I´m doing me very best..
Attached is my trail, to the left I have some buttons I made ( I called them but_one, btn_two, ... ) and then I convert them to one symbol (to make the one scrollbar (I called scroll). and I have some FLV movies (mov_one, mov_two, move_three, ... ). The idea is that each button from the scrollbar should bring an FLV movie to the front (without starting the movie), and this means each button in the scrollbar should be linked to an FLVmov.
And when I tried to write actionscript 3.0 I got different errors (like #1009) and when I test my work it starts with (mov_one) but nothing else and if I click (btn_two) error #1009 comes and the scrollbar does not work properly..!! OOOH .... I think that I mass it!! I gave up, cause I even don´t know where or what I should start with!
Please, any body can help me?? I need to see how AS3 should be writen so I can read it to understand it.

Thanks alot..

Loading Swf From Buttons
Have a simple newbie project which loads an intro swf with three buttons and then should progress to the next swf when a button is pressed. Had it working fine in 2.0 but decided I'd improve it by moving to 3.0!!

I've got to stage where a button works but the intro movie is left on the stage when the component one loads, how do I get rid of one movie when the next loads.

This is the code I'm using, which has been cobbled together from various bits I've found.


Code:
var thisMovieClip:MovieClip;
var thisLoader:Loader = new Loader();

thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);
thisLoader.load( new URLRequest("two_hook_flapper_components.swf") );

function doneLoading(evt:Event):void {
thisMovieClip = MovieClip(thisLoader.content);
thisMovieClip.stop();
}

components_btn.addEventListener(MouseEvent.MOUSE_UP, buttonClickHandler);
function buttonClickHandler(evt:MouseEvent):void {
stage.addChild(thisMovieClip);
thisMovieClip.play();
//trace("I'm clicked");
}
Thanks

David

Help Loading XML From Buttons
The Facts:
I am pretty new to Flash and AS3. I built a Flash site that loads external XML data that auto loads with each page containing it.

SEE IT HERE: http://greder-racing.com/aiwines/index.html

The Problem:
On the second page "Wines", as you can see, the white wine list auto loads just fine. But I cannot get my actionscript to load the XMLs from the buttons on the right (ie: whites, reds, dessert, champagne)
------------------------------------------------------------>>>
filename_list = new Array();
url_list = new Array();
tgt = new Array();
title_list = new Array();
description_list = new Array();
price_list = new Array();
code_list = new Array();
var filepath:String = "whites/";

var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
filename_list.push(nodes.attributes.filename);
url_list.push(nodes.attributes.url);
tgt.push(nodes.attributes.target);
title_list.push(nodes.attributes.title);
description_list.push(nodes.attributes.description);
price_list.push(nodes.attributes.price);
code_list.push(nodes.attributes.code);
}
}
my_xml.load("white_wine_list.xml");

/* Need code for buttons - whites_btn, reds_btn, ect.... here */

-----------------------------------------------------------

Also, as of right now, in the script I have the wines (fom said XML list) pop up in a new window (go click one to see). But it pops up in a new browser instead of a "popup". This is because I could not find a way to combine the java script with the XML in the actionscript to specify the new window(parent). I would rather it just load into the box (movieclip) dynamically, but I could not get that to work either.

------------------------------------------------------->>>

tn_group.tn._visible = false;
tn_group.setMask( tn_group_area );
var total:Number = filename_list.length;
var distance_y:Number = tn_group.tn._height + 9;
var current:Number = 0;
var i:Number = 0;

for( ; i < total; i++ )
{
tn_group.tn.duplicateMovieClip("tn"+i, i);
tn_group["tn"+i].preloader._width = 0;
tn_group["tn"+i].tn_button._visible = false;
tn_group["tn"+i].txt = (i+1);
tn_group["tn"+i].tn_no = i;
tn_group["tn"+i]._y = i * distance_y;

tn_group["tn"+i].fm_title.text = title_list;
tn_group["tn"+i].description.text = description_list;
tn_group["tn"+i].price.text = price_list;
tn_group["tn"+i].code.text = code_list;

tn_group["tn"+i].tn_button.onRollOver = function()
{
this._parent.txt = "view info";
}
tn_group["tn"+i].tn_button.onRollOut = function()
{
this._parent.txt = "";
}
tn_group["tn"+i].tn_button.onRelease = function()
{
getURL(url_list[this._parent.tn_no], "_blank");
}
}

------------------------------------------------------------------------------------

You see, I cannot find one person that can help me with this and im reaching my deadline Friday. Not even my intro Flash teacher can help me nor is there a tutor around either. Im kind of in a bad position.

I know the answers are stupidly simple and I have the code structured for it- Its just a matter of finding a person that knows Actionscript! No one knows it well enough in my class to help. If you know of a tutor who has an hour of time, I would be forever in debt. We can chat via AIM & send the raw files even.I CAN PAY YOU VIA PAYPAL TOO. Name your price. Im not expecting handouts, and I know time is money.

Thanks for taking the time to read this. I appreciate any help or direction that you can give me.

Help With Loading The Buttons
How do I tell my movie with action script to load my buttons after the first elements are into place first. My borders load ok but I need my button layer to be not visible until the borders have loaded... and how do I tell it to load my buttons in a fade in manner?

I know there is a way and I tried different code but Can't seem to get it right..

I am attaching my .fla file...

help!

Loading Movings Without Buttons
I have made three separate files. Now i want to load the 3 separate files in order...ie. At the end of the file1,2nd file should begin and at the end of the 2 third must start automatically...I belive its possible with load movie command. but can someone tell me exactly how to do it or plz refer any refrence...It will be highly appricated.....Regards~~

Loading, Buttons, Publishng....HELP?
Hi,

Sorry to ask questions that could probably be found in time, but time is what I'm running out of quickly.

First, is streaming or pre-loading easier (quicker for me to get done)? How do I do it?

Second, I need to make two buttons...one that skips to my last frame (where I have an action directing the movie to the webpage) and one that gets flash from macromedia for download. Can someone please explain this to me? I've never made buttons in flash before.

3rd, to publish I have to embed the .swf in an html page, yes? Any advice on publish setting would be GREAT!

I appreciate any and all advice. Truly I'd look this stuff up but I have only a few hours to finish and I'm still editing some graphics.

Thank you!!!
Bluze

Loading An Array Into Buttons?
i am making a flash 5 trivia game and i need some help.

i have a text file that has groups of arrays like the following:
Question
Statistic
Correct Answer
Answer
Answer

i want to bring this group of information into flash and go to different places.
1. the Question will go to a dynamic text field.
2. the statistic will go into a dynamic text field.
3. Each answer needs to go into a dynamic text field in its own button. there will always only be 3 answers, 1 correct and 2 incorrect, so 3 buttons. after the user clicks an answer, the statistic will show.

then it will move on to the next question.

the game will have 10 questions. so in the above text file there will be 10 sets of arrays.

any help is dearly appreciated.

thank you.

Loading Jpg's Buttons Question
I am loading jpg's into a blank container on my main page. What I would like to do is make one button to load the jpg's. So when you load the first jpg their would be a button that says load next and that button would load the next MC. I'm having problems doing this because I don't know how to set up the button. I know how to do this when I load flash MC (I would just put a jpg in the external flash MC that is going to be load along with a button that would load the next MC but I don't know how to do it with jpg's.) thanks

Loading Externals Without Buttons?
how can i load an external swf into a movie clip, without using buttons?

can i code it so it automatically happens, once the timeline's entered a certain frame? if so... what code, exactly, should i use?

Thanks to all who can help!
~Vik

http://www.explorecore.com/flash.html

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