Problem with external swf loading
this is the code I'm using that works
onClipEvent(load){
this.loadMovie ("2.swf", "b");}
Text
and when I use another swf to load, it won't work anymore.
Any help would be apreciated
you can't decrease the total time it takes for you external swfs to load. you can start those swfs loading in the background (while on frame 1, for example) but you need to be careful to preload only 1 swf at a time and not restart its download if it's already been started.
Similar Messages
-
Problem with Error 5005 and with external SWF loading
I am creating a relatively simple 10-12 minute animation. I've broken the animation into 34 different movie clips that I control on the timeline by using a timer delay.
When I try to export them all together I get the error:
",Line 1: Error 5005: Unknown Error optimizing byte code."
However, when I split the presentation into two halves with the same exact frames and code I don't have the problem.
I thought loading an external SWF at the end of the first movie would be a good way to connect everything. However, the SWF continuously loads and won't play through the way it looks when you open the actual SWF file.
This is my code for the external loading:
var xpos:Number = 0;
var ypos:Number = 0;
var swf:MovieClip;
var myLoader:Loader = new Loader();// create a new instance of the Loader class
var url:URLRequest = new URLRequest("aamc-2e-slide1.swf");// in this case both SWFs are in the same folder
myLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);
myLoader.load(url);
function doneLoading(evt:Event):void
trace("doneloading");
swf = MovieClip(myLoader.content);
stage.addChild(swf);
swf.stop();I have the same/similar issue whether the stop is there or not.
Yes, it is all on one frame.
Without the stop, the SWF just continously loops on top of itself. -
Problem with external .swf, please help
Hello.
I'm new here so cheers to all. Sorry if I chose wrong forum for posting this question.
I'm newbie in Flash and started building flash website with some tutorial. Now, I built navigation and content with this lines of code:
var myMenyArray = [najave, onama, asesoar, kontakt, ponuda, klub, arhiva];
for each (var btn in myMenyArray){
btn.addEventListener(MouseEvent.CLICK, onBtnClick);
function onBtnClick(event:MouseEvent):void{
pages.gotoAndStop(event.target.name);
and then added this one for loading .swf
var Xpos:Number = 150;
var Ypos:Number = 180;
var swf:MovieClip;
var loader:Loader = new Loader();
addChild(loader);
function btnClick(event:MouseEvent):void {
removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
galerija.addEventListener(MouseEvent.CLICK, btnClick);
Now, my gallery loads when I press "Galerija" in navigation like I wanted, but when I want to show Home or some other content from the nav bar, gallery.swf still appears in front of content.
Can anyone help me with this? It's probably eas, I don't know, but I spent a whole night trying to fix that and I'm here now like last chance.
Hope that I've explained right my problem.
Thanks anyone who can answer me.
Cheersuse:
var myMenyArray = [najave, onama, asesoar, kontakt, ponuda, klub, arhiva];
var loader:Loader;
for each (var btn in myMenyArray){
btn.addEventListener(MouseEvent.CLICK, onBtnClick);
function onBtnClick(event:MouseEvent):void{
if(loader){
removeChild(loader);
loader=null;
pages.gotoAndStop(event.target.name);
var Xpos:Number = 150;
var Ypos:Number = 180;
var swf:MovieClip;
function btnClick(event:MouseEvent):void {
if(loader){
removeChild(loader);
loader=null;
loader = new Loader();
addChild(loader);
var newSWFRequest:URLRequest = new URLRequest(event.target.name + ".swf");
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
galerija.addEventListener(MouseEvent.CLICK, btnClick);
And for every frame stop(); where content should load.
My gallery .swf is in the same folder with this .swf. -
Problem with module lazy loading in flex 3
Hi every body!
I have some problems with Module lazy loading. I am using flex 3.5, Module-flex3-0.14, parsley 3.2.
I can't get the LazyModuleLoadPolicy working correctly.
In my main application (the one that loads the modules), my parsley context is the following:
<cairngorm:LazyModuleLoadPolicy objectId="lazyLoadPolicy" type="{ OpenViewMessage }" />
<cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }"/>
<cairngorm:ParsleyModuleDescriptor objectId="test"
url="TestModule.swf"
applicationDomain="{ClassInfo.currentDomain}"
/>
And to load my module:
[Inject(id="test")]
[Bindable] public var test:IModuleManager;
<core:LazyModulePod
id="moduleLoader"
moduleManager="{test}"
moduleId="testModule"
/>
with LazyModulePod.mxml:
<mx:Canvas
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:module="com.adobe.cairngorm.module.*"
xmlns:parsley="http://www.spicefactory.org/parsley">
<mx:Script>
<![CDATA[
import com.adobe.cairngorm.module.ILoadPolicy;
import com.adobe.cairngorm.module.IModuleManager;
[Bindable]
public var moduleId:String;
[Bindable]
public var moduleManager:IModuleManager;
[Bindable]
[Inject(id="lazyLoadPolicy")]
public var lazyLoadPolicy:ILoadPolicy;
]]>
</mx:Script>
<parsley:Configure/>
<module:ViewLoader id="moduleLoader"
moduleId="{ moduleId }"
moduleManager="{ moduleManager }"
loadPolicy="{lazyLoadPolicy}">
<!--<module:loadPolicy>
<module:BasicLoadPolicy/>
</module:loadPolicy>-->
</module:ViewLoader>
</mx:Canvas>
OpenViewMessage.as in a swc:
public class OpenViewMessage
private var _moduleId:String;
private var _viewId:String;
public function OpenViewMessage(moduleId:String, viewId:String)
this._moduleId = moduleId;
this._viewId = viewId;
public function get viewId():String{
return _viewId;
[ModuleId]
public function get moduleId():String
return _moduleId;
In another flex project, my module context is:
<mx:Object
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:controler="com.cegedim.myit.controler.*">
<controler:WindowControler/>
</mx:Object>
The module implements IParsleyModule
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
implements="com.adobe.cairngorm.module.IParsleyModule"
xmlns:spicefactory="http://www.spicefactory.org/parsley">
<mx:Script>
<![CDATA[
import org.spicefactory.parsley.flex.FlexContextBuilder;
import com.adobe.cairngorm.module.IParsleyModule;
public function get contextBuilder():ContextBuilderTag
return contextBuilderTag;
]]>
</mx:Script>
<spicefactory:ContextBuilder id="contextBuilderTag" config="{ MyITTestModuleContext }"/>
<spicefactory:Configure/>
</mx:Module>
and the WindowControler:
public class WindowControler
public function WindowControler(){}
[Init]
public function initialize():void
Alert.show("Module Initialized");
[MessageHandler(scope="local")]
public function openViewMessageHandler(message:OpenViewMessage):void
Alert.show("Opening view " + message.viewId + " in the module " + message.moduleId);
If i uncomment the basicLoadPolicy in LazyModulePod.mxml and remove the lazyModuleLoadPolicy, everything works fine. The module is loaded when it's added to stage and it receives correctly messages dispatched to it. But with the lazy policy the module never loads.
I may have missed something or there is somthing i don't understand because i tried the ModuleTest provided in example in cairngorm sources. It works fine (i mean loading the moduleA2 when receiving a message), but if i replace the change the lazyModulePolicy to listen to broadcasted messages instead of a pingMessage, the module never loads too.
<cairngorm:LazyModuleLoadPolicy objectId="lazyLoadPolicy" type="{ BroadcastMessage }" />
<cairngorm:ModuleMessageInterceptor
type="{ BroadcastMessage }" moduleRef="moduleA" />
public class BroadcastMessage
public function BroadcastMessage()
If someone has any clue, i'll be happy to test it =)
Thanks.Hello, back on my issue, i tested a little bit more the message dispaching.
I read the lazyLoadPolicy class and noticed that it always has to have a ModuleId property in the message to work, that's why the broadcast message didn't work to awake the module with the lazy loading policy.
So i added copy of my module:
<cairngorm:ParsleyModuleDescriptor objectId="test"
url="TestModule.swf"
applicationDomain="{ClassInfo.currentDomain}"
/>
<cairngorm:ParsleyModuleDescriptor objectId="testbis"
url="TestModuleBis.swf"
applicationDomain="{ClassInfo.currentDomain}"
/>
Set them both with a basicLoadPolicy, and tries to dispatch a message to only one of them using the ModuleId metatag. I then noticed that both modules received the message and not only the one i expected.
I then changed the ModuleMessageInterceptor configuration to dispatch to only one kind of module:
<cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }" moduleRef="test"/>
and this worked as expected. Only the first module catched the message. I am obiously messing with the ModuleId metatag but i cannot see what's wrong...
I compiled with
-keep-as3-metadata+=ModuleId
but this hasn't changed anything... -
Fade in/out with external SWFs
Hi All.. I"m very new to AS in general..
I'm trying to have a simple slideshow with external SWFs that outomatic and onClick..I achieved it except the abrupt white space after the unloaded clip goes away... I have this code and I'm not getting any errors - but I mut not have it connected somehow because the fade out is still not there... Can someone please please help me with this... I really appreciate any help ahead of thime...
//Import classes for easier use
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
//Timer
var slideDuration:uint = 8000; // or use whatever
var slideTimer:Timer=new Timer(slideDuration,0);
slideTimer.addEventListener(TimerEvent.TIMER,autoAdvanceF);
slideTimer.start();
var btnA:Array = [one_btn,two_btn,three_btn];
var previousBtn:SimpleButton = one_btn // use class type of your buttons
function autoAdvanceF(e:TimerEvent):void{
nextButtonF(previousBtn).dispatchEvent(new MouseEvent(MouseEvent.CLICK));
function nextButtonF(btn:SimpleButton):SimpleButton{ // use class type of your buttons
for(var i:uint=0;i<btnA.length;i++){
if(btnA[i]==btn){
return btnA[(i+1)%btnA.length];
return null;
//Load external SWF into main
var Xpos:Number = 0;
var Ypos:Number = 0;
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("swfs/one_btn.swf");
var target_mc:MovieClip = new MovieClip();
addChild(target_mc);
var target_mc2:MovieClip = new MovieClip();
addChild(target_mc2);
//load swf to movieClip
target_mc.addChild(loader);
//variables that store current content clip and current content indes
var activeTarget:MovieClip = new MovieClip();
loader.load(defaultSWF);
loader.x = Xpos;
loader.y = Ypos;
addChildAt(loader,0);
//Btns universal function (whenver any button is clicked, the loader will be removed
function btnClick(event:MouseEvent):void {
if (target_mc.alpha > 0) {
target_mc.alpha -=10;
if(target_mc2.alpha < 100) {
target_mc2.alpha +=10;
slideTimer.reset();
slideTimer.start();
previousBtn = SimpleButton(event.currentTarget);
removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
var myTween:Tween = new Tween(loader, "alpha", None.easeIn, 0, 2, 1, true);
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
addChildAt(loader,0);
loader.addEventListener(Event.ENTER_FRAME, onEnter);
// Movie level enterFrame event handler that will fade down object 1 (if it's alpha ishigher than 0) and fade up object 2 (if its aslpha is less than 100)
function onEnter(event:Event):void {
if (target_mc.alpha > 0) {
target_mc.alpha -= 10;
if (target_mc2.alpha < 1 ) {
target_mc2.alpha +=10;
loader.removeEventListener(Event.ENTER_FRAME, onEnter);
trace ("the movie clip is faded in");
/// Button Listerners
one_btn.addEventListener(MouseEvent.CLICK,btnClick);
two_btn.addEventListener(MouseEvent.CLICK,btnClick);
three_btn.addEventListener(MouseEvent.CLICK,btnClick);The Sound Factory Studio wrote:
Can I Fade in/out several tracks with the crossfade tool? I mean without selecting them and then add value...? just like in ProTools just selecting the regions and apply the fade tool???? VIP question
No.
To add crossfades or fade in/outs to multiple audio regions, you must do it from the fade parameter box, either entering numerically, or by clicking and dragging on the numeric value. -
Problems with external context mapping
Hi ,
I am having the following problems with external context mapping from one WD component to another.
Problem description:
In the <i>Component Interfaces</i> I have defined a WD interface "InfA".
In the <i>interface controller</i> of this compoenent,I have ContextA and attributeA(cardinality 1..1).The contextA is marked as an "Input Element".
Now my webdynpro componentB adds InfA as used component.In componentB I decalre a contextB with attributeB and map it to contextA to set up the external context mapping.
Now I expect that if any webdynpro component implements this WD interface InfA ,he has access to contextA with the data getting filled from contextB.
After i have created the component for the used component I try to fill values in the source node contextB thru this code:
wdContext.currentContextB.setB(value);
But in the runtime I keep getting error nullPointerException for nodeContextB,suggesting that the mapping has not been completed.
Can anyone suggest due to what the error can come ,and, if its a webdynpro bug ,is there a workaround??
Thanks in advance for your help.
Best regards
SouravHI,
Valery : I personally checked by doing the example, if the names of value attribute are different in the child's interface and parents component controller then it throws the exception.
Sourav: NullPointer Exception is thrown when something is not properly initialised, if in the main component the cardinality of mapped origin is 1.1 then you need to access it element directly like:
wdContext.currentParentNodeElement().setFname("Abhijeet");
wdContext.currentParentNodeElement().setLname("M");
i will suggest just check out if you are declaring some element of value node and without initialising taking its use or what?
if this doesnt solve your problem, please post the expanded exception.
hope it helps
let me know if you face nay problem
regards -
Problem with external punchout in SRM Server 713
Hello,
We upgrade from SRM_SERVER 701 SP 04 to SRM_SERVER 713 SP 02, now we have a problem with external catalog, we did not change anything in standard call structure, however now when the user access to external catalog, select a product and "checkout", SRM returns to shopping cart screen without products and no message are register in log in transaction code SLG1.
Our parameters in structure are:
10 https://xxxxxxxxx URL
20 VIEW_ID NAME Fixed value
30 VIEW_PASSWD XXXXXX Fixed value
40 USER_ID SY-UNAME SAP field
50 BRANDING search5 Fixed value
60 LANGUAGE ES Fixed value
70 COUNTRY MX Fixed value
75 EASYORDER 1 Fixed value
80 target _top Fixed value
85 ~caller CTLG Fixed value
90 OCI_VERSION 4.0 Fixed value
91 FILTER Fixed value
92 OPI_VERSION 1.0 Fixed value
100 HOOK_URL return URL
110 returntarget _top Fixed value
we made some test with parameter BYPASS_INB_HANDLER, set as 'X' but this not solve our issue.
We have an implementation in badi BBP_CATALOG_TRANSFER to map product category, even if I set an external breakpoint in this implementation, system does not pass through it, also we test with this implementation inactive and behavior is the same, nothing transfer to shopping cart
Does anyone know what's missing?
Thanks in advance.
Best regards,
José Luis D.Hello Jason,
Thank you for your answer, but as I told, If I set an external breakpoint it does not stop for debugging, so I can't see table as you recomended. This process (debugging) is familiar to me, in last version I can do it.
Any suggestion?
Thanks in advance, best regards
José Luis D -
Hi. I have a problem with external editing preferences. If I add Photoshop as an external editor, it won't launch when selected, if I add it as an additional external editor it will. Why? How can I fix this as I need to use Photoshop and another program as the additional external editor.
I use a Mac running OS X (10.8.5) and PS CS4 and LR 5.7. Any ideas on a fix? Thanks in advance.I don't know why Photoshop won't start. However, it's possible to create external editor presets using the additional external editor tools. There are instructions on how to do this in the Lightroom help. You could assign Photoshop and create one preset, and then assign another program and create another preset.
I don't know if deleting your preferences would fix the problem or not. It can sometimes fix other problems.
Preference and other file locations in Lightroom 5 -
Problem with LILO to loading the OS
Hello everyone.
We have a problem with LILO to loading the OS in a CS-MARS 110R, find attached a screenshot.
The only solution is recovery the MARS Operating System.
Thanks in advance.
Regards
AntonioHi Matthew.
The re-image was impossible because this CS-MARS didn´t read the DVD correctly (hardware error) and we asked to Cisco a RMA.
Thanks
Antonio -
Problem with whitespace then loading and saving xml
i do not know how to handle this problem. i modifed a texteditor to send XML to a server and load XML back to the container.
but then i do changes to the Textlayout it shows up like this --->
Text in Container not modifed
Text in Container modifed ---> with space beween the colorchanged string
Text inContainersend and loaded ---> i think this has something to to with the
TextFilter.export(_textFlow,TextFilter.TEXT_LAYOUT_FORMAT,ConversionType.XML_TYPE)
can someone give me a hint...Hi,
the link is --->
http://www.horstmann-architekten.de/contentmanagment/SimpleEditor.html
its a modified example of the texteditor provided by Adobe. You can send a xml to the server. and also read it from the server. You just use the xml identifer to give the xml a name.
Try it out:
1. change the text and
2. give a XML-Identifer
and then send it to the server. --> send to server
3. type in the XML-Identifer you have used and
4. load it from the server ---> Load from Server Button
evering works ok exept the columns formating.
I Think the colums Formating is not embeded in the XML as it should be. I attached the Files. (Newbie programmer)
With best regards
Michael Sprinzl
--- robin.briggs <[email protected]> schrieb am Do, 17.9.2009:
Von: robin.briggs <[email protected]>
Betreff: Problem with whitespace then loading and saving xml
An: "Michael sprinzl" <[email protected]>
Datum: Donnerstag, 17. September 2009, 2:12
Sounds like you have two different issues going on: (1) inline graphics aren't coming out correctly when you use the TextLineFactory, and (2) columns aren't working correctly. It's difficult for me to tell by looking at the application you link what is going wrong. One of the examples does seem to have columns working -- can you be more specific about what you're doing, and what results you are seeing? As for the inline graphics, there is a timing issue involved with using URLs, due to the asynchronous loading. See this comment in the docs for TextFlowTextLineFactory:
Note: When using inline graphics, the source property of the InlineGraphicElement object must either be an instance of a DisplayObject or a Class object representing an embedded asset. URLRequest objects cannot be used. The width and height of the inline graphic at the time the line is created is used to compose the flow.
- robin -
I still am having problems with Aperture not loading, It just refuses to work, and I get the message saying it has encountered a problem, and I may need to re-install which I have done dozens of times. The fix mentioned on an earlier post doesn't work as it is for Ver 10.6.6 and I am running 10.6.7
Do you have Final Cut installed on your machine?
If so, you may want to look at this article: http://support.apple.com/kb/TS3528
Let us know if that helps. -
Problem with External 2.1 digital speakers
Anybody have any problems with external digital speakers connected to the SPDIF connection? I have a 1215-600XT, and I tried connecting my old DELL Boston Acoustic 2.1 speakers. They worked, but any time a "sound" played, a loud pop would follow the end of the sound track. If its multiuple sounds (i.e. an application that is making numerous alert sounds) I get multiple pops. It even happens at the endf of music tracks. It was so annoying, I stopped using the speakers. before I invest in another set of speakers, want to know I am not wasting my time.
Also, anyway of getting the soundcard to support digital 2.1 or other sound? The set-up screen only shows stereo for external speakers and no way of adding more.
Sincerely
Scottpmoney,
If you need a RMA, you will need to contact Customer Support either via email or phone. Also, it may be a fault with the sub and not just the cable alone, anyway contact Customer Support and they will be able to assist further.
Jason -
I'm having problems with my memory load
I'm having problems with my memory load, because I have a few photos on my iPhone 5 (32GB) and has been detected that I am using 10GB of photos, and I only have 1,000 photos. Could someone help me?
Hi Fehmi76,
The article linked below details how to go about seeing what apps on your iPhone are using what amounts of space.
See how much storage you've used on your iPhone, iPad, and iPod touch
https://support.apple.com/en-us/HT201656
Regards,
Allen -
Playback problems with external FLV's
Hi everyone,
I am working on a site that loads all of the pages into a
holder as swf's. Everything in the site works well, except that the
first page takes a little longer to load than I wish it would. I
want to find a good pre-loader but, for now, I am trying a
different approach.
The intro / opening page is a video I made in After Effects
and imported into flash's time line, it is around 2.3MB and loads
in about 5 seconds (to start playing) as a SWF. To make it load
faster I re-exported from After Effects using cue points to trigger
copy changes that had been sequenced in the timeline with the video
before which works great, and imported the video as an external
file that is loaded when the SWF loads.
The problem is, once the "page" loads and plays and I
navigate to another page, then go back to the home page, the whole
flash system seems to be running much slower. Even rollovers and
fades are taking a lot longer than before and the video playback is
very choppy. The intro is a repeating flv that loops with AS3 that
I found in another forum.
Is there a way to "reset" the flash container so that each
time it loads a SWF there is no residual data left behind? That's
the only reason I can think of that would cause this kind of issue.
I know that "unload" is not a function that is still available in
AS3.
Any ideas or suggestions are more than welcome.
Thanks!
JeremiahYou should backup your data regardless. It is not a question of if you will lose data but when. "Do you feel lucky today?" (asked Clint Eastwood in "Dirty Harry"). Here are several solutions:
https://discussions.apple.com/docs/DOC-1992
A backup with bad node is still better than no backup at all. Once you are backed up, you can use Alsoft Disk Warrior to repair those nodes, if the hardware of the drive isn't failing.
You should also be aware that node issues can start when the hard drive gets over 85% full. -
Looping Problem with External Files
This is what I'm trying to build: A swf file (called main)
that loads 4 external swf files (called intro, one, two, and
three). At the start, main.swf loads the intro.swf, and it plays
once. When intro is done, main loads and plays one.swf. This will
loop until the user hits one of the buttons, and then two or three
starts playing.
What I have done already: Coded buttons. Code works.
What I am having a problem: I want intro.swf to play just
once, but it keeps looping. It's supposed to play once, and then
one.swf is supposed to start looping. Is there anyway to tell intro
to loop just once? (What I've tried already: a stop() function at
the end of intro.swf clip, publishing intro.swf with 'no loops'
setting.)
(Talk slowly; I have almost no idea how to code in
flash.)Edit: Really? No problem? Weird.. I find that all of the
imported swf files loop infinitely, unless a stop() or
unloadmovie() function is called, but then I need another button.
Anyway, I found a workaround, that seems really obvious (in
hindsight): I just copied the Introduction file into a new scene in
the Main file. (Algorithm: Preloader, skip to Introduction scene,
skip back to main scene. External swf files load, depending on what
button the user clicks on.)
Even though it's sorted already, I'd still hear what code you
use. (It might be simplier than what I did.)
Maybe you are looking for
-
HELP-iPhone isn't showing up in iTunes
So I set up my iPhone and everything yesterday. . .I downloaded the newest iTunes, but each time I even try connecting iTunes to the iStore, it says iTunes cannot connect to the iTunes store, unknown error occured (-3221), make sure your networ conne
-
IPhone 3G OS 3.1.2 not connecting to Exchange 2003 consistently
I have... iPhone 3G OS 3.1.2 Outlook 2007 Microsoft Exchange 2003 My problem is that I have successfully set up my exchange account on my phone and all of my folders show up, however 9 times out of 10 when I go into my inbox it will sit and think and
-
Distorted images when syned to Iphone/Ipod and more - Advice Please!
Hello, Whenever i try syncing Photos to my iphone or Ipod my images always end up being distorted and only 20% of the pictures are sent, the rest arent there. I am currently running itunes on Windows, Would anyone know how to fix this problem? Thanky
-
Can't re-install after uninstall
I was told by the developer of an App Store app to uninstall + re-install his app, iNet. After uninstalling + re-starting, my App Store shows that the app is installed, even though it's not listed in my Applications. How can I re-install?
-
Last night I updated iTunes and I decided to restart later. Today after I restarted it, all my iTunes playlists were deleted. All my songs are there, but the playlist is wiped off. Is there a way to restore this/anyone else have this happen to them?