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




AttachMovie Command From One Swf To Another.



Hello flash gurus Can seem to get code right for button command in externally loaded swf A to load an mc from root movie into externally loaded loaded swf B. ie Button 1 in swf A attaching movie in root to swf b. Help me out. Virtual beers on offer. HM



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 06-24-2004, 06:49 AM


View Complete Forum Thread with Replies

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

AttachMovie Command From One Swf To Another.
Hello flash gurus

Can seem to get code right for button command in externally loaded swf A to load an mc from root movie into externally loaded loaded swf B.

ie

Button 1 in swf A attaching movie in root to swf b.

Help me out.


Virtual beers on offer.

HM

Using AttachMovie Command...
I've used the command attachMovie to add custom movie clips to my flash document but now I want to change the value name (that I defined inside the movie clip as a text) in each movie clip. I found something like :

this[uniqueclipname].value.text = "Name";

But I couldn't use it clearly. Is there an alternative for that? Or is there any wrong part in my code? Thanks for your help.

Changing Scenes With The Attachmovie Command
I'm having real problems switching scenes with the attach movie command. I have a MC that holds a button which functions and preforms all commands EXCEPT changing scenes... I've tried everything I can think of... level's, _root, _this... nothing seems to work. Can somebody help me?

Attachmovie Command Won't Load Text In MC?
-------------------
i now realize that no one is responding to this because the title of the thread is one that is seen frequently enough.

but my problem is unique: an MC loads via the attachmovie command, but only the objects are displayed, and not any of the text.
the text is not dynamic either.
-------------------

hey all, my latest problem involves the attachmovie command. as usual, I'm so close and then some small little thing gets in my way.

in the .fla you will see a "test" button that is supposed to attach an MC to an MC on the main level. if you press this button, the MC will attach, but will only display objects, and not text. the text fields are not dynamic at this point.

here is the code for the button :

on (press) {
main_MC.attachMovie ("bucky_MC", "bucky_atch", 1)

}

the MC in the library is called MC_artists_bucky
the code seems to work fine, but the text does not display. i've encounterd a problem similar to this before, where a dynamic text field was not displaying because it was behind a mask and the font needed to be embeded, but this solution does not work either when i make the field dynamic in order to embed the fonts.

help would be greatly appreciated.

thanks

AddChild Compaired To The Old AttachMovie Command
hello I have a question about using addChild. In as2 you used to be able to assign attachMovie a variable name like this:


ActionScript Code:
aMC = attachMovie("a_mc", "a"+_root.getNextHighestDepth(), _root.getNextHighestDepth());

I'm trying to do the same type of thing is as3 but I'm running into problems

ActionScript Code:
aMc= gH.addChild(inv);

how would I go about doing something like this?
-thanks

Loops And AttachMovie Command Problem
My head is about to pop. I am trying to put 21 movie clips out of my library in a row and then repeat for the first 10 clips....Flash is choking on the attach movie command. In fact if I try to just repeat the first MC called im_1 (hard coded) it only puts one instance of it on the stage even if I increment the instance name.

Here is the big question. Is Flash incapable of attaching the same linked clip from the library more than once within a single loop?

Thanks if you can help!

ActionScript Code:
//PLACE THE NAVIGATION IMAGES ON THE TIMELINE IN ORDER
//OF THEIR NAMES IN THE LIBRARY IM_1 - IM_N
totalClips = 21;
fullClips = totalClips + 10;
startPoint = 0;

//place initial objects
  for(i=1; i<=fullClips; i++){
    //determine new clip name
      curNum = i;
    //if the original clips are used up start from 1 and continue
      if(curNum > totalClips){
        curNum = curNum - totalClips;
      }
      newClip = "im_" + curNum;
      newClipRepeat = "im_" + i;
    //attach the movie to the timeline
            //choose the movie to attach with newClip
            //name it with newClipRepeat so there are no dupe instance names.
      attachmovie([newClip], [newClipRepeat], 900 +i)
    //set the start position of the movie
      eval(newClip)._x = startPoint;
    //determine the width of the laid clip
      widthAdd = eval(newClip)._width;
      startPoint = startPoint + widthAdd;
}

AS3 - After Command Another Command That Starts A Jump To A Specific Frame
Hi everyone,

I am a newbie using Flash CS3 and Actionscript 3.0. I have spent hours looking through forums and found no answer to my problem. Maybe it is because it's not possible but I just wanted to see if an expert can help me out.

I have a button and a few animations. Basically when I click the button I want to say: "When you are pressed down I want you to play at this specific frame for this many frames and then jump to a specific frame and play on there."

wrong code until now:

btn1.addEventListener(MouseEvent.CLICK,go1);

function go1(event:MouseEvent):void{
gotoAndPlay("frame10");
}

if (you get to "frame 15"){
then gotoAndPlay("frame5")
}

Any help would be very much appreciated!

Command...variable? Help... Hey, So I Need To Know The Command To Close The Presentat
Hey, so I need to know the command to close the presentation you are in after you click on a linked button to another page... anyone know? or have any questions...... plzzzzzzzz respond...
Hey, what is the command, or properties to have a button GoTo a html link on a release mouse command and the have the presentation (or .swf/.exe projector) close and go get the html that the button was linked to?...
need more info? ask away... tristan@tri-stan.com

thanks,

tri

Command To Run A Flash File From Command Line
Hi All,
I have made a flash application.Suppose the file name is a.swf.
Now I want to run the swf file using a command from the command line..Can anyone please help me regarding this..??

Thanks in Advance,
Nirmal.

FS Command,how To Catch FS Command Using Javascript Not In Vbscript
Hi,

I'm modifying a flash.... and flash uses FS Command.

can you help me catch the fs command in javascript code?? because what I have is the vbscript code, and it does not work on some browsers.

here's the vbscript code(the problem)that calls the function:


PHP Code:





<SCRIPT LANGUAGE="VBScript">
<!--

// Catch FS Commands in IE, and pass them to the corresponding JavaScript function.
Sub mainmenu_FSCommand(ByVal command, ByVal args)
call mainmenu_DoFSCommand(command, args)
end sub

// -->
</SCRIPT> 





here is the other part of the script in the page ...javascript code(works fine):


PHP Code:





<script language="JavaScript">
function mainmenu_DoFSCommand(command, args)

if (command == "showAd")
{
if (document.layers){
daMenu = document.layers[args];
}
else if (document.all){
daMenu = document.all(args).style;
}
daMenu.visibility = visible;
}

if (command == "hideAd")
{
if (document.layers){
daMenu = document.layers[args];
}
else if (document.all){
daMenu = document.all(args).style;
}
daMenu.visibility = hidden;
}
}
</script> 






my problem is to pass the arguments in using javascript(not vbscript) so that it will work on others browsers.

other options is to modify more the vbscript so that it will work on more other browsers...

but I dont know anything about vbscript and only basic javascript...

need help thanks a lot in advance.

AttachMovie() Within Another AttachMovie() Created Instance?
I'm still struggling away on my web site, but I've made quite a bit of progress and I think my code has cleaned up quite a bit. I still have the issue of not being able to attach my new content box movie clip when the button is pressed. I am successfully able to load the data for that instance of the tab, and can access the variables. It also is able to run the newContentBox() function inside it with success, but when it tries to run attachMovie(), nothing happens. Could this be a problem with my depth? Or is it my nesting?

I have been thinking about making a global variable for depth that will increment each time anything is created, so every movie clip is guaranteed to be on its own depth. Would this be a solution?

The site can be viewed here.
The source can be viewed here.
All the data files are located in that directory as well.

This is really driving me nuts, and I want to get something solved so I can move onto the submenu creation.

If '&&' Is The 'and' Command In Flash, What's The 'or' Command?
I've got an 'if' statement and I want to say if this, or this, or this happens...

Like:

if { keyDown(_Enter) or keyDown(_Space)

What's the command to say 'or' in Flash?

Thanks!

AttachMovie Inside Another AttachMovie
is it possible to attach a movieclip, and then attach another inside of it? i'm trying to load in images via using loadMovie and XML (a little background) i want the image to be dropped in to have a mask applied to it so that the image appears as a rounded rectangle... here's my code for the for loop that attaches the movie clips...


PHP Code:



for (i=1; i<=totalImages; i++) {
                attachMovie("multiplebox", "box_"+i, i);
                movieNamer=_root["box_"+i];
}




is it possible to attach a movie inside of 'box_"+i'?

AttachMovie Within An AttachMovie? Not Working
So I've finished a project (let's call it Project Blue) where I use attachMovie which references a folder (of swf's) to place each page of the swf. It worked fine. Next, I made a master 'shell' to place this project (among others) into. To do that I used attachMovie again to place Project Blue in the shell.

But now my attachMovie pages for Project Blue won't show up. Does Flash have a problem with using an attachMovie within an attachMovie?

Thanks for any insight on this....

AttachMovie Nested AttachMovie...
I have in the root timeline an empty movie clip that loads other movies inside of it. Using the attachMovie function.

Inside one of these attachMovie clips I have a nest "attachMovie" clip as well but for some odd reason it's not working. Is there anything I should be aware of when nesting an attached movie?

FS Command And Get URL
I have just purchased Flash 4 last week, so I am a newbie, so please bear with me.

I would like to create an auto run CD using the flash projector programme. I know how to create an auto run for a CD, my problem is the following.

I have three buttons in my movie:-

1. To view a PDF index file of a CD
2. To install Acrobat Reader from a CD
3. To exit the installation programme.

I can get buttons 2 and 3 to work using the FS command however I cannot get button one to work. I have tried using (Get URL "index.pdf",window="_blank") however this launches IE5 and runs Acrobat from within. I donot want this!¿! I cannot use the FS command to locate the EXE file, as the installation for Acrobat will be in a different location on different machines.

Is there a way of running the index.pdf file straight into Acrobat Reader without having to launch Internet Explorer?

FS Command
I need help with the scripting to control Windows Projector files from within a Flash Movie. The company that I am creating this presentation for no longer has the Flash source files but they need a new interface for their existing projector files to be included on a CD-ROM

The With Command....
what does the with command mean or do?

FS Command And JS
If I want to look in my flash html page for a JS var, can I use the FS Command to do so? How?

FS Command
I want to use flash to create a presentation CD. When the CD is inserted I want the presentation to start automatically.

Any info on how to do this?

cheers,

FS COMMAND
hi there,


does anybody know how to save variables from mac-flash-projektor to mac-HD?

any help would be great...

_drek

X,y Hit Command
I have built a drop down menu with inertia so that it is springy when the user opens and closes it. At the moment I have been using invisable buttons to open and close on(release) and on(MouseOut) The problem is that I want to keep the menu open when the user rolls over other linked buttons in the menu but as soon as the user places the cursor over one of these the menu closes as the actionscript thinks its outside the parameters

I want to use the x,y properties to open and close the boxes but havent got the first idea of how to achieve this, Im thinking with an if statement. Any help would be greatly appreciated

Thanks

matt

For..In Command?
Whats the purpose of it?

I looked it up in Flash Dictionary, but I still couldn't understand.

What Command?
I have made a button and when you press it I want it to play a movie clip how do I do this?? and how do I do this if its on another scene, what command do I add??? In my movie clip I want this bar to move out when the button is pressed which is on another scene and to stop at frame 30 when another button is pressed on the menu I want the same bar to move back to where it was which is frame 60 and for another bar which is on another scene to move out to frame 30 and stop and the same thing to happen with other buttons.

please help... if I do this I AM FINISHED... please someone answer my guestion...

thanx in advance

Set.RGB Command
can someone please teach me how to use this command. My desired result is an object that can be dynamically colored with an external txt file. (bit of a newbie so the more detailed your example the better

i.e.
(1) I create a keyframe that loads the external text file - this keyframe actions look like this .......

(2) Create an object and do this to it so the object's color is controled by the text file....

much appreciated any help recieved - thanks in advance,
Oznob

Fs Command
Can some one please, please, please tell me how I can suppress the right-click options(pc) on a *.swf file: You know, so that it only has the "About Macromedia Flash 5" option. I don't just mean in the standalone player, but in embedded *.swf files in me web pages viewed in IE6.

Thank you

FS Command - HELP
I have just read that the FS COmmand does not work on the Mac.

Is there any other ways of invoking a similar procedure? I use the command to send data from a text field in and out of Flash to an HTML page.

Could I use variables in the getURL string instead? I am using Javascript in the HTML page rather than a server-side language (although this could be done)

Thanks

The 'IF' Command
I have set a variable in keyframe 1. The variable is called 'variable1' and the value = 'yes'

I want to add a key frame which does the following:

If variable1 = yes, then get URL.


PLEASE HELP!!

Thanks!

Fs Command?
hi,

I have been having problems with screen resolution in that i develop images/animation in screen resolution 1024 X 768 and when i view it using 800 X 600, the images/animation do not look good. i've read that the full screen command for flash can be used for this, but i dont exactly know how.

how do you use it so that the animation still looks good regardless of any screen resolution??

Fs Command HELP
I am building a .swf for use as a screensaver. I need to be able to close the .scr file from the flash movie. fs quit doesn't work. Is there a way either to send an actual keystroke (not a character code) or close an external application from within Flash?

Is There A Command For...
Is there a command for completely restarting a swf file from inside the file?

FS Command In MX
I just want to know what we can do using FS command of Flash MX. [client side / server side and standalone]

Fs Command
I'm developing a CD that comes with the companies product, the cd has an interface where you press one of the buttons and it's supposed to run the set up.
How do you get this done, I tried using the FS command but I don't know how.........any suggestions??

Thanks for any help you may provide

Fs Command For Mac
Has anyone figured out a Mac solution to the fscommand problem?
I have read every single thread, tutorial, etc. on several boards about this issue, and I have not found a Mac answer. If anybody can help with Mac, here is my problem:
I have created a simple FlashMX projector for use on a CD-ROM. This projector has a button (it will have more than one if I can get this to work) which is supposed to launch an external QuickTime movie. I have created a simple AppleScript (named "DemoStarter", and it works fine) which launches the movie. I cannot get the fscommand "exec" to launch this AppleScript. Below is my FlashMX code:

on (release) {
fscommand ("exec", "DemoStarter")
}

I have tried this with the AppleScript in the required fscommand folder, I have even tried using a Flash5 projector. No joy. Is there an extension for the Script that I am missing? Is there another answer?
Please help before my boss kills me. Thank you.

Need An _if Command (i Think?)
Hi,
say i have my index (blue) where everything tweens in. then a button is clicked to take the user to red, green or yellow and everything tweens out and then respective page then tweens in. how do i say:

play the rest of the clip (ie tween out);
if red was pressed, goto scene red
if green was pressed, goto scene green....

only other way i can see is by putting the out tween at the start of each other scene but this seems unnecessary work and runs into probs when the site gets into more levels...

thx for your help
lev

If Command - Help
I'm making a game where in the end an action tells a target (MC-tekst) to jump to a certain frame using the if command.

this is the script:
------------------------

if (/:score<100) {
tellTarget ("tekst") {
gotoAndPlay (1);
}
}
if (/:score>100<200) {
tellTarget ("tekst") {
gotoAndPlay (2);
}
}
if (/:score>200<400) {
tellTarget ("tekst") {
gotoAndPlay (3);
}
}
if (/:score>400<500) {
tellTarget ("tekst") {
gotoAndPlay (4);
}
}
if (/:score>500) {
tellTarget ("tekst") {
gotoAndPlay (5);
}
}

Think I Need An 'if' Command? PLS HELP
lo all. basically, my site tweens in, when a button is pressed the site tweens out and then the appropriate scene loads. how do i say

'if red button has been pushed go to red scene'
'if blue button has been pressed...' etc etc

do i have to attach a variable to each button and then check for that at the end when the new scene needs to load, and if so, how? hope you know what im trying to get at...

cheers
lev

Think I Need An 'if' Command? PLS HELP
lo all. basically, my site tweens in, when a button is pressed the site tweens out and then the appropriate scene loads. how do i say

'if red button has been pushed go to red scene'
'if blue button has been pressed...' etc etc

do i have to attach a variable to each button and then check for that at the end when the new scene needs to load, and if so, how? hope you know what im trying to get at...

cheers
lev

FS Command?
Hello, this might appear to be a generic, easy to solve issue -but I'm currently in the dark.
I'm creating a simple remote CD in Flash [.EXE]. Once playing, I would like to open up Windows Explorer in the directory where the Projector file resides on the CD-ROM or a sub-directory on the CD-ROM.

How do I invoke this command [from a button]?
When the CD plays on a client's PC, how will the correct CD drive letter be recognized? (assuming that most computers use differing letters assigned to the CD drive)

What, if any, benefits are there to utilizing 3rd party command line software tools like 'Jugglor' along with 'JStart' to accomplish this?

Any help would be greatly appreciated.
Thank you.
-Darryl

If this question has already been answered, then I'm sorry -I didn't find it.

FS Command - Please HELP
Hi,
I am trying to create a expandable menu for my desktop. It has icons in it, and it's just something that will be used to take up less space. anyways my problem has to do with executing programs. I have a button as the Internet Explorer icon. At first I tried:


PHP Code:




on (release) {
    fscommand ("exec", "C:PROGRAM FILESINTERNET EXPLORERIEXPLORER.EXE");
}







that didn't work. I read that one is supposed to use DOS syntax so I tried,


PHP Code:




on (release) {
    fscommand ("exec", "C:PROGRA~1INTERN~1IEXPLORER.EXE");
}







But that didn't work either.

Does anyone know how to execute a file from flash?

P.S. I am using Flash 5

Go To URL Command
I have a Cd-Rom that has a video clip on it. I'm trying to get the Go to URL command to pull up the media player & it's not working. I'm sure I'm doing something wrong. It's pulling up the folder the clip is in, but not the clip. Can anyone help me......

If Command?
Ok!

I have a movie with 7 buttons, that are duplicates, so they all change if you change one. They all have different instance names.
Is there any way of detecting which button the user clicks on by getting the instance name, and at the same time have specified that IF instance1(e.g.) is clicked it will load a certain frame or movie??


wow
would help me having to do loads of re programming, because it holds a script in it self that uses this setup.

Is it possible?

FS Command
I can't remeber when, your using the fs command, what size is best to have your document set @ or in the long run dose it really matter? This is for a cd. Also when you make the cd is there and way to get flash to auto run when you put the cd in?

Trevor

Yes Or No Command
I need to have a yes or no command on my flash movie (y/n). Is this possible?

Thanks!

Yes Or No Command
How do you do the "Yes or No" command on a movie? A good example I want to accomplish is the donnie darko website. Throughout the website will have to key press y or n. Thanks! http://www.donniedarko.com/

If Command
Hi all,

I was wondering if you could do something. I work mostly in Director so I know all the lingo for it but Im just not sure if its possible to do it in Flash.

What I am looking to do is have a button and when the movie is playing, when u press it, it pauses the timeline and when u press the same button, the timeline continues on. In my mind it looks something like this:

On release

If playing = 1 then
let playing = 0 else
if playing = 0 then
let playing = 1


Ok, so that isnt right at all but can anyone help me out with the code Im looking for?

Thanks all.

FPS Command
Can someone give me an example of how to use the FPS command to alter the frame rate of a movie, I don't understand entirely how it works.

AS Command Help
(FYI I have FlashMX)
I need to know what actionscript to use to make my Flash movie return to a part in my movie, play through it agian.

I cant use a gotoandplay command because then, when the movie trys to play through the part with the script, it will just return.

What command would I use

If you dont understand me, I will try to clarify.
Thanx

This Command...
I am trying to skip a couple of levels in my actionscript book and ask a question I still don't understand.


what does this._x and this._y do exactly.
lamens terms please?

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