ActionScript 2.0 :: Does "_root" Reference The Root Of The External Swf Or The Swf That Contains The External File

Mar 3, 2007

If you load an external swf into a movie and this external file references "_root", does "_root" reference the root of the external swf or the swf that contains the external file?

View 3 Replies


Similar Posts:


Flash :: CS, Reference Root From External Class?

Dec 21, 2010

I made this class and I put it in the same package of Timeline.as (the Document Class):

package {
import flash.utils.Timer;
import flash.events.TimerEvent;
public class Counter2 extends Timer {
public function Counter2(delay:Number, repeatCount:int=0) {

[Code]...

View 1 Replies

From External As File To Root?

Sep 16, 2010

I have my main fla and then I have a actionscript named bullet.as in the bullet.as I create a bullet using "this" throughout the script now how would I call the bullet on my main timeline?

View 1 Replies

IDE :: Loading External SWF As Root File?

Mar 25, 2009

I've been going through online tutorials and so forthand yea I'm still a newb. I have a flash site I'm designing and this is probably a simple answer. I've figured out how to incorporate the external flashes using buttons and loader, please see the script below. The main problem I am having is I want to load my 1.swf file as the main home page. When I load the flash is comes up empty instead of loading the swf file when the flash is first opened. I can use the button to load it back, but how do you get it to appear once the flash is initailly loaded instead of just pulling up a blank page?

Code:
on (release) {
//load Movie Behavior
if(this.home == Number(this.home)){

[code].....

View 7 Replies

ActionScript 3.0 :: Controlling Root And Parent From External As File

Dec 4, 2010

I am trying to create a global function to reuse repetitively. It worked until I moved the function to the external .as file. The problem is with MovieClip(root) and MovieClip(parent). They do not work and cause errors.

[Code]...

View 0 Replies

ActionScript 2.0 :: Load External Swf To Main Flash File As Root And Level0?

Jan 5, 2012

i have 2 flash file,one is mine (the main container) and one is a external swf.i want to load the external swf to my container swf.i write this code in my as2 container code inside the main timeline flash (mine flash) -----first of all i add a movie clip with instance name mc1 to the first layer

Code:
mc1._lockroot = true;
mc1.loadMovie("external.swf");
countdown = function(){

[code]....

i really try to use that code - BUT !!! -> if i use this code the external swf predominant my main swf code and all the rest of my code dosent work (like timer of trace)....

View 7 Replies

ActionScript 3.0 :: Call Root Level Function And Variables From External Loaded Swf File?

Jul 15, 2010

I have small issue in as3.  I am load "mainmenu.swf" file into "main.swf". through loader class. so now "main.swf" is parent "mainmenu.swf" file children how can call "main.swf " variable & function from "mainmenu.swf" .

View 2 Replies

AS2 :: Load External SWF Correctly To Main Flash File As Root And Level0 Using LoadMovie()?

Jan 5, 2012

I have 2 flash files,one is mine (the main container) and one is a external swf.I want to load the external SWF to my container SWF.I write this code in my AS2 container, inside the main timeline flash (mine flash).In the first method, I add a movie clip with instance name mc1 to the first layer:

mc1._lockroot = true;
mc1.loadMovie("external.swf");
countdown = function(){
trace("ok");
}
countdownIt = setInterval(countdown,1000);

This code works fine in most of the cases, but I found many SWFs files that it dosen't work with. These SWFs and work with the following code instead:

loadMovieNum("external.swf",0);
countdown = function(){
trace("ok");
}
countdownIt = setInterval(countdown,1000);

I really try to use that code - BUT !!! -> if I use this code the external SWF predominant, my main SWF code and all the rest of my code dosen't work (like the setInterval() timer).... I want to load the SWF like the second example and still run the setInterval() function.

View 1 Replies

Flash :: Javascript - Embed Completely In HTML Without Reference To An External SWF File?

Mar 18, 2010

Is there any way to embed Flash completely in HTML, without reference to an external SWF file? I ask because I would like to send an HTML file as an email attachment that the recipient will open in a browser and fill out as a form. The last step is that they will copy the result to their clipboard, paste it into a new message, and email it back. I cannot reliably copy to the clipboard with JavaScript because of the security issues, but there are simple Flash apps to add that capability.

I know I could just display the response text (which will be Base64 encoded) to the recipient and have them copy/paste, but it would be nice to provide this small convenience to them. Also, so you are aware, the text is often too large to include in an email using mailto. Yes. This needs to be done via email. The users have slow, occasional satellite email access and no other data connection to the interwebs. To make things worse, I cannot make them install anything. It is a difficult situation.

View 4 Replies

ActionScript 2.0 :: Create A String Then Use It To Reference A Variable In An External Text File

Jan 19, 2011

So i have an external text file organized like this:

/* $file: data.txt */
&title0=Sacrum
&detail0=Detail text for Sacrum
&title1=L5

[Code].....

There are 28 of these 'title' and 'detail' pairs. The 'title' text is to fill a dynamic text box and the 'detail' to fill another dynamic text box depending on which section the user is mousing over.

My issue is getting the text from the file stored into arrays. For my test loop I keep getting undefined as the stored value, and i know it has something to do with converting a string value to object..

var lv:LoadVars = new LoadVars();
lv.onLoad = handleDataLoad;
lv.load('data.txt');
function handleDataLoad (success:Boolean) {

[Code]....

View 1 Replies

ActionScript 3.0 :: Reference Movieclip Instance On Stage From External Class File?

Nov 21, 2010

I've been searching around all afternoon, and am pulling my hair out. 1) I have a movieclip instance on stage (simple graphical element that represents platforms for a hero to run and jump along). I have placed it on the stage with an external class engine.as and in this class it is called myPlatform and is an object of Platforms.as. The movieClip is called platforms and from a trace(myPlatform.name) the instance name is instance3.

2) I am attempting to access the properties of myPlatform in an Enterframe event loop in my character control and collision class (called hero.as)

Basically here is the bit of code I am trying implement within Hero.as :

[Code]...

This all worked when I was writing actionscipt within the FLA file, on the timeline frame 1. I simply don't know how to access myPlatform from within the external Hero.as class! Do I need to create a variable? Is there a really easy way to do this with some syntax/command that I have not learned yet?

View 3 Replies

IDE :: Using _root In External Swf?

Jun 2, 2009

I have an external swf, that is a photo gallery, loading into my main swf. When the external swf loads, everything works fine except when you click on a thumbnail in the external swf, the jpg doesn't load. I have it set up that an empty movie clip is created first, then the jpg is loaded into that. I have a feeling it is something with the fact that I am using _root, but I don't have any guesses whats causing the issue and how to fix it.

Code:
News.onRelease = function(){
if( !this.up ){

[code].....

View 4 Replies

Flash :: Reference The Default `this` Reference In Actionscript3 From An External Package?

Jul 7, 2011

My code is an external .as file. Google provides this code on their demo, which contains the this keyword:

[Code]...

Notice that I have 4 calls to console.log. The first 3 fire, but after the new GATracker statement, the 4th does not fire. I have a feeling that I'm overriding the entire package with the object created from new GATracker when I should be passing a different context. I believe the correct context I should pass is whatever this defaults to when not inside of a package/external file, I assume it references the main stage object.

View 2 Replies

ActionScript 3.0 :: Using An External Class To Reference Functions From Another External Class?

Mar 25, 2010

I have a Main.fla which loads Main.as as its document class. In Main.as I have a public function named "Main" which runs a trace. I also have another .as file called Preloader.as, which also has a public function in it, this one named "Preloader" with simple trace in it. I just cannot figure out how to use Preloader() from the Preloader class in Main() from the Main class. Main.as loads up fine when the SWF loads and traces.

View 10 Replies

ActionScript 3.0 :: External Interface Call Doesn't Work With Function That Is On External JS File

Apr 17, 2012

I am using in AS3 "External Interface ". When I call the JS function that is on the same page as swf everything works fine.

I added a link in the html page to an external JS file, when I move the JS function to the external JS file the website crushes.

I would prefer to have all my JS functions on an external file so I can use them in the future in other project and it also makes it easier for me to update the site.

how to call a JS function that is on an external file from AS3?

View 6 Replies

ActionScript 2.0 :: External Text Files Wont Load Into External Swf File?

May 28, 2007

Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.

View 4 Replies

Load External Files From SWF Root?

Jan 14, 2010

I have been provided with some flash movies/apps to include in a web design that I am doing.  These flash movies load an external xml file.This is failing.The problem appears to be that when the flash movie goes to load the file using a relative directory path, it starts at the very root of the web directory, where the main jsp file is, instead of the where the .swf file is located.[url]...

View 1 Replies

ActionScript 2.0 :: Getting Root To Play In External SWF's?

Sep 6, 2004

I am making a website and there is an empty SWF that is the base for my site. It loads up an external page called the Home page, in that home page are movie clips that are told to .play() with a _root command. What i wanted to know, was how do i get those buttons to play those movie clips inside of itself.

MAIN EMPTY SWF __
|
HOME PAGE SWF (which is loaded into an empty movie clip in MAIN)
|
|__ Fading movie clip (which is inside of HOME PAGE, given a _root.fadewhite.play() by a button inside of HOME PAGE SWF

In short, how do i refer to the movie clip to play that is inside of HOME PAGE SWF which was loaded into an empty movie clip inside of MAIN EMPTY SWF?

View 1 Replies

ActionScript 2.0 :: External SWF Accessing Root Variables

Dec 10, 2007

My flash project is structured as follows, with the nested external swfs being loaded to clip holders using loadMovie():
home.swf
|--sponsors.swf
|--educators.swf

In home.swf, I've defined a text box with instance name contentWindow_txt, and assigned its path to _root.cw_txt. Now, when I type the following anywhere in home.swf:
Code:
_root.cw_txt.htmlText = "testing!";

The dynamic text box contentWindow_txt will display "testing!" when the swf loads. Unfortunately, when I make the same call in sponsors.swf, I get nothing. Is there something about external swfs or variable inheritance I don't know?

View 9 Replies

ActionScript 3.0 :: Accessing Parent Root From External Swf?

Jul 23, 2009

I am able to access main root from an external swf by doing this:

MovieClip(root.parent.root)

but how to avoid getting an error when testing external swf alone? Is there any try catch system I can do to avoid thoses errors?

View 1 Replies

ActionScript 2.0 :: Load An External Swf Into An Empty Mc On The Root?

Mar 20, 2006

I'm working on a site for a friend's art gallery.I have a dynamic html file I'm using to list an archive of shows so that it can be easily updated by the curator.Is it possible to code a link in the externally loaded xml file that will tell my flash movie to load an external swf into an empty mc on the root? is there a way to:

create a variable in AS that when added to the xml file, triggers something like loadMovie("g_0306.swf", "_root.empty"); ?

View 11 Replies

ActionScript 3.0 :: Calling An Object From External To Root?

Sep 16, 2010

I have my main fla and then I have a actionscript named bullet.as.in the bullet.as I create a bullet using "this" throughout the script now how would I call the bullet on my main timeline?

View 3 Replies

Professional :: Loading External Swf Then Going To Frame In Root Timeline?

May 10, 2011

when a button is clicked, I want an external swf to load and play, then I want to go back to a particular frame in the original timeline.

View 2 Replies

ActionScript 3.0 :: Link To External PDF In External As File?

Oct 20, 2009

I've re done a couple of pages on my website and as a result of the new design have had to change some of the coding from being on the timeline to being in an external as document linked to my fla. This is significant only because I can link to external pdf.zips no problem on the timeline but I can't seem to translate the code to the external file. Can anyone out there help me out with this (hopefully) simply problem?I'm playing with different variations of this below but I'm constantly getting the 1180: Call to a possibly undefined method navigateToURL.

function onEnglishClick(event:MouseEvent):void {
var request:URLRequest = new URLRequest("http://www.bigredcreativeconcepts.com/UB_Flyer_English.pdf.zip");

[code].....

View 1 Replies

ActionScript 3.0 :: Setting External SWF Dimensions To Root Stage Size?

May 15, 2009

I am loading the SWF just fine, but I want the SWF to fit the root stage exactly. What happens instead is that the external SWF seems to include white space from around itself.

For example, the author-set width of the Tanks game (an example file I was using) is 550px, but when I set the width of loadEvent.currentTarget.content.width to 550px, the game is resized to maybe 350px width. I have to set the value of loadEvent.currentTarget.content.width to something like 640 in order to get the game itself to make full use of those 550 pixels.

Code:
package {
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;

[Code].....

I have CS4 with AS3. I hard-coded values for cWidth and cHeight instead of getting them from flashvars because I am just testing in the IDE right now. Normally I would get those vars from flashvars.

View 1 Replies

ActionScript 3.0 :: Load An External Swf In A MovieClip Which Is On The Root Of Main Application?

May 18, 2011

I have a ScrollBar with some buttons in it. I need to know how I can load an external swf in a MovieClip which is on the root of main application?

View 3 Replies

ActionScript 2.0 :: Replace Text Loaded From An External File With Text From Another External File?

Nov 9, 2005

How can I replace text loaded from an external file with text from another external file? Using setInterval and calling the .load from a function or something? In the example below I'm calling an external text file, could this also work with an .xml file with cycling through the children?

[Code]...

View 2 Replies

ActionScript 3.0 :: Unload Not Unloading - Unload An External SWF On _root To Load A New One Instead

Jul 23, 2009

I'm trying to unload an external SWF on _root to load a new one instead. I've tried (almost) everything but can't figure it out... I get this error : "Error #1010: A term is undefined and has no properties."

[Code]....

View 3 Replies

ActionScript 1/2 :: How To Reference To External SWF

May 30, 2011

I'm new round here so sorry to open with a question. Flash isn't my area  of expertise at all, but if anyone needs help with Photoshop or Joomla then I might be able to help! Anyway - my problem. I had a SWF which interacts with a component SWF. I want to remove the  component and replace it with an external SWF. I've created a SWF which  contained only the component. I'm then loading that using the following AS2 code:

Code:_root.createEmptyMovieClip("my_ssp", 1);
container._x = 0;
container._y = 0;

[code]....

View 6 Replies

ActionScript 2.0 :: External Reference Of PPT Or PDF?

Jul 18, 2008

I'm working on a project for a client who wants to embed a 37 page Power Point presentation in a Flash application. Based on past history, I am 100% certain that this client is going to be making changes to this down to the last minute (adding pages, changing copy, removing pages, etc.) so I thought that it would be best to externally reference the whole thing if possible. I was further thinking that the easiest thing to do would be to just export the whole presentation as a PDF and use that. So I'm wondering if anyone knows of a component of some sort that we could purchase that would allow viewing a PDF internally inside an interface, kind of like how you can preview books onI know that we can go out and grab the PDF using code like this:

ActionScript Code:
getURL("myFolder/myPDF.pdf", "_blank");

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved