ActionScript 2.0 :: Can Several SWF's Talk To Each Other
May 12, 2011
I would like movie C, to be the "bully"and order movie B to load itself into the highest layer of movie A.can one movie control the fate of an another movie, and tell it what to do ?I've tried many variations loadmovie and targetting...no luck !
I have a preloader.swf that loads index.swf I want to be able to have some actionscript inside preloader.swf that tells index.swf to gotoAndPlay(2);Is there a way to do this. Basically I don't know how to talk to the swf inside the swf, meaning I don't know what the path would be like.This is what my actionscript looks like right now:
Code: var req:URLRequest = new URLRequest("index.swf"); var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fileLoaded); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preload);
PHP Code: private function initPreview(e:MouseEvent):void{ v.stop(); var req:URLRequest = new URLRequest("Presenter.swf"); var ldr:Loader = new Loader(); ldr.load(req); presenterHolder.addChild(ldr); [Code] .....
Where I am loading I need to talk to that playlist object. In my PlaylistLoader class I have a function called setPlaylistID(). I need to somehow pass a number to that function of the loaded swf.
Basic scenario:Two movie clips with instance names- words_mc and examples_mc on the stage.When words_mc gets to Frame 35, I want to it to tell examples_mc to move to a particular named frame within examples_mc.The frame in examples_mc is named strawberry.On Frame 35 in word_mc, I've placed:examples_mc.gotoAndPlay("strawberry");I'm getting an error:1120: Access of undefined property examples_mc.
I have a very simple flash program that plays music. It consists of a play pause button and a timer that shows the current position of the song. I'm trying to make it possible to pause or play the song using a regular form button.
[Code]...
When I click the button, Firefox's error console says "Flash is null" What am I doing wrong?
I am working on a chatting app that makes use of flash sockets. I don't want to code the entire interface in flash, so I was hoping to just use flash to talk to the socketserver and call js to modify the dom.
I'm trying to be able to see all the connected users to my swf. I know how to trace it out server side but how do I send it back to my swf so I can see it? I get a success responder but my value is null.[code]
Code: private function initPreview(e:MouseEvent):void { v.stop();
[Code].....
Where I am loading I need to talk to that playlist object. In my PlaylistLoader class I have a function called setPlaylistID(). I need to somehow pass a number to that function of the loaded swf. I cant figure this out for the life of me.
I was wondering how to accomplish this. I have a .swf embedded into an html file with html links on the top. Within the .swf file I have a continue button that takes the user through all the frames. Is it possible to include some kind of code so that when they reach the end of the .swf the "next" link will become initiated and take the user to the next .html page. I am working with captivate is this feature in captivate? If anyone could point me in the right direction or share some wisdom it would really make my day
I'm an animator by trade and don't have a ton of experience with classes or any advanced programming. Here is what I'm dealing with:
I isolated the code that I'm trying to work with so I don't have to post all the code on here because there is a ton of it. It's in two separate .as files in the same folder, BaseClass.as and Nav.as
Basically I need to put an external interface call where I'm currently tracing "THIS IS WHERE THE CODE NEEDS TO GO" that tells the external interface a new page is being loaded. I was wondering if anyone had any advice trying to get these two .as files to talk to each other.
I have a main fla file that loads an external swf into a holder mc, let's call it 'swfloaderholder', when a menu item clicked. Inside the external swf's fla I have a holder mc, let's call it, 'jpgloaderholder' that loads different jpegs. Is there a way to 'talk' to the 'jpgloaderholder' from witin the main fla file?
I have a Parent.swf that has 3 Child.swfs. Child1.swf, Child2.swf and Child3.swf loaded onto Loader1, Loader2 and Loader3, respectively. How can I click a button on the Child2.swf and have it affect Child3.swf? I have alread searched a bit on these forums and found some code. I can put
I haven't scripted in AS3 is a while and can't remember having these issues. Perhaps it's because I've been using less strict languages like lua, ruby/php, and java that has made this difficult to get back into.
I am trying to make classes talk to each other and am using folders in an attempt to make things a bit easier for me to track.I have a document class in the base folder known as Main and right now one other class located in com/Game/ known as NewGame.as
Now the issues I am having is basically the Main.as sets up the stage. Puts on the starting buttons, interface, etc. The NewGame.as is called from the Main when the NEWGAME button is clicked. I have gotten that working properly, a few hang ups on error 1061.
I am trying to make a swf talk to another swf on a web page, i.e. to separate flash pieces would be able to pass information back and forth to each other on a page. I have some thoughts on how this might work, but I am curious if anyone has done this before, and or what you would think the best way off achieving this would be. Haven't found much about this topic on the web...
my initial thought would be to have flash update something like an xml file via a webservice, then have the other piece constantly look for a change in information, but that seems forced.
I'm trying to have two flash menus talk to one another via ExternalInterface, but for whatever reason the javascript function isn't being called.
I have two menus, topMenu and tabMenu. The idea is for clicking on one to, among other things, send a message to the other.
[Code]...
Obviously I haven't put the code in for two-way communication, but I want to get this working. As of now, clicking the button on topBit does absolutely nothing. No errors from Firebug, and the alert doesn't come up, so goBetween() isn't being called.
I was just wondering if anyone out there has had any luck trying to get a flash app to talk to either a visual basic or c++ application? I need to build a player [flash embeded into the vb or c++ application] that when the user say, pushes a button, calls a function or action from within the app. Any Idea How would I go about this?
I'm making a flash page with a basket movie clip that follows my mouse. The basket has a stop action on frame one so it stays there unless directed otherwise. Then I have a movie clip of a green berry that I made into a button (titled gb1). I need to make it so that when that is clicked it makes the basket go to the next frame (numbers change to show how many berries were collected). Here is my (unsuccessful) code as of now.
//1. stage.addEventListener(Event.ENTER_FRAME,followBas ket); //2. function followBasket(event:Event):void { var dx:int = basket.x - mouseX;
On my site, i have 3 different Flash Files. Each playing a different part .eg text, content,menu. (because of the design, i can't have just 1 file, plus i want 3 seperate ones~!!!)Now what i want to try and do, is have the MENU(swf1) target a scene or frame in the CONTENT flash file(swf2)So that when you click on about us button, it will target (eg.) frame 3 of SWF2, which contains that information!!ANd also have the MENU(SWF1) be able to also target frames in TEXT(SWF3)Bassically im guesisng its passing variables to and from multiple movie clips!i have no where to start.
if it was by any means (LocalCOnnect?) possible to create a footer that will 'talk' or interact with other instances of it on the same page... Now I know there is one problem because it's actually the same swf file
My client is in Flash/Flex (game with chat) and it will be talking to a Java server. What is the best way (protocol / interface) for my Flash client to talk to my server? I heard about Flash Remoting MX, but it is a request / response mechanism. I could always request something and wait for asynchronous notifications from server. Then request again, implementing something like a Comet server.Anyways, what is the industry standard for this type of communication: Flash Client talking to Java server, supporting asynchronous "push" notifications from server.
I'm updating a course from a previous developer who is no longer here, and, of course, the code is not commented and difficult to follow, but, there's a "shell" that loads an "interface" file which has the navigation controls which load other movie files using addChild. The calls look like (slide is the variable with the swf name): Actionscript Code: iFace.screen.back.addChild(slide);
One of the loaded files is a "home" file, which has several interactive areas within it. The problem is that, if the user goes into the home file, selects an area, then hits the "menu" button on the interface, selects the home file again, it shows up with the area that the user selected previously still displayed. If they select another section and then go back to home, the file gets reset. how I can "reset" the loaded file? I tried putting the following on the menu button after the function call: