ActionScript 3.0 :: Add Code To Main.swf That Is Calling Swfs With Three Players Correct?
Nov 20, 2010
I need to use the unload and stop method.But my actionscript code calls individual swf files which contain 1 video player each. How would I add the unloadandstop methods into the existing actionscript?First question, add this code to the main.swf that is calling the swfs with thre players correct?So far I would I add a second set of event listeners for this function, like this?[code]
View 3 Replies
Similar Posts:
Jan 15, 2009
I'm building a portfolio site for an art director. He has access to final swfs but not fla files, and I'm calling these final swfs into a main movie, using MovieClipLoader. The external swfs live in subfolders, relative to the location of the main movie. The problem, of course, is that when the external swfs are loaded they look for any additional swfs relative to the movie they're loaded into, and not relative to the folder they're located in. I've tried _lockroot -- no dice.
View 1 Replies
Oct 13, 2010
As I am getting more familiar with FMS and understanding it better with the help of the wonderful contributors here on this forum, I am now curious about players.Players such as Strobe and REOPS to be specific.Are players all SWFs that are embedded in a page? I have seen some players here on the Adobe website that are stand-alone smaller windows that appear over the page. How is this done?So Strobe and REOPS...are we talking SWF code that is editable? You can see I am quite new to this. I'm on a roll, however and wish to continue understanding and learning.
View 6 Replies
Sep 11, 2009
I have a main fla file which loads an external swf into an empty movieclip on the main timeline which works fine but I want a button in the external swf to load another external swf into another empty movie clip on the main timeline.eg. start.swf loads UKEIAMap.swf into (empty movie clip within start.swf) MapLoader_mc then a button havant_b within UKEIAMap.swf needs to load HavantProjectSheet.swf into (empty movie clip within start.swf) ProjectSheetLoader_mc without unloading UKEIAMap.swf
View 3 Replies
Dec 17, 2009
I have 2 swfs.Swf A loads Swf B.I want Swf A to listen to an event from Swf B.So, in Swf A:
Code:
function myFunction():void{
//do stuff
[code].....
View 11 Replies
Aug 5, 2010
I am currently working for a highscore system for my games website. and i have written the code for that. it only displays 1- players. i want to display overall top players when i click on top players url and want to display the monthly top 10 players when i click on monthly top players url.How to do this. i am trying since 2 days. i am struck at this point. kindly do look into this. the code as follows. For reference kindly look inot this. i need like this.[URL]
<?php
include_once("_data.php");
$game_name = "test";
$db_table = "newhs_" . $game_name;
[Code].....
View 1 Replies
Jan 29, 2012
I'm looking for a way to have my main timeline code interact with code inside of a symbol.I'm tying to get my timeline inside the symbol to gotoAndPlay(10) when something happens in my main timeline code.
View 3 Replies
Mar 27, 2011
Got to the point where the hole in my AS3 knowledge is getting large!Realising I have confusion about the relationship of:Body of code on first frame of AS3 file.(Which I have so far used to create instances of library objects using addchild and make calls to class code).Is this code called the document code? What do people call it?Numerous classes linked together by extending each other etc.Library objects (usually graphical objects)Should it be done differently? have the following problems due to lack of understanding:Addchild complicated from a class but straight forward in main body code.Cant call functions on the main body code from classes, because class code does not know the main body code exists?
View 1 Replies
Feb 12, 2009
I have a Master SWF file that needs to load one of five different content SWFs on a random basis. In other words, I would like the visitor to see a different one of five content animations each time he/she visits the page. Is there a way to just call one of five different URLs on a random basis? Here's my code so far:
var swfLoader:Loader = new Loader();
swfLoader.x = 12;
var swfURL:String = "b2bAnim1.swf"
[code]...
I would like to randomly differ the URL variable (swfURL) to select one of the following five URLs:
b2bAnim1.swf
b2bAnim2.swf
b2bAnim3.swf
b2bAnim4.swf
b2bAnim5.swf
View 3 Replies
Jan 24, 2011
I am an AS3 n00b with hopefuly a simple question I am designing a simple game in flash. This code creates an array of movie clips and asigns a picture to each one. It is a map screen. What I need is when I click on one of the created movie clips, I need it to return either the index of the clip in the array or the name of the clip. Basicaly anything I can use to tell them apart in the code. Here is the code:
[Code]...
Now all this works fine, it creates the map and assigns the correct picture and places them in the correct X,Y position and it is the correct grid of 27x27 squares. The problem is with the name, when I click on the movie clip, it returns "Instance2" or "Instance5" or whatever. It starts with 2 and then increases each number by 3 for each clip, so the first one is 2, then 5 then 8 and so on. This is no good. I need it to return the name that I assigned it. If I put the code in trace(MapSquare[1]) it will return the name "MapSquare1" so I know the name was assigned, but it isnt returning.
View 7 Replies
Jun 13, 2006
all I want to do is add a variable to a getURL line of code.EG:getURL("/index.asp", "_self");I need to add a variable (_root.myvariable) to the end of the link so that it goes to:index.asp?myvar=thevalueofmyvariable
View 3 Replies
Jul 14, 2010
I've used the code below to load swfs into my tileList and set their colors using setData() within each swf. Everything seems to work except "source:e.currentTarget.content". The swfs seem to be mixed up randomly each time it runs. Their colors are set correctly and all the other tilelist info is correct. What have I done wrong with "source:e.currentTarget.content"? I can swap "source:e.currentTarget.content" with "source:myXMLList[loadPosition].source" which gives me the correct swf but then the colors aren't set.
for(var f:int = 0; f<myXMLList.length(); f++){
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void{
Object(e.currentTarget.content).setData(myXMLList[loadPosition].param eter[0], myXMLList[loadPosition].parameter[1]);
[Code] .....
View 4 Replies
Feb 1, 2009
I can't seem to find the correct as3 code to change a movie clip's alpha.
View 4 Replies
Apr 27, 2005
i've created a project that i'm putting on cd-rom. this project calls some externals swf files. everything was working lovely until i tried it from the cd. all the called swf files are running way slow and it's just a mess.so i'm trying to figure out preloading to see if that will help. i used some script i found in a thread by Scotty, and looks like the external swfs preloaded okay. and i put a stop() on the first frame of each of the external swfs so they will not play immediately. but now i'm trying to call the swfs when i need them by using a gotoAndPlay(frame) and don't know what i'm doing wrong. i need to have these swfs not play on preload but when i call them, either by EnterFrame or onPress.[code]as an aside to this, some of the forums i've been reading say it's just bad to try doing all this with flash on a cd, that i should try rolling it into director. yowza, haven't touched director in a few years..
View 4 Replies
Apr 27, 2005
i've created a project that i'm putting on cd-rom. this project calls some externals swf files. everything was working lovely until i tried it from the cd. all the called swf files are running way slow and it's just a mess.used some script i found in a thread by Scotty, and looks like the external swfs preloaded okay. and i put a stop() on the first frame of each of the external swfs so they will not play immediately. but now i'm trying to call the swfs when i need them by using a gotoAndPlay(frame) and don't know what i'm doing wrong. i need to have these swfs not play on preload but when i call them, either by EnterFrame or onPress.
Code:
stop();
movieArray = new Array("clientsatprinciple.swf", "ccmvie.swf");
[code].....
View 3 Replies
Feb 24, 2005
loadMovieNum("icon1.swf", target1_mc);
I am trying to build a presentation by calling external .swfs inside the .fla document.
By clicking a button I want to load an .swf (800 x 600) from the desktop into a target_mc inside a new flash document.
The problem is that once I press the button to load the .swf, instead of loading it into the target_mc, Internet Explorer pos up with a statement saying " To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options..." Once I click the options link, a new link appears "Allow Blocked Content". once I press it the .swf file loads into the Internet Explorer window full screen.
I want the .swf to load into the mc I am specifying INSIDE the flash document, not on the browser.
View 11 Replies
Sep 1, 2008
I have a buttons class I would like to access but not sure of proceedure. Here is the Main.as
and here is the button class
this is actions layer:
View 1 Replies
Feb 16, 2010
im creating a web page in flash and im using this code for the navigation buttons:[code]The problem is that when i publish this and place it in Dreamweaver all three buttons link to "bio.html".
View 3 Replies
Feb 17, 2011
Even I am programmer I am very, very, new to as3.
Problem: I have define a classA in aA.sp file.
package{
import flash.display.Sprite
.......[code]...........
When test on cs4 (contol>enter) I get following error 1061: Call to a possibly undefined method playVideo through a reference with static type flash.display:Sprite
View 2 Replies
Oct 13, 2008
I decided to rewrite my question from an earlier post...I'm using the TextMetric class: URL...The code below currently resides on the attachedMC timeline, and is written twice with different variables for each time called for each dynamicText.[code]What i am trying to do (emphasis on trying) is write the code on the main timeline, so that it can be called from any attached MC, a sort of global function if you will. Another thing to note is that there are multiple dynamic Texts using the function at the same time.[code]
View 4 Replies
Mar 15, 2009
I can't seem to access functions (methods) of my document class from any other class in the same package. What i need to do is create some global functions like menu reset, title change, etc. Maybe i'm not fully understanding the OOP concept, because this seems simple and it should totally work, but it doesn't and no documentation has been able to tell me why.
I have a document class called Main.as like this:
Code:
package
{
import flash.display.Sprite;
[Code]...
View 5 Replies
Jan 11, 2010
I have a project where I am externally loading .swfs into my main scene. However at the end of my external .swfs I want it to go back to the first frame of my main .swf. I have used this code MovieClip(root).gotoAndPlay("start"); but I get this error
ArgumentError: Error #2109: Frame label start not found in scene Scene 1.
and I understand why I get the error because the frame label start isn't in that external flash file it is in the main one. However, I just don't know the correct AS3 to get this to work properly.
View 6 Replies
Sep 15, 2011
I'm struggling shaking my old school AS2 mindset here. I've got a main swf which loads a bunch of subordinate swfs. I need my loaded swfs to see some variables in the main. For instance (example simplified for conversational purposes), let's say I've got a swf loading (we'll say littleSwf), which needs to set its rotation based on a variable (we'll say swfRotation) in the main. The rotation code is inside of the little swf. How does that little swf get told / find out what its rotation number is?
View 2 Replies
Oct 26, 2011
I intend to load multiple swfs (each contains information that loaded from xml) into a main swf, but it still ticking "Error # 2044: uncontrolled ioError: text = Error # 2032: sequence error. URL: .... .. at inicio_fla:: rests.fla_20: Frame1 ()
when I play the files individually play well but when I load into the main one, is when it show me this mistake.I check the route: First I have in a folder inside this main SWF. in a second folder named "swfs" inside "rests.swf" so my route will be ..."swfs/rests.swf"
View 15 Replies
Jan 25, 2007
how to load a number of swfs into a main SWF
need obviously controller function as well
View 1 Replies
May 4, 2007
I want a song to accompany a Flash slide show; but placing the song in the .swf makes the file load too slowly, even over a good DSL connection. So I thought, since it's just non-synched background music, streaming the audio would speed things up.
I uploaded the song as a sound file in the form of an .flv to my favorite streaming video server site. (I tested it beforehand and it worked great.)A techie at the server company suggested I use their rtmp code to load it into my slide show file. Their rtmp code looks something like this:
/* wonderfulworldaudiortmp://00.000.000.00/fvssod/fandm00.000.000.00 */
(I've replaced the real numbers with zeros.)I guess I need some actionscript to call this but can't find the right combo on the internet.
I've tried things like:
/*var videoInstance:Video = WonderfulWorldAudio;
var nc:NetConnection = new NetConnection();
var connected:Boolean = nc.connect("rtmp:/00.000.000.00//fvssod/fandm00.000.000.00");
[code]....
But haven't hit the number yet.
View 5 Replies
Jan 13, 2011
How can I make this code smaller adding 100 swfs or more.
var seccion:String="home";
var loader:Loader = new Loader();
function loadSection():void {
[code]....
View 4 Replies
Sep 24, 2009
Lets say I have two swfs A and B, and at runtime, swf A loads swf B, and I wish to share code between them, to minimize file size and download times.
If swf B has some code (say. com.blah.HelloWorld), I tell the compiler to have swf B's source in swf A's classpath, but only do a compile-time link and not actually compile com.blah.HelloWorld into swf A
This works, and I have tried it, using a the -includes and -externs compiler options.
However, My problem is that I wish to do this the other way. i.e. swf A and B (and potentially swf C) all need com.blah.HelloWorld, but I want com.blah.HelloWorld to be compiled into just swf A, have it as an external reference in swf B ( and potentially C as well.)
I tried doing this using the externs and includes, but I get ReferenceErrors when I do this.
I want to do this without a having a separate rsl, so I can reduce the number of http requests.
View 3 Replies
Jun 4, 2011
Lets say I have two swfs A and B, and at runtime, swf A loads swf B, and I wish to share code between them, to minimize file size and download times.If swf B has some code (say. com.blah.HelloWorld), I tell the compiler to have swf B's source in swf A's classpath, but only do a compile-time link and not actually compile com.blah.HelloWorld into swfThis works, and I have tried it, using a the -includes and -externs compiler options.However, My problem is that I wish to do this the other way. i.e. swf A and B (and potentially swf C) all need com.blah.HelloWorld, but I want com.blah.HelloWorld to be compiled into just swf A, have it as an external reference in swf B ( and potentially C as well.)I tried doing this using the externs and includes, but I get ReferenceErrors when I do this.
View 1 Replies
Apr 3, 2004
This is the code I am using for a transistion from a .swf file when you click the button "contact":
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "contact";
container.loadMovie("contact.swf");
} else if (_root.currMovie != "contact") {
if (container._currentframe >= container.midframe) {
[Code]...
Alright this works fine but the problem is, when you click this button, it works, but then you click any other button and it brings up the contact swf file again. Is there any way I can fix or change this code so it will work?
View 14 Replies