ActionScript 2.0 :: Accessing Contents Of Loaded SWF?
Mar 25, 2006
I loaded an external swf into flash using loadMovie. The loaded movie has a hidden button which does some actions. How can I, by clicking on a button on flash execute the actions of the button which exists on the loaded swf?
View 1 Replies
Similar Posts:
Feb 18, 2010
I want to make a web radio and i want to have a box displaying the current song playing and the song that is going to be loaded after.
In fact i need a solution to the first one as the second is the same.
The streaming provider is going to provide me with a txt file that is going to be refreshed every time the song changes .
So we have a txt file changing it's contents , now how can i make the swf refreshing it self to read the new changed txt file and displaying it ?
The best solution would be the swf refreshing every time the txt changes but i believe this isn't possible. So how can i at least refresh it let's say every 2 minutes or so ?
View 3 Replies
Oct 9, 2009
I'm using my dynamic library to load all the photos & descriptions from an XML file. The photo upload is being done by a PHP page that edits the XML every time I upload/change/delete any data. The problem is, the *.swf seems to get saved, and doesn't check the XML after the edit is being done. (it works fine if i load the page again from another PC). How do I make my swf not getting saved with the loaded content? I just want the applet to load + check the xml + load everything written in there every time any PC loads it.
Here is the *.fla.
album.zip
The XML looks like this...
Code:
<photos><image><addr>
*photo name textnode*
</addr><desc>
*photo description textnode*
</desc></image></photos>
View 7 Replies
Feb 6, 2009
after loading an external movie clip called "mv_frame" into the main flash file , i need to access a movie clip inside the loaded movie called "hit" in as2 we do that using the point (.) to navigate into movie levels , but my question is how to do that in AS3?
View 2 Replies
Feb 8, 2009
can I make the flash movie full screen (filling entire area of browser window and continue to do so on window resize) AND load an external swf into that movie so that external swf does not get stretched but remains at 100% its default size?
View 1 Replies
Feb 18, 2005
I was trying to create a preloader that preloads content loaded by the LoadVars() Object. For some reason, the getBytesLoaded and getByetesTotal variables of the LoadVars object kept retuning a null value. Below's how I do it:
PHP Code:
var news_lv = new LoadVars();
var url = "news.aspx"
news_lv.load(url);
[Code]....
View 2 Replies
Apr 20, 2006
How I can reload/refresh contents that have been loaded by an external XML file. I have a XML file that has more than one parent node. When I click on a arrow button(to go to the next one) it does not reload or refresh the thumbnails.
View 14 Replies
Feb 18, 2005
I was trying to create a preloader that preloads content loaded by the LoadVars() Object. For some reason, the getBytesLoaded and getByetesTotal variables of the LoadVars object kept retuning a null value. Below's how I do it:
PHP Code:
var news_lv = new LoadVars();
var url = "news.aspx"
news_lv.load(url);
[Code]....
View 2 Replies
Oct 3, 2006
I have created 2 textfields: an input textfield at level 0 with an instance name of input_txt and a dynamic txt box in a loaded movie at level 20 with an instance name of output_txt. How do I get the text that is input into level 0 to appear into the textbox at level 20?
View 2 Replies
Feb 1, 2012
I loaded a swf from external. using loader class. But if i check with the width and height of the loader is differes from loader.contentLoaderInfo.width.
loader.width // 1250;
loader.height // 750;
loader.contentLoaderInfo.width // 750;
loader.contentLoaderInfo.height //420;
From this statement i came to know the loader gets the width of all hidden objects, which are already outside of the stage area. But now I need to increase the size of the stage contents only..
View 0 Replies
Oct 20, 2010
I have built a simple Flash application that will be presented using a projector, the application will show messages in the form of questions that will come from a simple flat-file text file or XML file.
In addition to this I would also like to be able to add my own messages using a simple HTML form.
I've been looking around the web for some resources, but have been struggling to find what I am looking for. The basic idea is that the flash application will loop through these different messages from the XML, but then when a user types in a message that will also appear within these messages. Think of it as a sort of dynamic tag cloud.
View 2 Replies
Oct 12, 2009
I'm customizing an xml flash website and while I can handle all the html and xml well enough, but in Flash, I have no clue how to:
Now go on the stage, and delete the contents of the last layer(background & pattern). Here, add from the library, the square movieclip, and name it mcBackColor(see attached image).And then to add your swf background in the "background & pattern" layer from the main.fla file.
I can change the name, but don't know how to delete just the contents of the layer and then add the new clip.I've made a slideshow before and that's all I can do.
View 1 Replies
Jun 1, 2011
I'm using this code to bring in another swf into a movieClip called "movieLoader":
var myLoader:Loader = new Loader();
movieLoader.addChild(myLoader);
var urlMovie:URLRequest = new URLRequest("movie1.swf");
myLoader.load(urlMovie);
The movie loads just fine, but how do I access it?
I tried:trace(movieLoader.totalFrames);
and it just gave me "1". I know the movieclip has more than 1 frame.What do I do to access the swf called "movie1.swf" I just brought into that movieClip?
View 4 Replies
May 20, 2011
I'm loading an external AS3 SWF using the Loader class but i need to access a method inside the loaded SWF. how can i do this?
View 1 Replies
Oct 13, 2010
So I want to access another loaded SWF. How can I have ChildA talk to Child B? All are external SWFs.
[Code]...
View 1 Replies
Mar 30, 2009
I am using a zoom component which i purchased recently to load different external swfs on different button clicks. But instead of loading separate external swfs I would like to load a single swf and go to frame labels - "one", "two", etc. - I've been reading about casting the external swf as a movie clip, but I am confused how this would work with the code I have at the moment.
var image:String="introlocal.swf";
function loadContent () {
var myLoader:Loader = new Loader();
[code].....
View 1 Replies
Jan 6, 2009
finding the url of the swf filefrom which it has been loaded? The purpose of the url is, I amloading some flv files using relative path. I just want to achievethe same by appending the relative path to the parent swf url fromwhere the parent was loaded. I am a newbie to AS3
View 5 Replies
Sep 15, 2008
I have a problem accessing a variable loaded from another swf. Actually the variable is a singeltone class, which needs to be initialized.It has structure presented in the last part of the message.The project has the following structure:
- main.swf - this loads all the other swf files and is their holder.
- assets.swf - contains some common elements and initializes the SingleTone class
- interface.swf - contains some interface elements and needs to use the SingleTone class
- all the three swf files have access to a common class structure, where the SingleTone class is defined.
Now, the problem I have is accessing the SingleTone class from the interface.swf file. If I try to send the SingleTone.singleTone. property parameter to the class I get "Type coercion failed: cannot convert from ClassName@.. to ClassName". If I try to access the SingleTone class directly from the interface.swf file i get "Cannot access a property or reference of a null object...". Both errors I get seem logical:
- if I send a parameter, I send the reference to that object, but the interface.swf file does not have access to the assets.swf domain;
- if I try to access the SingleTone class directly from the interface.swf file, I get the null error because the class is not initialized over the interface.swf domain.
Is there any work arround? I know a simple solution may be to initialize the variable over the interface.swf domain, but what if there is a variable that can only be instantiated in the assets.swf? Can I access that variable from another swf, or can I change the ApplicationDomain?
View 1 Replies
Nov 14, 2010
I am trying to load swf file with Loader class into AIR application. The broblem is that the loaded swf can not access web cam (it can when I run it standalone). Is there any security settings I have missed.
AIR loader code:
loader = new Loader(); loader.name = "moduleLoader";loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
[Code]....
View 3 Replies
Nov 23, 2011
In Flash Professional, I drew a shape, converted it to symbol, linked it to class Symbol1 (extends MovieClip) which is generated at run-time, and saved the SWF file as shape.swf.
Now my main application wants to load shape.swf and create multiple instances of Symbol1 but I get ReferenceError when trying to access the class Symbol1.
Below is my main application's code. Errors thrown are mentioned in comments.
public class MovieClipTest extends Sprite
{
public function MovieClipTest()
{
[Code]...
View 11 Replies
Mar 4, 2012
I have a SWf application built in flex 4. One part of the application relies on accessing a public variable ("step1") set at the application root, and is accessed with
var app:Object = FlexGlobals.topLevelApplication;
trace("step one is "+app.step1);
This, while not optimal, has worked fine. Now, hoever, I need to load this entire application into another application, and I can't figure out how to access my step1 variable any longer.I have been loading the swf into the new parent application like so:
public var myLoader:Loader = new Loader();
public var pizzaContainer:UIComponent = new UIComponent();
private var myUrl:URLRequest = new URLRequest("chickensoup.swf");
[code]......
View 1 Replies
Jul 1, 2009
I am creating a flash program to open other flash programs (load swf files), and change their textfields to my own extended textfield class. This is to capture all text written to screen using a textfield object. Here is what I am doing:
1. If a textfield has been created, the event is captured
2. I want to replace the textfield with my own class extending textfield
*3. Any further access to the original textfield for value changes can be captured, and would update the replaced extended textfield object
The problem is if in their original code, at sometime, the text value of textfield is changed (mainly through textFieldObj.text = some_value) , I don't know how to capture this event.
This cannot be captured by event.CHANGE which requires the user input (ie: keyboard strokes) into the actual text field and changing the text through the code: textFieldObj.text = some_value does not trigger the event.
Here is a simplified example:
// FlashMovie.fla START -------------------------------------------
// any DisplayObjects (such as a created textfield) created will be captured
// by ChildAdded()
this.addEventListener(Event.ADDED, ChildAdded);
[Code]....
View 0 Replies
Jul 22, 2009
I have a movie called crime_scene.swf that is loaded onto another swf.
Code:
this.createEmptyMovieClip("myContainer", 1);
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip)
[Code]....
It seems like it's not working. I tried just myContainer.evi_1.onRelease and _level1.evi_1 but nothing seems to work.
View 2 Replies
Jun 30, 2010
I have a file which loads a series of SWFs. It loads one, allows it to play to completion, then stops. Right now, it will just wait for the user to press a button and select the next one. However, I need it to play them sequentially. Is there any way for the SWFs which get loaded to access the functions which control the SWF loading?
View 4 Replies
Jul 14, 2010
Im loading SWFs into my AS3 application. My SWFS are all the same and contain this structure:
root
-item
--color
--overlay
When i load up a SWF file into AS3, This is analogous to the root. So i can say:
[Code]....
I have tried everything i can think of to access this second depth by instance name. Whats wierd is that MovieClip(loadedSWF.item).numChildren returns 2. So Flash knows that theres 2 MovieClips inside of item.... But it just cant reference them by instance name. Since loadedSWF.item works, i assumed that loadedSwf.item.color would work too.
EDIT: I seem to be able to access the MC via getChildAtIndex(0); However this isnt ideal because it create a rule for the designer that he must follow a layering order. Id prefer to do it by name.
View 0 Replies
Nov 23, 2011
In Flash Professional,I drew a shape, converted it to symbol, linked it to class Symbol1 (extends MovieClip) which is generated at run-time, and saved the SWF file as shape.swf.Now my main application wants to load shape.swf and create multiple instances of Symbol1 but I get ReferenceError when trying to access the class Symbol1.Below is my main application's code. Errors thrown are mentioned in comments.
ActionScript Code:
public class MovieClipTest extends Sprite[code].............
View 3 Replies
Jan 12, 2011
I'm having a SWF call functions from another SWF loaded in the first one with the Loader class. There are no problems as long as the target SWF does not contain any TLF TextFields created on stage by authoring time interface. As soon as I place a dynamic textfield on the stage of the loaded SWF, the main SWF (the loader) fails to call any of the functions within the SWF that is being loaded.Static text does not seem to present problems and neither do TextFields created via ActionScript.Also, is it possible to access variables of the parent SWF?
View 2 Replies
Dec 5, 2003
I am having a problem accessing variables in a loaded flash movie.
As my understanding goes (someone please correct me if I am wrong), if I load a flash movie into a parent movie (i.e. 'loadMovie("myMovie", emptyClip);'), I should be able to access the loaded movie's variables using dot-syntax.
As an example, say I have two movies: MainMovie.swf, and SubMovie.swf. SubMovie.swf contains a (global) variable called someText. After loading SubMovie into an empty movie clip called "emptyClip", MainMovie.swf should be able to access the aforementioned variable by saying "emptyClip.someText", right....? Well, when I try this I keep getting an undefined value for the variable.
View 7 Replies
Sep 8, 2008
I'm sorry if this has been answered 1,000 times, but I am so confused with everything!! In the main timeline of my movie, I have a container movieclip called "content". I want to load an external swf into content, and then access the functions in that swf. I can load it no problem, but I can't for the life of me figure out how to access the functions, I can't seem to find it anywhere!
View 3 Replies
Jun 22, 2009
I have 2 swfs, one is main and it loads other file "skin.swf". skin contains object of custom class SkinClass. I can access it from main swf, but when I try to cast that object, the result is null. This happens when I use absolute url, when I load skin from relative url, everything is ok.
View 3 Replies