ActionScript 3.0 :: Loading External Swf Fails With Stage Access?

Mar 2, 2009

My problem is simple and annoying:

I have two swf files, where one (lets call it A) is supposed to load and display the other(B).

The first swf (A) is using the Loader class in AS3 to load the other. In fact the loading code in A is an exact copy of the Adobe example code from the livedocs for Loader.

The other swf (B) just spins some meaninless graphics in a loop, and has a document class that has one line of code in its constructor:

trace("B's stage is: " + stage);

When I start swf A, the loading of swf B starts fine. The progress is reported as traces all the way up to 100% before swf B's constructor is called and the following is traced:

B's stage is: null

THEN the complete handler is triggered (yes. AFTER the constructor was called for B with no stage).

The problem is that I really need B to have a stage for my project to work, as I will actually use stage, instead of just tracing it. I have really tried everything to get this working. Is there no way so soothe B into having a valid stage before its constructor is loaded?

[URL]

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Access Clip On Stage From External Class?

Feb 13, 2009

I've got a textfield on the main Fla called 'debug'i've created a Class which refers to the textfield, but when i launch my fla, it says:1120: Access of undefined property debug.

ActionScript Code:
package {
.....

[code]....

View 9 Replies

ActionScript 3.0 :: Access Elements On The Stage From External Classes?

Nov 19, 2009

[code]Also pass the Stage reference still it not showing any error and text box is also blank,text is embed ed and the code is.[code]If I put import flash. display. List; it shows an error 1172: Definition flash.display:List could not be found.

View 5 Replies

ActionScript 3.0 :: Access A Variable In Stage Through One External File?

Nov 8, 2011

I have one fla called index.swf it import another swf called (home.swf) through addChild()In home.swf, there is a button.i am trying to make this button activate an event in index.swf I tried using root but not worked I tried use stage but neither worked.

View 4 Replies

ActionScript 2.0 :: Loading External Swf To Stage?

Feb 21, 2011

I'm building my brother a flash AS2 website for his construction company....everything is going smoothly up until now where he wants to have a "cover flow" - iTunes album art style gallery to display the images of his work portfolio.

I am building his website COMPLETELY out of flash, from what I know - I'm not pro enough to build the cover flow style gallery myself so I'm looking for a nice external flash gallery that I can modify and load the gallery swf into my main stage / website... or directly place the entire flash gallery into one frame of the main website.

I came across this application called "Gallery Studio" by ijoysoft [URL] that very easily lets you automate flash galleries with your images and you can export it as a single .swf file. IT IS PERFECT! It has something very similar to cover flow and my brother loves it.

Now I've worked with loading external .swf's onto the main stage of my websites before.. but for some reason I cannot load THIS automated swf onto my flash stage. I can't figure out why it wont appear.on the main timeline of the website "AHRENS.fla" frame 252 is where I want the gallery to appear "gallerytest.swf" (gallery automated from the Gallery Studio program) I am using a simple:

loadMovieNum("gallerytest.swf", 400); to call it in.

I get no errors.. and nothing appears.

AHRENS.fla <- flash website file
gallerytest.swf <- automated gallery to place in frame 252 of AHRENS.fla

if I could just figure out this one problem... it will solve all my headache and pain, as I've run into loading external galleries before. Since I work making my website COMPLETELY in flash, making image galleries have always been a problem for me, I have to do them by scratch unless it requires something fancy.like cover flow, where then I look for freeware galleries off the internet but they always require javascript, their own webpage, html, css, divs etc that can't be integrated into my all flash websites. Now that I've found GALLERY STUDIO it is perfect to do special effect galleries..

View 8 Replies

ActionScript 3.0 :: Loading External .swf Onto Stage?

Jan 10, 2011

I am trying to load a photo gallery saved to an external .swf file onto the stage of a website I am building. But every time I run the movie I get this message:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/Users/art.i.choke/Documents/Tracey%20Bones%20Website/gallery.xml
at gallery_fla::MainTimeline/frame1()

The .swf file is located photos/gallery.swf in relation to the site .fla.Here's the code I am using to load the .swf:

var my_Loader:Loader = new Loader();
var my_url:URLRequest=new URLRequest("photos/gallery.swf");
my_Loader.contentLoaderInfo.addEventListener(Event .COMPLETE, finishLoading);[code].....

View 4 Replies

ActionScript 2.0 :: Loading External Jpg To Stage?

Aug 24, 2006

I'm using Flash MX 2004 professional, and actionscript 2.

I'd like to load an external jpg to the stage. I don't need a load bar or anything like that.

View 2 Replies

ActionScript 2.0 :: External SWF Not Loading ON TOP Of Stage?

Aug 7, 2009

"I am new to flash, " and am having a (minor?) problem. I am using ActionScript 2.0.Currently I am having issues with the way my external swf. is being loaded. I am using a MovieClip Loader. I want the external SWF that is loaded into the movie clip holder to be placed on top of the stage and covering everything beneath it. To get a better clue of what I am dealing with you may check URL...- that is what i am working with currently, and if you click the thumbnail image you can see a green box with body text which is loading. however I would like it to load on top instead of below![code]Within the Home swf is another SWF being loaded.URL...

View 3 Replies

Professional :: External Image Loading Into MovieClip On Stage

Oct 18, 2010

I am trying to load an external .swf (actually it is only an image that I published as a swf file, not a complicated movie) but I get errors. I am trying to load the .swf into a movieclip and the movieclip appears on the stage. I have put the code in frame 1 where the image should appear (in the movieclip). The code that I used is below and works fine with a .jpg and when I load it directly on the stage, that is to say, when I put the code in a frame on the stage. Why does it not 'work' right now?

I have added 'parent' in 'parent.event.target.content.y = 200;' in the first frame of the movieclip timeline, to make sure that it will appear on the (main)stage. The error that i get is this one:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at galerie2010_fla::mcBallon1_11/frame1()

This is the code in frame 1 in mcBallon1:
var imageRequest1a:URLRequest = new URLRequest("images/SWFoverig/ballon1_702x368.swf");
var imageLoader1a:Loader = new Loader();
imageLoader1a.load(imageRequest1a);
addChild(imageLoader1a);
imageLoader1a.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete1a);
function onComplete1a(event:Event):void{
parent.event.target.content.y = 200;
parent.event.target.content.x = 205;}

View 2 Replies

Flash :: Loading External SWF W/ Stage Reference In Class

Nov 17, 2011

I'm unable to load forces.swf (assume I can't edit it, as I don't have the source code) through an external swf, due to Stage reference in the base class how would I go about loading it (and any other possible SWF) without errors being thrown?

Here is a link to the problem I am trying to fix:[URL]..

View 1 Replies

ActionScript 2.0 :: Loading External SWF And Masking Stage.width

Aug 10, 2006

I am loading a swf into another swf. The swf I am loading has objects off the stage, and when i load the swf into the other it shows the objects off the stage and screws up my positioning logic. Is there any way to load the swf and hide all the objects that arent on the stage?

View 1 Replies

ActionScript 3.0 :: Loading An External Swf File On Main Stage?

Sep 3, 2010

I m loading an external swf file on main stage which has some links, I want if I click on any of these links the timeline of the main stage should chenge.

View 1 Replies

ActionScript 3.0 :: Loading External SWF With Stage Reference In Class?

Nov 17, 2011

I'm unable to load forces.swf (assume I can't edit it, as I don't have the source code) through an external swf, due to Stage reference in the base class.

How would I go about loading it (and any other possible SWF) without errors being thrown?

Here is a link to the problem I am trying to fix:

[URL]

View 14 Replies

Professional :: Simple MovieClip Fails To Run In New Stage

Mar 17, 2011

CS5. 120fps bottom layer png of car, duration 120frames, top layer png of indicator lights duration 60 frames, run movie lights flash. Select both layers and go Modify>convert to symbol>movieClip. Copy the MC that appears in the library to a new blank file, make that file also 120fps. run movie see car but no lights flash. I have done no coding at all, does it need such to run. It has just what may be created when choosing new file. What I had been doing was putting this MC at the start of a bent line, snapping to the seed point, then 7 secs later (frame 840) placing it at the end of a bent line, snap etc.

Rotated it to match direction of line, created then a classic motion tween, then added a guide layer and put this line (edit copy>edit paste in place) onto that guidelayer at fr1. deleted the original line. Made the MC at fr1 orientToPath. Run Movie and it worked, but no indicators. Thinking the indicator function got screwed up somewhere, I did the test above. Obviously not the MC as a classic tween at fault. Something fundamentally basic I am expecting to work.

View 1 Replies

ActionScript 2.0 :: Huge Lagging - Loading An External .swf File Onto Stage

Jul 24, 2006

I am loading an external .swf file onto my stage. This is the script I am using:

[Code]...

It loads everything great, but it lags so bad when it plays!!! Am I loading everything prperly? The external .swf file is just under 200 kb, but that should be ok, right? there is a way to prevent lagging. maybe a way to ask for more ram from the computer?

View 7 Replies

ActionScript 2.0 :: Loading An External Swf File/movieclip Onto The Main Stage?

Jan 7, 2009

I am loading an external swf file/movieclip onto the main stage - it is a simple transition and once it has finished playing, I want to jump to a frame in the main stage.I've loaded the movieclip onto the stage, but don't know how to jump to another frame after it has played and stopped...what's needs to be added to this to goto a frame on the main stage........

on (release) {
loadMovie("black.swf", holder);
}

