Load .swf help. Loaded clip loses file locations?
Hi,
File A is a .swf loader
File B is the loaded .swf
File C is the xml file for File B
I am trying to have file A - load in file B and then have its xml load from C.
They all sit in the same folder, but it is not working
I can load file B up and it reads it's xml no problem.
A loads in B but then B cant find C?!
If this was AS2, I would just _lockroot on B to solve it. Any work around for AS3 for this? Or any tricks I can do to fix this?
B is a client .swf that I dont have access to, it may be using global varriable or such for its xml load I dont know. (pano.swf)
A is using simple .swf load code ->
var req:URLRequest = new URLRequest ("pano.swf");
var loader:Loader = new Loader();
loader.load(req);
addChild(loader);
(B) pano.swf loads fine into (A) and gives me output saying so, but it cant find its pano.xml file when loaded into A.
If I open up B as an .swf, it loads C fine.
Similar Messages
-
Feature Request: Pass parameters to loaded SWF through Loader
I would like the option to add parameters (similar to
loaderInfo.parameters) when loading an SWF with Loader.load().
These parameters will then appear in loaderInfo.parameters in the
loaded SWF.
You might ask, why not just append them as a query string to
the source URL? The answer is: doing that means the loaded file has
a unique URL and this defeats browser caching. The SWF might
already be in cache, but it will be forced to re-download because
the url has some query variables appended. Instead, I should be
able to pass these invisibly to the loaded SWF.I don't think there is any way to get it in
loaderInfo.parameters.
I see, you want to get the variables available before the
child constructors complete. I don't like telling people how they
should practice their app design, but have you considered placing
the code instead in public methods and manually calling them after
loaderInfo.complete or loaderInfo.init? I believe that would be
expected design in this case. However, I agree that vars available
on load are nice.
You might be able to use loaderInfo.progress to find a point
at which the movie is sufficiently loaded to add properties to it
but the constructors have not fired, and in this way you might be
able to accomplish what you want. I doubt it will be the case -- it
wasn't possible in AS2. It's worth some investigation though.
HTH -
Accessing parent variables in externally loaded swf - Help please
I thought I knew how to do this, but maybe someone might be able to see why this is not working...
here's what I have (simplified to only show necessary code):
Main Timeline:
var currentItem:String = 'applesauce';
(then some code to load an external swf)
External swf main timeline:
trace(currentItem);
it returns "undefiend"
i have tried
trace(MovieClip(root).currentItem);
trace(MovieClip(this.parent).currentItem);
each time undefined, any ideas?movieClip(parent.parent)
supposedly ... didn't work for me ... but it was explained the 1st parent reference is the loader .. the second the maintimeline ..
if your loading it into a MC .. add an additional parent ref .. -
Help with Listener.ora file location on Suse Linux
Hi
Ok, 2 scenarios
Scenario 1
Installed Oracle 10.1.0.3.0 on Suse 9.2, the location of the listner is: /oracle/dborafiles/application_name/instance/admin/netadmin/
Which is great, as this is where i want the listener and tnsnames.ora files to be under.
Scenario 2
Installed Oracle 10.2.0.1.0 on Suse 9.2 (using exactly the same method for doing the above instllation), and for some odd reason, the location of Listner and tnsnames.ora files are under:
/oracle/dboracle/orabase/product/10.2.0.1.0/network/admin/
This is the wrong location for me, I want the listner and tnsnames .ora files to be under same like scenario 1.
2 Questions:
Q1: why the listener.ora and tnsnames.ora files are diffrent location in Scenario 2 comapred to Scenario 1.
Q2: How do I correct it.
Note: the TNS_ADMIN in .profile is exactly the same for the above 2 installations, changed the applciation name and sid offocure, but all the same:
TNS_ADMIN=/oracle/dborafiles/applicatio_name/instance_name/admin/netadmin
export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH
Can someone please help?For a long time now, the tnsnames and listener files have been placed in the ${ORACLE_HOME}/network/admin by default. That is the location that the installer will create these files in.
Don't know why 10.1.0.3.0 install created the files in that folder. That is not the default behaviour in versions prior to this and versions after this.
Check the settings of the environment variables that were in effect at the time of 10.1.0.3.0 install. -
Arranging Layer Position of Loaded SWF or Mc in ActionScript3
Hi All
I would like to RUN/LOAD my loaded SWF or Movie Clips BEHIND some existing Masks already designed in a scene or simply arrange their
visibility position in ActionScript 3 while loading them with CODING only
is there any command to define, something similar to "Layers", "send to back", "bring to front " ?
Thank You .You can use the addChildAt() method to place things behind other things. You can also use the setChildIndex() method. Both are explained in the Help documentation.
-
Is it possible to load content into a loaded swf?
I'd like to access a loaded SWF and load images/videos into it and trigger functions inside the loaded *.swf.
Is this possible ??Yes, see the "Chromeless..." examples in the Example Player sample app. The basic idea is that you subclass SWFElement and map the SWF's API into the MediaElement API, so that your SWFElement subclass can be handed to a MediaPlayer, integrate with compositions, etc.
-
How to load swf into a movie clip?
i have an swf file i want to load into a movie clip within my
flash file, i think im supposed to use loadmovie () instead of
loadmovienum, can anyone help me out? thanksloadMovie("X",Y);
Where x is: the url of the swf file you want to load.
Where y is: the name of the movieclip you want to load it
into. You must give the movieclip an instance name.
For example, if I wanted to load '1.swf' into a movieclip
with an instance name of "loaderclip," my code would be:
loadMovie("1.swf", loaderclip); -
Is it possible to load SWF files from an SQL database?
Hi all, I am very new to flash (I am primarily a C'# developer!) and I have been asked to investigate the possibility of doing the following;
Create an application that allows swf files to be uploaded and stored inside of a SQL database as binary data (Why a database is a long story!)
Allow this binary data to be extracted via a http request to be dynamically loaded inside of a web page.
Now the first part was easy. I have all of my swf's uploaded and stored inside of the database. I have code that can make a request for the binary and write it to the response, so far so good. Now this is where I am stuck.
I thought I could dynamically load the swf binary data by creating a very basic swf that simply contains a movie clip holder and for now a simple loadMovie statement. My idea being that I can could provide a url for the loadMovie statement that returns the swf binary data. This is where I have ground to a halt.
I can see the call being made from the swf, I can see the data being returned but I cannot get it to render. I remember seeing an article some time agao where someone stated that they had used this method with success but I cannot find now. Has anyone ever done anything like? Is it even possible? Am I missing something simple?
I have tried to return both the raw binary data and also used response.write but to no avail. Can anyone help?You are possibly trying to load AS3 swf into an AS2 Container at least the use of loadMovie() points in that direction. Be sure to use AS3 and target at least Flash 9 in your Loader/Main.swf. Also the AS3 concept of how to load swfs differs a lot from the old concept.
Look into the docu:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Loader.ht ml
But the biggest Problem seems to me -what you mentioned- that Loader needs a (defined) URLRepuest and since your swf files have no "real" URL and you surely don`t want to let the user directly write to your server, a workaround would be to write the BinaryStream with AIR-functionality to a local installlation directory and load it then from there. -
Color external loaded swf in AS3 Help Urgent!
Hi i have loaded swf from an external path using the following command.
var cviewer:Loader=new Loader();
var curlRequest:URLRequest=new URLRequest("clipArts/"+evt.target.name);
So this is the scenario.
Suppose say i load Movie1.swf
I have three movie clips inside Movie1.swf called step0, step1, step2
I need to change the color of step0, step1 and step 2 from the parent flash file which loads movie1. All the inner movie clips color may be different from each other.
I am able to change the color of the whole movie clip by using
var colorInfo:ColorTransform = cviewer.transform.colorTransform;
colorInfo.color=evt.target.selectedColor;
cviewer.transform.colorTransform=colorInfo;
But not of individual ones. I even tried cviewer.step0.transform.colortransform and other stuff to see if it would work. But nothing worked. Help at fastest would be deeply appreciated.
Regards and thanks in advance.try:
var colorInfo:ColorTransform = MovieClip(cviewer.content).step0.transform.colorTransform;
colorInfo.color=evt.target.selectedColor;
MovieClip(cviewer.content).step0.transform.colorTransform=colorInfo; -
Moving the timeline from a loaded swf file
Hi,
I have been at this problem for awhile now.
I have a two swf files, whic are loaded using ths code as an example:
stop();
var req:URLRequest = new URLRequest("Enchilada_A.swf");
var loader:Loader = new Loader();
function imageLoaded(event:Event):void {
ldContainerB.addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(req);
The first one is triggerrd by a MC button that is on the timeline.
That first swf loads fine.
At the end of that file(which is short animation)
I have code that says:
MovieClip(parent).gotoAndStop("frameThree");
I have also tried:
MovieClip(root) and
if (movie Clip is parent) {
MovieClip(parent).gotoAndStop("frameThree");
and/MovieClip(parent).nextFrame();
I have also tried placing this. or root. into the code.
I am not talking to the timeline from this swf file.
Once the timeline moves to the next Frame the new swf file can load.
My solution was to combine both swf files into one, which loads from the timeline button.
It works and I can gt by but I really woud like to learn how to load a swf and talk to the timeline fro more flexibilty.
I'm out of strategies.
Is my code in the wrong place(at the last frame of the animation?
Should it be written on the timeline by creating a new var that has a function once the animation is completed.
Any suggestions and/or commens would be greatly appreciated.
Thanks.Thanks,
I finally had a chance to get back to this project and used your suggestions, whichare definitiley helpful. I also, created a new and very basic version of the project so I could easily see what was happening.
This is the code that works:
stop();
MovieClip(parent.parent).nextFrame();
trace(container_mc);
I'm still trying to understand how the child parent relationship is working but this will get me going in the right direction. -
Bitmap Font gets blurry when its swf is loaded into a movie clip
I have a gallery i'm working on, located here:
http://www.stationarynotes.com/portfolio/Gallery.html
If you click the first button (the one that looks like a
splattered "S" in black ink) you'll see that my bitmap text gets
rendered all blurry. That swf which is being loaded renders fine
when I test it by itself. The text is positioned with whole numbers
and aligns to the grid within its own swf, and the movie clip which
receives it is also positioned with whole numbers. Do you think
perhaps when it is loaded into another MC it is being pushed off of
the grid somehow...? I'm really confused.
I can post my .flas if that'll help.bitmap fonts look best when positioned on a whole pixel
number (100.0 instead of 100.4 for example).
If you are loading into an empty clip - try placing that clip
on the nearest whole number. or you
could load the external swf to a level with will position it
at 0,0 (upper left corner of stage).
--> **Adobe Certified Expert**
--> www.mudbubble.com
--> www.keyframer.com
Scruffpuff wrote:
> I have a gallery i'm working on, located here:
>
http://www.stationarynotes.com/portfolio/Gallery.html
>
> If you click the first button (the one that looks like a
splattered "S" in
> black ink) you'll see that my bitmap text gets rendered
all blurry. That swf
> which is being loaded renders fine when I test it by
itself. The text is
> positioned with whole numbers and aligns to the grid
within its own swf, and
> the movie clip which receives it is also positioned with
whole numbers. Do you
> think perhaps when it is loaded into another MC it is
being pushed off of the
> grid somehow...? I'm really confused.
>
> I can post my .flas if that'll help.
> -
How to load multiple swfs to my main flash file??
I am using the following code
In actions for Frame 1:
var myrequest:URLRequest=new URLRequest("A.swf");
var myloader:Loader=new Loader();
myloader.load(myrequest);
img1.addEventListener(MouseEvent.CLICK, clickButton);
function clickButton(event:MouseEvent):void{
stage.addChild(myloader);
img1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
gotoAndStop(13);
In action for Frame 13: (img2 is another button)
img2.addEventListener(MouseEvent.CLICK, unloadFunction);
function unloadFunction(event:Event):void{
stage.removeChild(myloader);
This code works perfectly fine. My only problem is, How do I get multiple swf loaded. When I tried to copy and paste the same code for the other swf, but the following errors appear. I'm pretty sure theres a way to have multiple swfs (btw the multiple swfs will be linked from different frames).
Scene 1, Layer 'PAGES!', Frame 2, Line 7 1021: Duplicate function definition.
Scene 1, Layer 'PAGES!', Frame 2, Line 2 1151: A conflict exists with definition myloader in namespace internal.
Scene 1, Layer 'PAGES!', Frame 2, Line 1 1151: A conflict exists with definition myrequest in namespace internal.
Can someone please help me with this. ThanksYou define the same variable or function names more than once in a file. But you can reuse them in other frames. Try something more like the following in frame 2....
myrequest=new URLRequest("A.swf");
myloader.load(myrequest);
leave all of the rest out for starters... the same function from frame 1 can be re-used without rewriting them. I don't know what the deal is with img1, but if you need to change what it does, then add that back in. -
Loading flat files located on a server using the Control Center piece ofOWB
Loading flat files from a server with OWB
I am successful loading files with OWB, as long as they resided on my workstation in the C:\ drive. I copied the files to a Linux server into directories owned by Oracle/oinstall, permissions on the directories containing the files are 777. I ran the OWB client from the server with the following results:
Error
RPE-01013: SQL Loader reported error condition, number 1.
SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 9 11:15:58 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-500: Unable to open file (/u00/data/owb_repos1/state_codes.csv)
SQL*Loader-553: file not found
SQL*Loader-509: System error: The system cannot find the file specified.
SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 9 11:15:58 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-500: Unable to open file (/u00/data/owb_repos1/state_codes.csv)
SQL*Loader-553: file not found
SQL*Loader-509: System error: The system cannot find the file specified.
I tried to load the file using the control center from both the windows client and the server client. Can I do this from either one?
I can't import the file in the Design Center from the /u00/data/owb_repos1 directory, it does not show up.
If anyone has received similiar errors from OWB, please tell me how I can fix this. THANKS!!!
[d97886@owbtest owb_repos1]$ pwd
/u00/data/owb_repos1
[d97886@owbtest owb_repos1]$ ls -la
total 24
drwxrwxrwx 2 oracle oinstall 4096 Mar 19 12:14 .
drwxrwxrwx 18 oracle oinstall 4096 Mar 6 16:41 ..
-rwxrwxrwx 1 oracle garrett 1481 Mar 8 07:32 state_codes.csv
[d97886@owbtest owb_repos1]$Hi
This is what i do for my flat files (i am loading my tables from the flat files):
1) Create location for the files in OWB and it should look something like \\path_to_where_the_files_are. Here you should be able to browse to your Linux box and select the location of the files.
2) Then check whatever you use (i use TOAD) and you should see in owb schema a directory created there which points to the location of the flat file.
3) then just follow the guide to sample the files etc and you are good to go.
Basically OWB has to be able to see the files that are on Linux machine.
Alternatively you can map your Linux share to your windows box (use samba or something) and use it that way.
Sorry if it is stating the obvious.
Hope this helps
Kind Regards
Vix -
Problem loading swf which reads data in a local file
Hi,
Using flex with a online project, I have to load a swf file, which reads data in a xml file (it works fine if I open it with flash player)
I do a very simple test :
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
minWidth="955" minHeight="600"
>
<mx:SWFLoader id="swfloader" source="data/player.swf"/>
</mx:Application>
The result is that player.swf can't read the xml file (error : Error #2044: ioError non pris en charge : text=Error #2032: Erreur de flux. URL: enonce.xml).
I do the same test with an AIR project, and it works fine !!!!
It works also if I put the xml file directly at the same level as my compiled application (in bin-debug for instance).
I think that it's a path problem, but I don't know how to set it.
Is there any way to solve the problem ???
Thanks a lot !
OlivierHi,
Thanks for your answer, but I am not sure to understand it.
What code I have to adjust :
- the code of the swf I load ? It's a problem because I don't have access to the source code : my customer provides me only a swf file (with the xml file), and I have a lot of others swf files that work the same way, I can't ask him to modify everything.
- the code of my application ? I don't really see how to use LoaderUtil.createAbsoluteURL, because when I debug, I see in the SWFLoader code that when this method is called, the returned url is good !
Thanks for your help.
Olivier -
Controlling a Movie Clip on the Main Timeline from a loaded SWF?
Is it possible to control a MovieClip on the main timelne from another loaded clip?
I see posts that control loaded clips, but most are all from the loader in the main timeline. I have a moviclip on the main timeline that I want to make visible or invisible depending on what keyframe is playing in another loaded swf.
If I try to call the movieClip from the loaded SWF I get "error #1119. Access of possibly undefined property...." because it doesn't exist in the loaded SWF, just the main timeline.
The old AS2 way just used "_root". Since "_root" doesn't exist any more, how do you control items on the main TimeLine from a loaded SWF?I am not clear what you mean because you are saying you are trying to target a movieclip that does not exist where you are trying to target it.
Try using a trace to see what you are targeting when you you target the MovieClip(parent.parent)....
trace(MovieClip(parent.parent));
The other approach I mentioned earlier is the more OOP-correct approach if you would rather try that way. Here's a rough outline of it...
AS3 - Dispatch Event
http://forums.adobe.com/thread/470135?tstart=120
Example:
Add something to trigger the event in the child (your loaded swf):
dispatchEvent(new Event("eventTriggered")); (
if dispatchEvent problem, see: http://www.kirupa.com/forum/showthread.php?p=1899603#post1899603)
In your loading/parent swf, listen for the complete event on the Loader.contentLoaderInfo. In the complete event handler, add a listener for the event on the loaded swf.
// event handler triggered when external swf is loaded
function loaderCompleteHandler(event:Event) {
MovieClip(event.currentTarget.content).addEventListener("eventTriggered", eventHandler);
function eventHandler(event:Event):void {
trace("event dispatched in loaded swf");
// this is where your main file can set the visible property of your movieclip
Maybe you are looking for
-
How to connect HP Officejet Pro 8610 to a Laptop that's not connect to the internet
Just bought the HP Officejet Pro 8610 all-in-one for the local Historical Society. Neither the laptop nor the printer will be connected to the Internet. The printer will only be used for printing reports, scanning images, etc. I have just removed the
-
Does not display contents of the "Recents" tab in Phone app.
Hi I've been having trouble recently with the tab in the Phone app called "Recents". In this tab, phone calls made and received should be listed according to date, but NO call, received or called is listed in this tab, what could be the cause of this
-
Hi everyone. I just got Premiere Pro CS5 and started the program and opened up an old project I had edited using Premiere Pro CS3. Premiere Pro CS5 said it had to convert the project for editing in CS5. I clicked "okay" and the project opened up in C
-
Export MPEG2 from Final Cut, HDV for use it on PC platform
My client needs to upload the videos in a PC network, he asked me to deliver the final videos on MPEG 2. I have tried to export by using compressor but the clips come out without sound. How can I have the videos with sound and in MPEG 2? Or is there
-
In the report getiing two lines per each service order
Hi Experts, when I drill down callouts on back reporting level by Component code, Reason code, and action code. I see two lines per service order. I have two records in MP for the same service order. Is there any possibility that I get only one recor