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




Calling An MC



Ok, I made the popup window, set it to do what I want. (this is its own movie clip). Here is the thing, how do I call it. I need another movie clip to call this up and display this MC. I could put the MC on the main time line and make the first frame blank and then set a seperite MC to tell it to goto secound frame, but becuase of the amount of MC's I'll be doing this too, I feel it could cause problems. So the question is, how do I call an MC onto the stage. I'm going to make the MC, it won't be part of anything till its called. How do I make it happen.

Sparkyfire



FlashKit > Flash Help > Flash MX
Posted on: 10-22-2002, 01:58 PM


View Complete Forum Thread with Replies

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

Calling A Function, External To The Calling Class
hello to everyone, who looks at this post
So there's a class, that needs to call/access an external function.
'External' (imho) in this case would be any function, declared outside of the class.
How is it possible to:
1) call a function declared in the main timeline.
2) call a function in another class (i suppose, the only way of doing it is by importing the class having this function into the calling class?)

Calling A MC From Another MC
Hi!

My main movieclip, "main", is on top of the hierarchy.

Under "main" comes the "modul" and "text" movieclips.

Under "text" comes "info" MC.

Inside "modul" I've got a button, and when the button is pushed I want flash to play a section in "info".

I try this in the buttons actionsscript (text-mc is duplicated and the curr_mod variable has the correct value):

tellTarget (eval("_root.main.text"+curr_mod+ ".info")) {
gotoAndPlay ("show");
}

But NOOOOOOO, that doesnt work, whats wrong, and how should i call the show-section in info?


Regards,
James

Help Please Calling Swf
How I can call an specific target in a .swf from another .swf? So I have two .swf and I want to manipulate the second one from the first .swf

Calling An MC Into Another
Can anybody please help me in this regard. I have one MC in library "Dispbox" & one MC on the 1st frame of 1st Scene "Container". I am unable to call the "Dispbox" into "Container".

The script is like this. Please tell me if iam wrong anywhere

this script is in the "Container".
------------------------------
onClipEvent (enterFrame) {
loadMovie(_root.DispBox,_root.container);
//trace (_root.container);
}
------------------------------
trace results says _level10.container
___________________________________________

Calling PHP ID's From Within A SWF
Hello again

Just another question:

I have a menu, where I want a button to call, what in HTML would look like this:

a href="index.php?id=23"

how do I do this?

thanks - Rune

Calling A Swf
i expoted my movie as a swf and i have a button that calls to load the movie but flash looks for the movie in the wrong place.... bothe the main flash movie and the movie that it calls to play are both saved in the sam directory..anybody know whats going on..
xxxjosh

Calling ASP
I'm using flash 5 with several different scenes, I'm starting with one scene and when it goes to the next scene i'm calling with "get url" an asp scipt. Here is what i want to do. i want to be able to display the asp and then have it return to flash to display the rest of the scenes. And I want all of this without modifing asp to call flash.

Help please...

Calling Up A .swf
I want to be able to click a button in my movie to view another .swf that I have made. When I try it, it either replaces the current movie or launches it in a browser. I want it to play on a certain spot or screen on the current movie.

I have drawn out a small TV set and when I click a chanel (button) I want the .swf to appear in that spot.

Clear as mud?

Can any one suggest how to do it or refer me to a tutorial or ????

Calling A Mc
I'm sure this is a common question, so sorry in advance.
I searched everywhere and can't find an answer.

How do I call a movie clip from a button. I've looked everywhere for a tutorial.

I understand how to call a .swf movie clip from when someone clicks a button, but I'm trying to call a movie clip that's in my library.



I'm not sure if what I'm trying to do is the correct way to do it though.



What I'm trying to do is, I have three main boxes in one .swf and I want to click a photo in one of these boxes and have some content load in the box next to it.

I tried just having a .swf load in that box and when i click on the photo using

on (release) {
_root.contents.loadMovie
("photos03.swf");
}

the photos03.swf will load in the correct box, however the photo I clicked disappears because it isn't in the photos03.swf movie clip.

Is there a way to do what I'm trying to do except for copying and pasting all the same content/keyframes from the "clicking photos" .swf to the photos03.swf ?

If so how?
Is this what _parent, etc. actionscript is used for?

Any help is greatly appreciated.
Thanks for any help in advance.

[F8] MC Calling Another MC?
I have 2 MCs on my main timeline. One is a control panel that activates with a visible button. On rollOver it displays like a champ, no issue there.

Contained within that control panel is a button i'd like to use to call my other MC which are audio controls, as i want them hidden until use.

My question is, can I script it so that the "audio button" on the first MC calls the audio control panel even if the audio button is contained in another MC?

SWF Calling Another SWF
Hello everybody,

I am wondering if there is a way to have a SWF1 calling/running another SWF2 phisically located on the same PC ?

I mean.... If from a remote site I request a SWF file on a server PC......can this SWF1 call/execute another SFW2 located on the same server PC ?

Do you guys have any idea if it is possible ?

THX, Ric

Calling New
Do you have to call new on all variables? or is it just certain ones?

Calling As2 Swf From As3 Swf (please Help)
This MUST be the most basic problem when starting on AS3: you have a lot of AS2 stuff that you want to continue using with your new AS3 code.

After trying all suggested solutions (Calypso88, Grant Skinner, etc), I have been unable to make this simple thing work.

All I need to do is from an AS3 swf file, on the click of a button, start executing an AS2 swf file that works perfectly when stand alone or when called from another AS2 file.

I don't need to communicate any more between the two swf files, just start the AS2 and let it run.

but I keep getting errors such as
Quote:




TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::AVM1Movie@307649e9 to flash.display.MovieClip.
at MethodInfo-62()





when I use calypso88's SWF.as or

Quote:




TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::AVM1Movie@307aa849 to flash.display.MovieClip.
at Home_fla::MainTimeline/onComplete()





when I just use the same code as with as3 swfs. (not much improvement, eh? I must be doing something else wrong)

Please, somebody, post a SIMPLE, WORKING example of how to do this, I've tried everything and cant make it work....

Thanks

Mariana

Calling Other MC
Hi...i havent used flash for a couple of years and its really changed, therefore im looking for some help in the best practice to call another mc within a menu mc...

Situation: When a press a specific button i want to place a preloaded swf into 'bkmc' with a transparency of 0% and then increase its transparency to 90% over say 3 seconds and simultaneously load a swf into another mc (for this example bottle1.swf loads into mainholdermc)

When i press another button i want this image to fade out (possibly referring to some form of 'movieout' flag...)

Ive noticed that _root isnt used any more and also 'var' is used on the main timeline to setup the initial preferences of mc's. Therefore could someone advise me on the best practice to:

Setup the initial mc (using var).
Whats the actionscript to call the bkmc and load a specific swf (for this example bkone.swf) and simultaneously load the bottle1.swf into mainholdermc.

Sorry to be so demanding...i just cant get my head around the new method of good practice in flash..

Many thanks in advance

Calling A MC
hey there,
i have this problem while attaching a movie into the stage.
i've set up a for loop that attaches cubes (MC that is a cube from the library) into the stage by a random number.
lets say the random number is 5, then 5 identical cubes will appear on the stage with these instace names : cube1, cube2..... cube5.

my problem is that i dont know how to tell which cube the user clicked on.
i cant use onRealse / onPress because i dont know the instance name (there could be 10 or 100 cubes on the stage)
and i cant use onClipEvent either.

ive set up a for loop that runs from "cube"+i but it didnt work either since i dont know when to execute the loop. if i run it from the begining of the code, it runs before any1 could press the cubes then stops.

how will i know which cube is clicked?

Calling To URL's
if your movie calles out to a url for the music, does this in turn make the file size smaller, if so can you tell me how the call to AS.
thanks

Help With Calling A Get URL
I am having a problem with calling a series of web pages within my movie. I have an index.fla that I publish to html. Within the index.html, I am calling multiple swf files to load content. Home.swf loads when the index page displays. Then the user clicks on any button and each button loads another swf replacing the main content with perhaps loading it's own swf files of content also. Everything is working fine. However, on one called swf file, called students.swf, I also have a menu swf file that is called when students loads. This menu swf file has text listed with actionscripting calling a data file that causes the text to expand and rollout and display a label of the url. When the user clicks on the list name I have a get url to the url of the label. Everything works fine in the swf files when I test the movies for the swf for the menu file and for the student file swf. However, when I publish and run the index page and start testing out the student swf that is called, the menu will not open up a new browser window with the link designated in the get url. I can't figure it out! It works fine in the swf files, but not when I test it out through the index controlling file. Please Help!!!

Calling Exe
Hi,

I want to call .exe(VB.net) from my flash application and How to pass a string to that .exe file?
Can any one help on this?

Thanks in advance..

Calling Exe
Hi,

How to pass values to .exe ? Can anyone tell this?

I want to pass a string from flash to .exe file... Can anyone give syntax for this/

Thanks in advance..

Calling Mc From A Swf.
hi all,

new to forums.

Can you call from a button a movie clip inside a swf file.
I made a menu system that animates and I want to return to the visible state of that menu. not too savy with as, any help is greatly appreciated....

Thank you all for your guidance in these forums and the tutorials.
You have been of great service.....

Swf Calling Swf
Ok i want to know if this is possible.
i have my main movie when it plays i want it to load a external swf. that would be the menu./. so i create an empty mc an put the actions... thenn when i click o the menu buttons i want it to load another external swf in that same main movie... is it possible, and if it is how can i do it
thanks.

Calling Mc
hello,
i am new to flash and i confused. Like if i have an instance of an mc called NavBT which is inside a button. now on the button actions can i put this code:
on (rollOver) {
this.NavBt.gotoAndPlay("lb-over");
}

so that when i rollover the button it goes and plays the label called lb-over which is inside the NavBT?

Thanks

Calling SWF's From Within MC
i am making a full flash site production.

i have a menu.
inside a movie clip.
on the main timeline.
in index.fla.

now.
i also have a movie clip.
on the main timeline.
in index.fla.
called "container"
which is the movie clip i want
to load external SWF's into.

my problem is,
i can't call external SWF's
into "container" which is on
the main timeline
from the menu, which is
inside the movie clip
on the main timeline.

i know i have to somehow be
commanding it to call it to the root?
or the parent? in order for it to refer to the main timeline.
but how?

this is the code i have for the buttons
in the menu
which is in the movie clip
which is on the main timeline
in index.fla ::



Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie ="work";
container.loadMovie ("work.swf");
}
else if (_root.currMovie != "work") {
if (container._currentframe >= container.midframe ) {
currMovie ="work";
container.play();
}
}




}
im sure this is a simple problem to solve.
i would greatly appreciate it if anyone could help me

Calling One Swf In Another Swf
Hi All,

I have 2 swf files A and B. In swf B there is a form in which there is a listbox control, when I run swf B it shows me the listbox, but when I try to call swf B in swf A it does not show the listbox control.

Thanks in advance.

Regards

Calling Mc From A Swf.
hi all,

new to forums.

Can you call from a button a movie clip inside a swf file.
I made a menu system that animates and I want to return to the visible state of that menu. not too savy with as, any help is greatly appreciated....

Thank you all for your guidance in these forums and the tutorials.
You have been of great service.....

Swf Calling Swf
Ok i want to know if this is possible.
i have my main movie when it plays i want it to load a external swf. that would be the menu./. so i create an empty mc an put the actions... thenn when i click o the menu buttons i want it to load another external swf in that same main movie... is it possible, and if it is how can i do it
thanks.

Calling Mc
hello,
i am new to flash and i confused. Like if i have an instance of an mc called NavBT which is inside a button. now on the button actions can i put this code:
on (rollOver) {
this.NavBt.gotoAndPlay("lb-over");
}

so that when i rollover the button it goes and plays the label called lb-over which is inside the NavBT?

Thanks

Calling SWF's From Within MC
i am making a full flash site production.

i have a menu.
inside a movie clip.
on the main timeline.
in index.fla.

now.
i also have a movie clip.
on the main timeline.
in index.fla.
called "container"
which is the movie clip i want
to load external SWF's into.

my problem is,
i can't call external SWF's
into "container" which is on
the main timeline
from the menu, which is
inside the movie clip
on the main timeline.

i know i have to somehow be
commanding it to call it to the root?
or the parent? in order for it to refer to the main timeline.
but how?

this is the code i have for the buttons
in the menu
which is in the movie clip
which is on the main timeline
in index.fla ::



Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie ="work";
container.loadMovie ("work.swf");
}
else if (_root.currMovie != "work") {
if (container._currentframe >= container.midframe ) {
currMovie ="work";
container.play();
}
}




}
im sure this is a simple problem to solve.
i would greatly appreciate it if anyone could help me

Calling A Function
I set a function in frame one of the main stage called salWalk.

I access it in the last frame of _root.sal but it is not calling the function.

What I wrote is this in the last frame:

stop ();
i = Math.round (Math.random () * 40);
if (i =26){
i = 41
}
salWalk(i);

and the function is this:

function salWalk(i){
sal_[i].gotoAndPlay("move");
}


what am I doing wrong?

Calling JPEG
Someone told to me that it is possible to dynamically import .jpg or .gif in a swf, I thought that the only thing that could be imported was a .swf... so, am I wrong ?
Is it true that a swf can call for a jpg format ?
do I need a plug-in or something ?
please help.

Help With Calling A .txt File
I am trying to make a news ticker using Flash 5 for my companies web site. I want the information in the ticker to come from a text file so my boss can just edit the text file when he wants to change the info....any suggestions...any help is greatly appreciated. Thanks

Calling .exe Files
We are burning a flash movie to CD. Within the movie are buttons calling, other swf's.

There seems to be 2 ways to open other movies: loadmovie and get url. Unfortunately, get url needs a browser and loadmovie loads on top of the other movie. What we want to happen is for it to load another movie in another window ie Is there a way to call other projectors?

Any thoughts. Cheers.

Calling A Function
I have placed a function on a timeline which reads:

function intro () {gotoAndPlay ("Scene 2", "one");
}

I am now trying to call that function from a button placed on a movie clip, the script I have placed is:

on (release) {
function intro() {
}
}


however I am not sure what the command is for calling the function because this seems to relate to creating another function, I would be grateful to anyone who can help.

Calling Another Movie
how do i load a movie from another movie and goto a particular scene. thanks.

Calling From Anoe Swf To Another
HI,
I have 2 swf on the same html file.
How can I call from a button on one of them to a label in the second swf?

Calling Maintimeline From MC
Hello,

I'm sure this is a common one and quite easy + couldn't find it browsing through.

I've created a movie with buttons in it and when I do onMouseOver or something for the life of me I can't seem to get it to refer to the main time.

in brief I've been trying OnRelease _root.Goto.frame20 , clearly thats wrong, but what would be right?

very scatty request, hardcore busy, thanks.

Txt Calling Button
Hi,
I am trying to make button using txt file.
how can centralize my button title?
how do we make smooth our txt file when we call into flash.?
i am using notepad editor for txt file.I am replacing<p align justify> command but still my txt file is not looking good.
and also there are big space between two lines.
what shoudl i do?
thank you

Calling Array
I want to be able to change a varaible in a function from a button in antoher swf the function is
function playQuotePanel () {
bActive=1;
_root.quotePanel.gotoAndPlay("fadeUp");
actquote=quotes[2];
I want to be able to change it in the other swf button to be _level0.actquote=quotes[3] just like I would be able to change anyother variable but this one is = to an array called quotes. I tried to put my code in to the last tread but it wouldn't show up so I hope this confussed version does .

Calling Mc With Different Levels
Hi,

How can I call an mc from _level1 to _level0.


on _level0

_root.mc1



on _level1



_root.mc2.mc3



I want that mc3 on button event starts playing mc1



thanx


trolljanz

Calling Variables From Another Swf?
Okay, I thought I had the solution, but something is seriously wrong.

Here's the situation:

My site is currently made up of 3 movies:

mainpage named root.swf
portfolio.swf
transition_clip.swf

The main page, root.swf. This of course would be on level 0. The movie has a button that takes you to the portfolio page(which will load in level 0 also), but upon hitting the button, I want the transition clip to load on top in level 1, play and when it hits the last frame, the transition clip unloads and loads the portfolio page back in level 0.

Pretty simple, right?

However, I will have a total of 6 links on the root page, and of course, 6 on each other page, which will load into level 0.

So here was my plan, I thought it was perfect:

On the root page, frame 1, I created a new variable: buttonvar. I gave it the value of 0.

I then gave my portfolio page button on root.swf the following code:

on(release){
buttonvar = 1;
loadMovieNum("transition_clip.swf", 1);
}

This loads my transition clip on top, it runs and then on the last frame I added the following actions:

stop();
if (buttonvar = 1){
unloadMovie(1);
loadMovieNum("portfolio.swf", 0);
}else if (buttonvar = 0){
unloadMovie(1);
loadMovieNum("root.swf", 0);
}

You get the idea. The actual code incorporates all 6 links, and the buttons for each page alter the value of buttonvar between 0-6, depending on the page it relates to.

This approach doesn't work.

So my question is this:

1. Is there a way to call the variable while in the transition clip from the lower level movie?

2. Should I be using something other than the if/else loop to check the value of buttonvar?

I'm lost and tired - HELP!

Calling A MC From Inside A MC
this has been driving me nuts !!! i've made a MC and when i get inot that MC i've got a button that i need to play another MC . for some odd reason it won't work, i've used the same basic code that runs the first MC but it won't work for the second MC . Can anybody tell me why this is ?

here is the code i used

on (release) {
_root.MCnewsdate1.gotoAndPlay (2);
}

Calling (.NET) Web Services
This may be a long shot but does anyone have any experience of calling web services (specifically .NET web services) from a flash movie. I imagine this would involve packaging an XML doc inside a SOAP envelope and using sendAndLoad but I also expect a bit of pain in the process and so was wondering if anyone could offer any advice???

Cheers.

Calling On A File
I have a web page, and I want my SWF file to attach a jpeg file that is external from the SWF file. Since it's a comic that updates daily, and I want a fast engine for viewing all the comics, I need to do this and not keep on editing the file. Please tell me a command that is like include but for image files, or how to use include so that it does this. Thanks in advance!

CALLING ALL FLASHERS< I NEED U HELP
just designed this web site for a mates band, it seems fine on the mac, but pc users cant see it, could u guys check it out for me, so i no it just isnt me haveing the problems,.


http://www.apesnet.com


thank u

Calling A MC Using A Variable
Is it possible to request the actions of a movie clip using a variable.

For Example
if I have a variable x, and I want the movie clip myClip to play. Can I use a command like this:

x="myClip"
_root.x.play()

This may not seem practical but I want a certain MC to play depending on certain variable. In other words depending on what certain variables are I would have different values for x and thus different MCs playing.

Is this at all possible?

Calling JS In A Frame
hi, im need to create a popups for my site, and at the moment I use a smartclip with a button which holds this script:

on (release) {
getURL ("javascript:window.open('" add url add "','" add winName add "','width=" add winW add ",height=" add winH add ",top='+((screen.height/2)-(" add winH/2 add "))+',left='+((screen.width/2)-(" add winW/2 add "))+',toolbar=" add tools add ",scrollbars=" add scroll add ",resizable=" add resize add ",menubar=" add menu add ",status=" add status add ",directories=" add directory add ",location=" add location add "'); void(0);");
}

- which creates a popup in the centr of the screen -

i use this so i dont have to create JS functions in the page that the movie holds ( because i cant be arsed ).

The above code works fine, except when the movie is in a frame. ( after the click, the frame just turns into an error page -not intended- )Why? are there any other simple methods (ones where script in the html file isnt needed) which opens a JAVASCRIPT window (so it can be killed whithout an error message) that can be used?

Calling Javascript
i would like to load a movie which will be displayed in new window without the address bar, status bar and toolbar.

I tried use getURL and my code look like that:
getURL("javascript:window.open('example.swf','try' ,'tooldbar=0,address=0,status=0')");

when i run the parent file (in html..load parent.swf), and when i click the link, it does open a new window showing the example.swf . the prob is, the parent window will goto a new page and showing some kind of error "[object]"....y???
how to solve it?

Calling Javascript.....
i would like to load a movie which will be displayed in new window without the address bar, status bar and toolbar.

I tried use getURL and my code look like that:
getURL("javascript:window.open('example.swf','try' ,'tooldbar=0,address=0,status=0')");

when i run the parent file (in html..load parent.swf), and when i click the link, it does open a new window showing the example.swf . the prob is, the parent window will goto a new page and showing some kind of error "[object]"....y???
how to solve it?

Calling The Pope
G'Day,

I'm wondering how I can attach movie clip objects to a custom built object of mine? This is really starting to frustrate me because I can't find out how to do it and am running out of time.

Any help or ideas would be greatly appreciated.

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