View 2 Replies

ActionScript 2.0 :: XML Loading Fails 1st Time?

Nov 13, 2009

I have a flash file that loads 3 straight XML files, one after other.And in every single code I have the sucess condition, like this:

ActionScript Code:
if (success){
doRightStuff();[code].........

Later, I added a function and an Interval to do the verifying:

ActionScript Code:
goBack = function () {
gotoAndPlay("untilItWork1");[code]..............

Didn't work also. Las try was a completely stupid addition: a variable counter that increased it's value 100 times (doing the XML calling and loading everytime), to check if the problem was some delay issue. 5 minutes later, it didn't work also.The second time I load the f**king page, it works like a charm.

View 1 Replies

ActionScript 3.0 :: Loading AS2-Content In Fails

Dec 7, 2010

I have a SWF-Movie written in AS2(I call it AS2-Bridge), which loads another SWF2-Movie. Now if I run the AS2_Bridge.swf everything works fine.But if I load the as2_bridge into the as3-movie - then the as2_bridge fails to load the other content.[code]

View 3 Replies

ActionScript 2.0 :: [OOP] Class Silent - Fails To Fade The MC On Stage

Aug 5, 2006

The following class I've coded fails to fade the MC on stage. Could someone explain why the code fails?

[Code]....

View 1 Replies

ActionScript 2.0 :: Loading 4 External SWFs Into An Empty MC On The Main Stage For Each Of The 4 Projects?

Feb 12, 2010

The problem is this: I am loading 4 external SWFs into an empty MC on the main stage for each of the 4 projects.So you press a button on the main stage for a project, and it loads that specific SWF.These SWFs contain an opening text for each project, a button to "continue" to the gallery, then the text fades out and the gallery loads.That's all within the SWF itself.The SWFs work fine on their own, but the problem is that when I load the SWFs into the empty MC on the main stage, the "continue" button doesn't work correctly The SWFs load fine, it's just the button At first when I pressed the button it would send my main stage back to the first frame, so I thought it was because the AS for the button in the SWF was probably conflicting with the main stage and confusing it. I went back into the SWFs and tagged part of the SWF timeline with the name "togallery" so that when you click the "continue" button, in theory, Flash knows specifically where to go within the timeline of the SWF and not the timeline of the main stage.

That hasn't worked either. The button just doesn't work at all now, at least not when the SWF has been loaded onto the main stage. Again, it works fine on its own. So what can I do? How can I get a button within an external SWF to reference only it's own timeline and not that of the main stage?

View 1 Replies

Flash 10 :: While In Full Screen, Main Stage Resizing When Loading An External Swf

Nov 10, 2010

My main swf is 960x600 and loads full screen. it is a projector or swf, local. I have the code on frame 1 to ensure full screen and show all:

stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.displayState = StageDisplayState.FULL_SCREEN;

Then I load an external swf into a mc, and it goes full screen as expected. BUT the main swf that loaded that external one, at the time of load, suddenly gets scaled back down to its normal size: 960x600, on the top left corner of the Player Window (or the full screen), so somehow at 0,0. Whn I unload the external swf, I can put the code stage.scaleMode = StageScaleMode.SHOW_ALL; to get it back to where it was. But unfortunately I have some buttons from the Main swf that are supposed to be on top of the loaded one, and should stay where they are. But now they all move because of this scaling down.

the mc that is being used as a container for the loaded external swf is an empty mc located at 0,0. The external swf has the same size as the main one: 960x600

I searched and tried things but could not get it to stay in show-all mode when loading this external swf...

View 0 Replies

ActionScript 2.0 :: Loading Named Buttons Onto Stage With Coordinates From An External File

Jan 15, 2005

i have 20 buttons, and i want to design an external file that holds the coordinates for each named button.

how would i go about this, since the external file would be read as a string by flash?

View 3 Replies

ActionScript 2.0 :: Loading Named Buttons Onto Stage With Coordinates From An External File?

Jan 15, 2005

i have 20 buttons, and i want to design an external file that holds the coordinates for each named button.how would i go about this, since the external file would be read as a string by flash?

View 3 Replies

Flash App Loading Crossdomain.xml From App Server Fails?

Aug 2, 2011

I'm writing a web application using three tier architecture. I have three Amazon EC2 ubuntu servers. The first server handles the presentation of the application and includes my main flash file. The second EC2 instance represents my application server. It contains the AMFPHP files and corresponding web services. Finally, the third instance handles persistance and is running a MySQL database. Both the presentation and application servers are running an apache web server. I created security groups specific to each tier such that the presentation layer will accept all incoming traffic on port 80 while the application layer will only accept incoming traffic from the presentation server. This should allow anyone to request my web application from the presentation server but prevent anyone from accessing the web services on my application server.My flash application cannot make web service calls to my application server. When a request is sent, I never receive a response from the server and eventually receive a security sandbox error.[code]It seemed odd that I wasn't receiving a response, so I decided to try a couple of things:

1. I connected to my presentation tier via ssh and attempted to use lynx to connect to my application server's gateway.php. I was able to connect without any problems.

2. I used Chrome's developer tools window to observe network traffic when loading my site. I found that it is attempting to load the crossdomain.xml file (which resides in the root of my web server [/var/www] on the application tier) using a GET request; but strangely, it times out and fails. This is where I am confused. How come I can use lynx on the same machine to connect to the web server on the application tier but yet the flash app can't access the same file?

While running some tests, I decided to open up the application server instance's firewall such that it can receive http requests from my IP. As soon as I did this, the application being hosted on the presentation tier immediately began working (Received a response from the web service)! However, this means I would have to force my application tier to accept http requests from the internet in order to work, which is not something I want to do. I don't understand why making this change would allow the application to grab the crossdomain.xml file. If the application server's security group is set to accept incoming http requests from the presentation security group, it should have no problem acquiring the crossdomain. xml file residing in the web server root of the application server right? I've spent more time than I would like looking into this issue. I really would like to setup a three-tier environment for my application in which the flash application will be able to send web service requests to my application layer. The most confusing part about this is the fact that when I add my computer's IP address to the application server's firewall, everything seems to magically work as intended. Please correct me if I am setting my application up in the wrong way. I am basing my architecture off of the following:URL..

View 1 Replies

Professional :: Flash CS 5.5 - Loading Recent Item Fails

Dec 22, 2011

Flash CS 5.5 (11.5.1.349)
Mac OS 10.6.8

Situation: Work on a file, save it, and close it (example file is stored on local drive). Attempt to reload the file using the recent items list from the splash screen:
File does not load, and output screen message appears:
The following JavaScript error(s) occurred:
Cannot find file /Volumes/users/mt/Desktop/Working Files/TMK2079_HI/Flash/TMK2079_HI-SQ.fla.
This is the file just saved by Flash... and it cannot locate it. I can browse with File > Open, so it is not a critical work loss or stoppage issue, but it is annoying that it happens. It only seems to affect Flash as InDesign, Illustrator, and Photoshop behave as expected with the recent files. It seems to be able to find files saved to a network location, but not to the local machine (in this case a folder on the desktop). I tried renaming the "Working Files" folder to remove the space, but the issue persists. I tried a search but didn't get any hits that seemed relevant.

View 4 Replies

ActionScript 2.0 :: [FL8] If / Else Loop Fails When Loading Variables From .txt File

Jul 18, 2006

I am trying to load two variables from a text file testi.txt Heres my file (test1=here is some text&test2=OK)I have no problems loading test1 -part to dynamic text field but the second variable (test2) is giving me troubles.

[Code]....

View 5 Replies

ActionScript 3.0 :: Flash Resizing And Centering Child Holder On Stage, After Loading External Photo?

Apr 5, 2011

im loading photos of different aspect ratios with a loader onto a child holder frame_mc. I wanted to know what AS3 commands do i need to work on to get the frame_mc to resize to the new childs dimensions and centerize itself on the main stage? (as in event listeners, functions, vars etc)

View 3 Replies

ActionScript 3.0 :: Calling A Function In A Swf With TLFTextField From An External Program Fails

Jul 6, 2011

I have a program A that loads another swf B, and after B is loaded, A will call a function of B.It used to work when B creates a TextField and uses TextFormat, but when I changed to creating a TLFTextField, I got this error:[code]I got Error #1069 again, but when I changed TLFTextField back to TextField, it works again.Test A can now find the function "changeText()" in Test B.

View 8 Replies

ActionScript 3.0 :: Load Data From An External Script (same Domain) Fails

Oct 31, 2009

Below is the script I'm using to pass a parameter to a script in the same server (and folder) as the flash file. It gives "null" as the required variable (use_url) value, instead of what the script is giving. The script itself works, when tested in a browser.

What it should do - it receives a value for "lesson_id" variable, passes it on to a script "movie_url" and receives a response with a new variable "real_url" and it's value.[code]...

View 3 Replies

Flex :: Loading A Module Fails The First Time Load() Is Called, But Succeeds After?

Jul 19, 2011

I have a Button that when clicked loads a Flex module in my AIR application. However,occasionally the Module fails to load the first time the button is clicked, but it works the second time it's clicked. When I debug it in the debugger the READY event is not fired so the remaining logic is never called.

var moduleInfo:IModuleInfo = ModuleManager.getModule(managedModule.url);
moduleInfo.addEventListener(ModuleEvent.READY, function(event:ModuleEvent):void {
trace("ModuleEvent.READY called.");

[code]....

View 2 Replies







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