External swf in powerpoint communicating with eternal xml
Hi there,
I have a powerpoint presentation where I've put a shockwave object with an URL to an external swf, which is infact an application form and is storing data to XML in the same location as swf. Now this functionality works fine in a browser, but now if you imagine that I use powerpoint as a browser and apply the form from there it just doesn't get to the XML on the server.
Are there any security restrictions in powerpoint that don't let data flow from external swf opened in powerpoint ? Is it possible to overcome it ?
you are right the blue thinguy is in fact a bouton in my swf.
i'm still kindof lost tho, i don't quite understand what you means by "move the loader" sorry i'm still a noob at flash and speaking english doesnt help.
here's the full source files with everything if you have time to take a look, it might be easier than pasting chunk of code
source files
Similar Messages
-
Loading external swf, how to deal with errors within the loaded swf?
I have a Flex app that basically lets you browse a bunch of thumbnails that represent swf files, when you click a thumbnail it opens a window that loads the actual swf into an image control. The problem I have is that these swfs can be uploaded by our clients, so they may have actionscript errors being thrown, etc. We can't really predict what they may do. Is there a way I can load these swf in such a way as to ignore any errors that the loaded swf may generate within itself.
For example, one such swf reads some text from a text file to display, but when they are viewing it in this manner the file isn't there so a stream error is generated. My parent Flex app doesn't care about this error and I don't want to see it thrown up in an actionscript error box (I have debug verison loaded on my PC obviously) or interfere with the parent app in any way.
Would application domains help at all? Would it make a difference if I loaded the swf into a separate domain? Or is there some way I can generically trap any error coming from the loaded swf and just ignore them?
Any help appreciated.
Thanks,
MarcusThere is no way to catch errors thrown at random times. Remember that most folks have the release player which does not show error dialogs.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
How can I load an external SWF into a movie clip that's inside other movie clip?
Hi.
I creating my first flash (actionscript 3.0) website but I'm
stuck with a visual effect I want to create.
I have a window on my website called contentWindow. Every
time you click a button this window is supposed to leave the stage,
load the requested content and return to the stage.
The sliding window is a movie clip with 83 frames, 21 to
enter the stage, 21 to leave the stage again, 20 for nothing (its
just to simulate the loading time) and 21 to return to the stage.
Now my goal is, when the user clicks on a navigation button,
the window exits the stage, loads an external SWF with the content,
and then returns to the stage.
I've the "window" movie clip with an instance name of
"contentWindow". Inside there is another movie clip with an
instance name of "contentLoader". The content that the user
requested should appear inside the "contentLoader".
Now, when the contentWindow leaves the stage, I get this
error message:
quote:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at rwd_fla::MainTimeline/trigger()
If I switch
"contentWindow.contentLoader.addChild(navLoader);" for
"contentWindow.addChild(navLoader);" it works fine, but the
external SWF doesn't move with the window.
How can I load an external SWF into a movie clip that's
inside other movie clip?Hi,
Recently, I have been putting together a flash presentation.
And I am just wondering if the following might help you, in your
communication with the said swf file:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onComplete);
function onComplete(event:Event):void
event.target.content.thinggy_mc.y -= 100;
Not the best example, but this allows you to target a mc
within an external swf file. I think if you look up this code, you
will have an answer ;)
Kind Regards,
Boxing Boom -
Runnng external swf Actionscript while in fullscreen mode
I am using Flash 9.0 (CS3 Pro). I am coding in Actionscript
3.0
I have two swf files, both interactive. During playback of
the, a mouse event launches the second. I also want the mouse event
to trigger a switch to fullscreen mode. The second swf is
non-linear and requires user input to jump to the appropriate frame
of the timeline. Everything tests and runs perfectly during
standard screen mode but whenever I try to load and play the
external swf file in fullscreen mode, Flash recognizes the
actionscript built into the original SWF but ignores all of the
Actionscript (this.stop(), this.gotoAndPlay(), etc.) embedded in
the second (external) swf file.
How can I get external swf files to load with their scripted
functionality in fullscreen mode?
Thanks for the help.
Aaron
The code I am using is:
// --- this is the code contained in the first swf file
// function to launch second SWF file
function movieLaunch(event:MouseEvent):void
// Sets display mode to fullscreen. With this line present,
Flash does not look at any Actionscript in ip.swf
// If I comment the below line out, the second SWF plays
correctly and has full functionality
stage.displayState = "fullScreen";
// load and launch second movie (ip.swf) which is located in
the same directory
var request:URLRequest = new URLRequest("ip.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);
// Sets the listener for the button that will launch the
second movie.
launchMovieButton.addEventListener(MouseEvent.CLICK,
movieLaunch);
TextThe keyboard is disabled in fullscreen mode. This may be
causing the problem? -
Layering external swf's by random request on the next level
I would greatly appreciate your help as I have been googling
an actionscript issue that seems quite simple. I want to layer
external swf's using loadMovieNum with a menu located in a main
swf. The current swf must remain as there are some transitions; the
new one should be placed on the top of the previous one. I cannot
use a scale of levels (products for level 1, support for level 2
and so on) as the clicking on the main menu is random.
Thanks in advance.There is a menu which people click randomly, they can click
first on services and then profile, and so on... this menu is
allocated in a main swf that currently calls the requested swf into
a movieclip. My intention is to overlap the swf's called into the
movie clip. Now, the question... should I use levels for this
considering I cannot assign a specific number of level to a certain
swf as people will not click on the buttons subsequently. I hope I
could explain it better.
Thanks. -
Communication with external swf?
hi
im loading in intro2swf with the following
btn_cont2_mc.visible = false;
addChildAt(intro_container_mc, 0);
intro_container_mc.x=-400;
intro_container_mc.y=-300;
stop();
introvisit();
function introvisit ():void{
if (introlevel == 2){
lvlLoader2 = new Loader(); // create a new instance of the Loader class
url2 = new URLRequest("intro2.swf");
lvlLoader2.load(url2); // load the SWF file
intro_container_mc.addChild(lvlLoader2);
now the swf loads correctly and in the correct place however i have a btn on the stage that i wish to hide and at a certain point in my loaded swf i want to unhide the button using an enter frame event
intro_container_mc.addEventListener(Event.ENTER_FRAME, added0);
function added0(event:Event):void {
if (intro_container_mc.currentFrame == 1){
btn_cont2_mc.visible = true;
MovieClip(this.parent).e_mc.cap_talk_txt.text="Stormy";
I need to do it this way so that I can change the text at various points in the story of the swf i can change the text
but whenever i try it, the button will not show or the text change, having problems communicating with swf, i have tried
intro_container_mc.addEventListener(Event.ENTER_FRAME, added0);
intro_container_mc.lvlLoader2.addEventListener(Event.ENTER_FRAME, added0);
intro_container_mc.lvlLoader2.storm_mc.addEventListener(Event.ENTER_FRAME, added0);
all of which have no effect, the animation inside the swf is kept in a movieclip called storm_mc
hope you guys can help me fix this
thanks
fonziohi kglad and thanks for putting my mind at rest as well as keeping me sane
currently trying to remove the children added at this point (or the loaded swf)
but im running into problems, its giving me a lot of displayobject errors when i try to remove child
after the animation has finished and the user clicks the button this should happen
function removelistd():void{
removeChild(loader)
btn_cont2_mc.buttonMode=false;
btn_cont2_mc.removeEventListener(MouseEvent.CLICK, continuey);
btn_cont2_mc.removeEventListener(MouseEvent.MOUSE_OUT, conty2Out);
btn_cont2_mc.removeEventListener(MouseEvent.MOUSE_OVER, conty2Over);
swf2Main_mc.storm_mc.removeEventListener(Event.ENTER_FRAME, added0);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,completeF);
wondering if it is the loader that i should be putting above
have tried swf2Main_mc and loader in all sorts of ways however keep getting this
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at MethodInfo-360()
at MethodInfo-357()
just need help cleaning up and then its done
thanks in advance
fonzio -
Loading External SWF that loads XML
Hey all I have a swf that loads an swf file into that loads pictures from an XML file thanks to Ned Murphy. I have a new problems with it. It works everywhere I try it except on the webserver. When I try it I get nothing. It doesnt seem to load the external SWf file or it may not be loading the XML file. I am not sure why. Has anyone ran into this before ? thanks.
EDIT
It works if I try the SWF from the webserver but when I embed it in an HTML file and run it through a broweser I get nothing.If the swf is is another folder from the html page that embeds it, you probably need to adjust how you target the files that the swf's load.
When you embed an swf file into a web page, anything the swf loads has to be targeted as if that swf is in the same folder as the html page that holds it. So if the html page uses something like "flash/main.swf" to embed the top level swf, then if the top level file loads another swf from that same flash folder it needs to also use the "flash/other.swf" regardless that it is in the same folder on the server. When it's embedded in the page, it's as good as being wherever that page lives. -
Trouble figuring out pathname for embedded swf loading external swfs & xml
I have a swf that loads content from an XML file. This works fine when everything is in the same directory, but I want this swf to appear in several different HTML pages, which are in several different directories and I don't want to have to put 8 different copies of my swf online just so that they load properly. The directory structure is like this:
main_dir:
mod_dirmod01_dirmodcontent_dirmyembeddedswf.html
myflash_dirsub1
sub2:
myflash.swf
myflash.fla (not uploaded to the server)
xml_dir:myxml.xml
I created "sub1" and "sub2" just so that my swf would be the same number of directories downwards as the html has to link upwards, so that when I test the source file, it works. For the HTML, it's embedded like this (using swfobject):
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="800" height="500" id="../../../myflash_dir/sub1/sub2/myflash">
<param name="movie" value="../../../myflash_dir/sub1/sub2/myflash.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../../../myflash_dir/sub1/sub2/myflash.swf" width="800" height="500">
<!--<![endif]-->
<div>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
And inside the Actionscript, I have a URL like this to load the XML:
../../../myflash_dir/sub1/sub2/xml_dir/myxml.xml
Testing the .fla works. But the swf does not work in the HTML. myflash.swf loads, but the loading animation spins and spins, so presumably myxml.xml is not loading. Can anyone see what I'm doing wrong?Durrr, this is not the first time I've answered my own question. Maybe something about trying to explain it to someone else lets my brain make the critical connection.
Anyway, yes it was everything to do with the external SWFs being loaded. My main swf actually loads an xml containing URLs from which to load all of the other SWFs and so I had to update the URLs inside of that, and that fixed the problem.
Sorry for wasting forum space, but maybe this will help someone else out! -
Unable to load external swf which has runtime sharing with another swf.
Hi,
I am getting issues on loading external swf say "importer.swf" file into another swf file say "loader.swf" for second time like
ReferenceError: Error #1065: Variable testSymbol is not defined. VerifyError: Error #1014: Class testClass could not be found.
at global$init()
In the external swf "importer.swf", i am trying to import the symbol "testSymbol" from another swf file say "exporter.swf", which exports through runtime sharing option for the symbols.
I am having some buttons in loader.swf file and on each button click i am loading different swf files into the loader.swf after unloading the previous one.
I am able to load and unload different swf files but unable to load the importer.swf file which is sharing symbols from external swf and that too for the second time i.e., when i click the button twice.
When trying to debug with flash debugger, all the other swf files are being unloaded before loading of another swf but the swf which is sharing symbols/classes with another swf is not getting unloaded.
Output when i am trying to load two files example and importer files into loader.swf file on two different button clicks. On first button click example.swf is loaded. On second button click , example.swf is unloaded and importer.swf is loaded which is successful. On first button click again importer.swf is unloaded and example.swf is loaded. On second button click again, example.swf is unloaded and importer.swf is loaded, here i am getting issues shown above.
Attemping to launch and connect to Player using URL D:\runtime issue\loader.swf
[SWF] D:\runtime issue\ loader.swf - 8181 bytes after decompression
[SWF] D:\runtime issue\example.swf - 441708 bytes after decompression
[UnloadSWF] D:\runtime issue\example.swf
[SWF] D:\runtime issue\importer.swf - 1920 bytes after decompression
[SWF] D:\runtime issue\importer.swf - 441708 bytes after decompression
[SWF] D:\runtime issue\ example.swf - 441708 bytes after decompression
[UnloadSWF] D:\runtime issue\ example.swf
[SWF] D:\runtime issue\importer.swf - 1920 bytes after decompression
ReferenceError: Error #1065: Variable xxxxxx is not defined.
Debug session terminated.
Code i am using
b1.addEventListener(MouseEvent.CLICK, b1Clicked);
b2.addEventListener(MouseEvent.CLICK, b2Clicked);
var ldr:Loader;
function b2Clicked(e:MouseEvent)
if(ldr != null)
ldr.unloadAndStop(true);
ldr = new Loader();
ldr.load(new URLRequest("importer.swf"));
addChild(ldr);
function b1Clicked(e:MouseEvent)
if(ldr != null)
ldr.unloadAndStop(true);
ldr = new Loader();
ldr.load(new URLRequest("example.swf"));
addChild(ldr);
If i try to open the swf using IE, i am not getting any issues at all. But i need to open this loader.swf in a air application. Also when i use loaderContext for the loader instance i am able to get rid of this issue but i cant use it in my application.
So, please help me in resolving this issue.
ThanksI got my answer. I had to append the photo url to the 'movie' value of the javascript embed method. Like this:
<script language="JavaScript" type="text/javascript">
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
'width', '550',
'height', '400',
'src', 'lesson2',
'quality', 'high',
'pluginspage', 'http://www.adobe.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'lesson2',
'bgcolor', '#ffffff',
'name', 'lesson2',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','always',
'movie', 'lesson2?photo=http://www.flash-mx.com/images/image1.jpg',
'salign', ''
); //end AC code
</script>
Thanks,
srb. -
Problem with volume handle and external SWF
Hello I'm having 2 problems.
The first is that when loading an external swf in my main SWF I get this in the output window:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at audio_fla::list_1/frame1()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at audio_fla::MainTimeline()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at audio_fla::MainTimeline/frame1()
But it still works. Its an mp3 player.
The other problem is that the loaded SWF has a volume controller. When I test the external SWF by itself it works fine. When I load it on my main SWF when I start to drag the handle on my volume slider and MOUSE_UP outside the handle it still keep dragging the handle.
The code of my main SWF is:
import caurina.transitions.*;
var _currentCategory:String = "";
var percent:String = "";
var loader = new Loader();
loader.name="videoLoader";
loadermc.visible=false;
cat.addEventListener(MouseEvent.MOUSE_OVER, onOverCat);
cat.addEventListener(MouseEvent.MOUSE_OUT, onOutCat);
cat.addEventListener(MouseEvent.CLICK, onClickCat);
btnback.addEventListener(MouseEvent.MOUSE_OVER, onOverCat);
btnback.addEventListener(MouseEvent.MOUSE_OUT, onOutCat);
btnback.addEventListener(MouseEvent.CLICK, onClickBack);
cat.buttonMode = true;
btnback.buttonMode = false;
btnback.visible = false;
function onOverCat(e:MouseEvent):void{
Tweener.addTween(e.target, {alpha:.5 , time:.5});
function onOutCat(e:MouseEvent):void{
Tweener.addTween(e.target, {alpha:.25 , time:.5});
function onClickBack(e:MouseEvent):void{
loader.unloadAndStop();
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
lcontent.visible = false;
cat.visible = true;
Tweener.addTween(cat, {alpha:1, time:1});
btnback.buttonMode = false;
btnback.visible = false;
cat.buttonMode = true;
toptxt.text = "SELECCIONE UNA CATEGORIA"
function onClickCat(e:MouseEvent):void{
lcontent.visible=true;
cat.buttonMode = false;
Tweener.addTween(cat, {alpha:0, time:1, onComplete:function(){
cat.visible = false;
btnback.buttonMode = true;
btnback.visible = true;
loaderTweenIn(e.target.name);
function loaderTweenIn (c:String):void{
var category:String = c+".swf";
trace(category);
loader.load(new URLRequest(category));
loader.contentLoaderInfo.addEventListener (Event.COMPLETE, movieLoaded);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, movieProgress);
function ioErrorHandler(e:IOErrorEvent):void{
trace("ioErrorHanlder: "+e);
function movieLoaded(e:Event):void{
trace("The movie has loaded");
lcontent.addChild(loader);
loadermc.visible=false;
function movieProgress(e:ProgressEvent):void{
loadermc.visible = true;
// percent=String(Math.floor(e.bytesLoaded / e.bytesTotal * 100)) + "%";
trace("The movie is loading "+Math.floor(e.bytesLoaded / e.bytesTotal * 100));
The code on my external SWF is:
import caurina.transitions.*;
volume_mc.slider_mc.buttonMode = true;
var myXML:XML;
var thb:Thbs;
var myThumbs:XMLList;
var totalThumbs:Number;
var thumbHeight:Number=50;
var i:uint = 0;
var preloader:LoaderAnim;
var yCounter:Number = 0;
var container:MovieClip;
var musicReq:URLRequest;
var music:Sound = new Sound();
var sc:SoundChannel;
var currentSound:Sound = music;
var pos:Number;
var songPlaying:Boolean = false;
var songlist:XMLList;
var currentIndex:Number = 0;
mc_sound.mute.visible=false;
var xmlLoader:URLLoader = new URLLoader();
///////////////////////////PLAYLIST//////////////////
function initMediaPlayer(e:Event):void{
myXML = new XML(xmlLoader.data);
myThumbs = myXML.*;
totalThumbs = myThumbs.length();
trace("The total thumbs are "+totalThumbs);
createContainer();
callThumbs();
xmlLoader.load(new URLRequest("audio.xml"));
function createContainer():void{
container = new MovieClip();
list.ch.addChild(container);
container.y = 0;
container.x = 0;
container.buttonMode = true;
function onOver(e:MouseEvent):void{
var t:Loader = Loader(e.target);
Tweener.addTween(t, {alpha:.5, time:1});
function onOut(e:MouseEvent):void{
var t:Loader = Loader(e.target);
Tweener.addTween(t, {alpha:1, time:1});
function callThumbs():void{
var thumbURL = myThumbs[i].@thumb;
var thumbTitle:String = myThumbs[i].@title;
var thumbDesc:String = myThumbs[i];
trace("Loading "+thumbURL);
trace("Title "+thumbTitle);
trace("Desc "+thumbDesc);
var thumbLoader = new Loader();
thumbLoader.load(new URLRequest(thumbURL));
thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
thumbLoader.name=i;
thumbLoader.x=5;
thumbLoader.y=5;
thb = new Thbs();
container.addChild(thb);
thb.thb_title.htmlText = thumbTitle;
thb.thb_desc.autoSize = TextFieldAutoSize.LEFT;
thb.thb_desc.htmlText = thumbDesc;
thb.y = (thumbHeight+2)*yCounter;
preloader = new LoaderAnim();
preloader.x = thb.x + 20;
preloader.y = thb.y+ 20;
container.addChild(preloader);
yCounter++;
function thumbLoaded(e:Event):void{
var thbx:Loader = Loader(e.target.loader);
thb.addChild(thbx);
thbx.addEventListener(MouseEvent.MOUSE_OVER, onOver);
thbx.addEventListener(MouseEvent.MOUSE_OUT, onOut);
container.removeChild(preloader);
i++;
if (i<totalThumbs){
callThumbs();
if (i==totalThumbs){
startAudio();
xmlLoader.addEventListener(Event.COMPLETE, initMediaPlayer);
///////////////////////////////////////AUDIO//////////////////////////
function startAudio():void{
songlist = myXML.*;;//this is the same as myXML.*;
trace("This is the first song "+songlist[0].@song);
musicReq = new URLRequest(songlist[0].@song);
music.load(musicReq);
sc = music.play();
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
next_btn.addEventListener(MouseEvent.CLICK, nextSong);
prev_btn.addEventListener(MouseEvent.CLICK, prevSong);
pause_btn.addEventListener(MouseEvent.CLICK,pauseSong);
stop_btn.addEventListener(MouseEvent.CLICK,stopSong);
function nextSong(e:Event):void
if (currentIndex < (songlist.length() - 1))
currentIndex++;
else
currentIndex = 0;
var nextReq:URLRequest = new URLRequest(songlist[currentIndex].@song);
var nextTitle:Sound = new Sound(nextReq);
sc.stop();
sc = nextTitle.play();
songPlaying = true;
currentSound = nextTitle;
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
function prevSong(e:Event):void
if (currentIndex > 0)
currentIndex--;
else
currentIndex = songlist.length() - 1;
var nextReq:URLRequest = new URLRequest(songlist[currentIndex].@song);
var prevTitle:Sound = new Sound(nextReq);
sc.stop();
sc = prevTitle.play();
songPlaying = true;
currentSound = prevTitle;
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
function pauseSong(e:Event):void
pos = sc.position;
sc.stop();
songPlaying = false;
play_btn.addEventListener(MouseEvent.CLICK,playSong);
function playSong(e:Event):void
if(songPlaying == false)
sc = currentSound.play(pos);
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
songPlaying = true;
play_btn.removeEventListener(MouseEvent.CLICK,playSong);
function stopSong(e:Event):void
sc.stop();
pos = 0;
songPlaying = false;
play_btn.addEventListener(MouseEvent.CLICK,playSong);
///////////////////////////////VOLUME/////////////////////////////
var xOffset:Number;
var xMin:Number = 0;
var xMax:Number = volume_mc.track.width;
volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_DOWN, sliderDown);
volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_UP, sliderUp);
stage.addEventListener(MouseEvent.MOUSE_UP, sliderUp);
function sliderDown(e:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, sliderMove);
xOffset = mouseX - volume_mc.slider_mc.x;
function sliderUp(e:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, sliderMove);
function sliderMove(e:MouseEvent):void{
volume_mc.slider_mc.x = mouseX - xOffset;
if(volume_mc.slider_mc.x<=xMin){
volume_mc.slider_mc.x = xMin;
if(volume_mc.slider_mc.x>=xMax){
volume_mc.slider_mc.x = xMax;
var vol:Number = volume_mc.slider_mc.x*.01;
var st:SoundTransform = new SoundTransform(vol,0);
sc.soundTransform = st;
trace("The volume is "+vol);
if(vol==0){
mc_sound.mute.visible=true;
}else{
mc_sound.mute.visible=false;
e.updateAfterEvent();I found the solution.
-
Urgent! external swf not loading with swfobject!
hello there,
I have a swf that loads another one into it through an empty
movieclip - When i embed it with swfobject it doesnt appear.
My guess is that i would have to mention the external swf in
the flashvars ... Done that with no success.
Does anyone have an idea of what could be causing me this
trouble?
thanksGenerally the problem will be that the path of all externally
loaded content is relative to the html page, NOT the swf location.
If everything is in the same folder then that isn't it.
Otherwise nice dice is correct, we will need to see your code
to go further. -
Trouble loading external .SWF into my main page with preloaders
Dear All,
I am working on my first Flash project with AS3.
The structure of the flash site is pretty simple. I have a
stage 1165px wide x 710px height
Inside my Stage I have an horizontal bar with a menu followed
by a container right under.
**** My goal
is that whenever I click on one of the button on the menu, that the
related external .SWF loads into
the container with a preloading bar and %. *****
I already did all my .SWF files and it is pretty frustrating
at this point to be stuck at this point of development.
Please help.
-AlexVisit gotoandlearn.com. There is a video tutorial there
regarding preloading that should answer most, if not all, of your
wonderings. -
Trouble loading an external swf file implemented with AS3
I am using Adobe Flash CS3
At first, I tried
swf_mc.loadMovie("//swf file
location");
It gave me
quote:
Warning: 1060: Migration issue: The method loadMovie is no
longer supported.
USE: var l = new Loader(); addChild(l); l.load(new
URLRequest("your url"));.
Well, the given code isn't working at all.
But since it is a migration error, I thought maybe I can just
save it into Flash5 format with AS1. Then it worked with most
external swf files. However, the one I am trying to load is a swf
file with AS3, so my older version swf can't load it at all.
Anyone has any ideas about how to load an external AS3 swf
file?AS3 is a completely different beast than AS1 or 2. loadMovie
was removed from the language.
The answer to your question is two fold. First, Adobe was
kind enough to give us the code when it finds a migration issue.
var _ldr:Loader = new Loader();
addChild( _ldr );
_ldr.load( new URLRequest( "your url") );
Handling progress has also changed. I have a ContentLoader
package on my site that you're free to use that should familiarize
you with the new way that things are done in AS3.
http://sd-dezign.com/blog/?page_id=10 -
Loading an external swf with a loader
I have a .swf that loads different external swf's into
loaders based on what frame it is in. For all but one frame this
works fine. There's no lag, they load quickly and can be interacted
with with no problem. But, for one .swf it gets really choppy. The
swf itself runs fine but once it is loaded into another swf through
the loader the performance really goes down the drain. I guess I am
wondering if anyone has any suggestions or perhaps different
methods I should try. Thanks in advance.It isn't creating it on the fly.
Insert a new symbol and give it the instance name
placeholder_mc. Drag that onto your timeline and scale it so that
it is the exact same size as your external swf. Then just align the
empty movie clip on the stage where you want to align the external
swf.
loadMovie("external.swf",_root.placeholder_mc);
This just tells it "Okay, take this external flash file, and
stick it INTO that empty movieclip" -
Unloading a loaded external SWF with a close button on the external SWF to unload
I have found some discussion on this topic but I am still having trouble getting it to work and was hoping to get some help here.
Here I have a file: http://www.dril-quip.com/test/main.swf
I have: main.swf (a menu) and I have module.swf (content)
If you navigate to Subsea Wellhead Systems/SS-15 BigBore II and click on that I have it load an external swf which covers most of the parent.
So far so good. My problem is unloading the loaded 'Child' swf with the button provided on the loaded 'Child' swf.
below is the code I used to load the file but I cant, for the life of me, find a way to unload it.
var bigboreLoader:Loader = new Loader();
btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
function bigborecontent(event:MouseEvent):void{
var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf");
bigboreLoader.load(bigboreRequest);
stage.addChild(bigboreLoader);
I am certain it requires the Child to communicate with the parent somehow but I am at a loss. If I could get a bit of advice or a link to something deal with this, it would be a big help. I just need to have my links load my modules and the remove them when the close buttong is hit on the loaded swf. I promise I have done searches and I admit I have found asnwers but still they are not working. I found the code below:
Main FLA:
function removeF() {
removeChild(bigboreLoader);
var bigboreLoader:Loader = new Loader();
btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
function bigborecontent(event:MouseEvent):void{
var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf");
bigboreLoader.load(bigboreRequest);
stage.addChild(bigboreLoader);
EXTERNAL FLA:
btnClose2.addEventListener(MouseEvent.CLICK, bigborecontent);
function bigborecontent(myevent:MouseEvent):void {
MovieClip(parent.parent).removeF();
I think I have a misunderstanding of the code. Thanks for any help you might be able to provide.This was the original code I got:
Main FLA: (on AS layer inside DropDownButton Movie Object)
function removeF() {
removeChild(myLoader);
var myLoader:Loader=new Loader ();
page1_mc.addEventListener(MouseEvent.CLICK, page1content);
function page1content(myevent:MouseEvent):void {
var myURL:URLRequest=new URLRequest("page1.swf");
myLoader.load(myURL);
addChild(myLoader);
EXTERNAL FLA: (on main time line of this file)
close_mc.addEventListener(MouseEvent.CLICK, closeMC);
function closeMC(myevent:MouseEvent):void {
MovieClip(parent.parent).removeF();
Main.FLA
myLoader=bigboreLoader (my new loader)
page1_mc=btnbb2 (the button who event will call external swf)
page1content = bigborecontent (name given to SWF being loaded???)
myURL=bigboreRequest (my new URLrequest for bigbore)
page1.swf=moduletemplate.swf (actual address of what I am loading)
External.FLA
close_mc=button that will close external swf
closeMC=movie clip to close?
Maybe you are looking for
-
360View schedule ok, but user can't
BOXI 3.0 In Infoview a normal user can't schedule a webi report, although in 360View the user can schedule the document and can add documents to the map. The following error occurs: An error has occurred: Sorry, you do not have the right to 'Add obj
-
PHP -Mysql image resize and upload
All, Any good ideas, code out there to help me do a PHP MySQL image resize, uploade and display? Thanks for your help!
-
Enterprise Services - Architecture - Interaction with ECC
Can someone please link to architectural docuementation for Enterprise Services which explains how NW PI interacts with ECC?
-
Hide content ID from the Default checkin page.
Hi.. How to hide the default checkin page from the default checkin page. I get a checkin page in my Contribution Folders, where i can checkin items. There i need to hide Content Id. I already have rules and profiles which are working to hide Content
-
Numbers automatically opening all excel spreadsheets
Help! I had to restore all my data recently after getting a new harddrive and now all of my excel documents (Office:mac 2011) are automatically opening in Numbers. I can't figure out how to "turn this off"!!! Steph