Loading child SWFs with TLF content (from Flash CS5.5) generates reference errors in FB4.6
I am currently producing e-learning content with our custom AS3-Framework.
We normally create content files in Flash CS5.5 with dynamic text fields, which are set at runtime from our Framework (AS3 framework in FB4.6).
Now we are in the progress of language versioning, and since one of the languages is Arabic we are changing the dynamic text fields to TLF fields.
Then all my problems started.
In Flash I have chosen to include the TLF engine and to export in frame 2.
(see to: http://helpx.adobe.com/flash/kb/loading-child-swfs-tlf-content.html )
I get this error:
VerifyError: Error #1053: Illegal override of getEventMirror in flashx.textLayout.elements.FlowLeafElement.
at flash.display::MovieClip/gotoAndPlay()
I guess it is because our framework wants to gotoAndPlay before the TLF engine has been loaded.
Can this be it?
Any good suggestions on how to handle loading child SWFs with TLF content.
Please refere to the following articles .. you may find some help.
http://www.stevensacks.net/2010/05/28/flash-cs5-tlf-engine-causes-errors-with-loaded-swfs/
http://www.adobe.com/devnet/flash/articles/preloading-tlf-rsl.html
I also faced similar problem and posted a question at the following link, but, I still couldn't find the solution.
http://forums.adobe.com/message/4367968#4367968
Similar Messages
-
SWF with TLF compiled in Flash CS5 can't be imported into Flex 4.5
Hello there,
Trying out Flex 4.5 preview I've run into a problem:
In my Flex project I dynamically load various SWF files compiled in Flash CS5. These SWFs use TLF.
With Flex 4.1 everything worked as expected, but in Flex 4.5 I get RTE(s).
Just to be clear: if the SWF uses old classic text, Flex 4.5 displays it normally, but once you try TLF - nothing but RTE.
Anybody has experienced that?
I've also posted this on the TLF forum.
I'm on OS 10.6.6, and use the prerelease version of Hero (not the latest 18623)
Thanks,
FTQuestI tried to add the newer TLF swc to FLash CS5 (pointing to it in the library path), but it didn't work.
So, we'll wait till Flash team releases next update.
Thanks for the clarification,
FTQuest -
Loading external SWF with masked content - get size of masked area
I am loading an external swf using the SWFLoader component. The swf that is being loaded is masked so that only a portion is being shown. However, when it's loaded the actual size of the swf (loader.content.width && loader.content.height) is the complete swf including the masked area. Therefore, the loaded swf does not display properly in the itemrenderer Is there a way to to grab the size of the just the masked area as opposed to getting the size of the entire swf's contents (area not masked)?
One item to note that is complicating the issue, is that these are swf files that have already been created and there are many of them. In some instances, the size of the stage matches up with the size of the masked area. In other instances, the stage is larger (or possibly smaller) than the masked area movieclip as well as possibly the actual size of the movieclip (w/o the mask).
I am currently loading the external swf in using a Loader. Once loaded, I make a copy (screen shot) of the swf by creating a bmp of the loader.content.This is done as I don't want to have any animations being shown on screen at this moment. I am setting the size of the bmp using using loader.content.width & loader.content.height. I then set the SWFLoader.source to the bitmap.Here's the code I am using to load the swf:
<fx:Script>
<![CDATA[
protected function application1_applicationCompleteHandler(event:FlexEvent):void {
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoaded);
loader.load(new URLRequest("c:\\Flex Testing\\FA warns Mr. Jones.swf"), context);
private function onSWFLoaded(event:Event):void {
bmData=new BitmapData(loader.content.width, loader.content.height, true, 0x990000);
bmData.draw(loader.content, new Matrix());
bmp=new Bitmap(bmData);
swfLoader.source=bmp;
addElement(swfLoader);
with (swfLoader)
setStyle('verticalAlign', "middle");
setStyle('horizontalAlign', 'center');
verticalCenter=0;
horizontalCenter=0
scaleContent=true;
maintainAspectRatio=true;
addEventListener(MouseEvent.CLICK,onClick,false,0,true)
useHandCursor = true;
buttonMode = true;
width=200;
height=200;
loader.unload()
loader=null;
]]>
</fx:Script> -
I'm using FB 4.5 with sdk 4.1.0.16076.
I've tried importing an swc file, using the "convert symbol to flex component" command and it throws a VerifyError: Error #1053: Illegal override.
I've tried just compiling an swf and embedding it in a Flex compoent, again i get a VerifyError: Error #1053: Illegal override.
I've tried changing a number of compile settings in Flash CS5.5 but with no luck.
Does anyone have any ideas how to fix this error?with the swf it is: Illegal override of createTextLine in flashx.textLayout.compose.ComposeState.
the swc is Illegal override of FTETextFieldHostFormat in FTETextField.as$134.FTETextFieldHostFormat.
these errors seem arbitrary, since the first time i loaded an swc i got a different Illegal override error regarding some kind of CSS object that i can't remember.
i have read other threads that indicate this problem may occur when compiling objects using different SDKs in the same project. Does Flash CS5.5 compiled objects need to be imported to the 4.5 sdk maybe? (i'm using sdk 4.1). -
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? -
Mac Projector Crashes When exported From Flash CS5.5
Something strange that i noticed, when i had exported a presentation for a Mac,
on a 64 bit windows 7 using flash cs5.5.
the applicaton gets the paths of a few swfs from an XML file
and loads them one after the other.. there is a small bit of interactivity.
.. tested this projecter on various versions of MAC, it crashes often,crashes earlier if i switch applications. what follows here is a part of a report that was generated on an OS X 10.7.3,
works fine if the projector is exported from flash cs5.
i need it to work when exported from flash cs5.5.. any suggestions on what i need to change in my application so that it works when exported from flash cs5.5?
Your help would be appreciated Thanks in Advance
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000500d98eb
VM Regions Near 0x500d98eb:
Memory tag=240 000000000ebd0000-000000000ec90000 [ 768K] ---/rwx SM=NUL
-->
__TEXT 0000000070000000-0000000070142000 [ 1288K] r-x/rwx SM=COW /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio
Application Specific Information:
objc_msgSend() selector name: orderOut:
objc[9434]: garbage collection is OFF
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x92115d47 objc_msgSend + 23
1 com.macromedia.Flash Player.app 0x00467d96 main + 240950
2 com.macromedia.Flash Player.app 0x0047efda main + 335738
3 com.macromedia.Flash Player.app 0x002feae2 0x1000 + 3136226
4 com.macromedia.Flash Player.app 0x0033a77b 0x1000 + 3381115
5 com.macromedia.Flash Player.app 0x00462718 main + 218808
6 com.macromedia.Flash Player.app 0x004628b2 main + 219218
7 com.apple.CoreFoundation 0x98e0b3df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
8 com.apple.CoreFoundation 0x98e0ad96 __CFRunLoopDoSources0 + 246
9 com.apple.CoreFoundation 0x98e34c68 __CFRunLoopRun + 1112
10 com.apple.CoreFoundation 0x98e3447c CFRunLoopRunSpecific + 332
11 com.apple.CoreFoundation 0x98e34328 CFRunLoopRunInMode + 120
12 com.apple.HIToolbox 0x9289117f RunCurrentEventLoopInMode + 318
13 com.apple.HIToolbox 0x928984e7 ReceiveNextEventCommon + 381
14 com.apple.HIToolbox 0x92898356 BlockUntilNextEventMatchingListInMode + 88
15 com.apple.AppKit 0x98fe8a9c _DPSNextEvent + 678
16 com.apple.AppKit 0x98fe8306 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
17 com.apple.AppKit 0x98fe4675 -[NSApplication run] + 911
18 com.apple.AppKit 0x99278261 NSApplicationMain + 1054
19 com.macromedia.Flash Player.app 0x000032a2 0x1000 + 8866
20 com.macromedia.Flash Player.app 0x000031c9 0x1000 + 8649
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x97d3f90a kevent + 10
1 libdispatch.dylib 0x99a75c58 _dispatch_mgr_invoke + 969
2 libdispatch.dylib 0x99a746a7 _dispatch_mgr_thread + 53
Thread 2:
0 libsystem_kernel.dylib 0x97d3e83e __psynch_cvwait + 10
1 libsystem_c.dylib 0x9237ce78 _pthread_cond_wait + 914
2 libsystem_c.dylib 0x9232482a pthread_cond_wait + 48
3 com.macromedia.Flash Player.app 0x003ff62f 0x1000 + 4187695
4 com.macromedia.Flash Player.app 0x0001a06c 0x1000 + 102508
5 com.macromedia.Flash Player.app 0x003ff70c 0x1000 + 4187916
6 com.macromedia.Flash Player.app 0x003ff73a 0x1000 + 4187962
7 com.macromedia.Flash Player.app 0x003ff847 0x1000 + 4188231
8 libsystem_c.dylib 0x92378ed9 _pthread_start + 335
9 libsystem_c.dylib 0x9237c6de thread_start + 34
Thread 3:
0 libsystem_kernel.dylib 0x97d3e83e __psynch_cvwait + 10
1 libsystem_c.dylib 0x9237ce78 _pthread_cond_wait + 914
2 libsystem_c.dylib 0x9232482a pthread_cond_wait + 48
3 com.macromedia.Flash Player.app 0x003ff62f 0x1000 + 4187695
4 com.macromedia.Flash Player.app 0x0001a06c 0x1000 + 102508
5 com.macromedia.Flash Player.app 0x003ff70c 0x1000 + 4187916
6 com.macromedia.Flash Player.app 0x003ff73a 0x1000 + 4187962
7 com.macromedia.Flash Player.app 0x003ff847 0x1000 + 4188231
8 libsystem_c.dylib 0x92378ed9 _pthread_start + 335
9 libsystem_c.dylib 0x9237c6de thread_start + 34
Thread 4:
0 libsystem_kernel.dylib 0x97d3e83e __psynch_cvwait + 10
1 libsystem_c.dylib 0x9237ce78 _pthread_cond_wait + 914
2 libsystem_c.dylib 0x9237cf7b pthread_cond_timedwait_relative_np + 47
3 com.macromedia.Flash Player.app 0x003ff5f8 0x1000 + 4187640
4 com.macromedia.Flash Player.app 0x001c58fe 0x1000 + 1853694
5 com.macromedia.Flash Player.app 0x003ff70c 0x1000 + 4187916
6 com.macromedia.Flash Player.app 0x003ff73a 0x1000 + 4187962
7 com.macromedia.Flash Player.app 0x003ff847 0x1000 + 4188231
8 libsystem_c.dylib 0x92378ed9 _pthread_start + 335
9 libsystem_c.dylib 0x9237c6de thread_start + 34
Thread 5:
0 libsystem_kernel.dylib 0x97d3e83e __psynch_cvwait + 10
1 libsystem_c.dylib 0x9237ce78 _pthread_cond_wait + 914
2 libsystem_c.dylib 0x9237cf7b pthread_cond_timedwait_relative_np + 47
3 com.macromedia.Flash Player.app 0x003ff5f8 0x1000 + 4187640
4 com.macromedia.Flash Player.app 0x00305328 0x1000 + 3162920
5 com.macromedia.Flash Player.app 0x003ff70c 0x1000 + 4187916
6 com.macromedia.Flash Player.app 0x003ff73a 0x1000 + 4187962
7 com.macromedia.Flash Player.app 0x003ff847 0x1000 + 4188231
8 libsystem_c.dylib 0x92378ed9 _pthread_start + 335
9 libsystem_c.dylib 0x9237c6de thread_start + 34
Thread 6:: com.apple.audio.IOThread.client
0 libsystem_kernel.dylib 0x97d3cc22 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x97d3c1f6 mach_msg + 70
2 com.apple.audio.CoreAudio 0x9cd8e9fe HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, unsigned int) + 122
3 com.apple.audio.CoreAudio 0x9cd8ea6a HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, unsigned int) + 60
4 com.apple.audio.CoreAudio 0x9cd86e5f HALC_ProxyIOContext::IOWorkLoop() + 1145
5 com.apple.audio.CoreAudio 0x9cd86926 HALC_ProxyIOContext::IOThreadEntry(void*) + 136
6 com.apple.audio.CoreAudio 0x9cd86898 __HALC_ProxyIOContext_block_invoke_6 + 20
7 com.apple.audio.CoreAudio 0x9cd8681d HALB_IOThread::Entry(void*) + 69
8 libsystem_c.dylib 0x92378ed9 _pthread_start + 335
9 libsystem_c.dylib 0x9237c6de thread_start + 34
Thread 7:
0 libsystem_kernel.dylib 0x97d3f02e __workq_kernreturn + 10
1 libsystem_c.dylib 0x9237accf _pthread_wqthread + 773
2 libsystem_c.dylib 0x9237c6fe start_wqthread + 30
Thread 8:
0 libsystem_kernel.dylib 0x97d3f02e __workq_kernreturn + 10
1 libsystem_c.dylib 0x9237accf _pthread_wqthread + 773
2 libsystem_c.dylib 0x9237c6fe start_wqthread + 30
Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00dbe0e0 ebx: 0x00dbe0e0 ecx: 0x99985548 edx: 0x500d98cb
edi: 0x0000036e esi: 0x00aad0e0 ebp: 0xbfffe4f8 esp: 0xbfffe488
ss: 0x00000023 efl: 0x00010202 eip: 0x92115d47 cs: 0x0000001b
ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f
cr2: 0x500d98eb
Logical CPU: 1Looks like it was a memory problem with the jvm.ini file.
Pumped it up to 256 and it works now.
Hope this helps anyone else in the future if they come across it.
Thanks. -
SQLite Database and TLF Text in Flash CS5
I encountered the following problem when working with the built-in sqlite database and using TLF TextFields in Flash CS5
When I tried to use TLF TextFields alone, I don't face any probelem,
but when I start using a database connectivity code, the TLF TextFields placed on the stage are not shown, but instead, the SWF file is showing the built-in preloader with five dots looping.
I tried changing the default Linkage in ActionScript 3 Settings to Merge Mode, but in this case nothing is shown, not the textfields, neither the preloader.
I think the problem is related to loading the TLF Text Engine, but I couldn't figure out what to do.
The following is my code placed in first frame:
==========================================
import flash.data.SQLConnection;
import flash.events.SQLErrorEvent;
import flash.events.SQLEvent;
import flash.filesystem.File;
var conn:SQLConnection = new SQLConnection();
conn.addEventListener(SQLEvent.OPEN, openHandler);
conn.addEventListener(SQLErrorEvent.ERROR, errorHandler);
// The database file is in the application directory
var folder:File = File.applicationDirectory;
var dbFile:File = folder.resolvePath("DBSample.db");
conn.openAsync(dbFile);
function openHandler(event:SQLEvent):void
trace("the database was created successfully");
function errorHandler(event:SQLErrorEvent):void
trace("Error message:", event.error.message);
trace("Details:", event.error.details);
stop();
==========================================
and I am using one TLF TextField on the stage for later use.
Publish Settings>> Player: AIR 2.6
and not to forget, when I test the file using Contol Panel >> Test in Air Debug Launcher (Desktop), the file is working correctly.
but when I open the generated SWF file, the problem appears.
I hope that I find some help
Thanks.http://www.flashandmath.com/flashcs5/rsltip/
-
I am trying to store music for two different iPods on the same Windows 8 computer, and when I try and download content from the Cloud I get an error message. Is it possible to have two different Apple IDs on the same computer?
Unfortunately you've discovered too late how important it is to maintain an up-to-date backup of your iTunes library (and all other data of value). You could, before wiping the drive, have considered making use of a commercial data recovery service that could (albeit at considerable cost) have extracted your library from the hard disk, even if virus infected.
In the absence of that option, you will need to restore the content of your library from its original sources:
Depending on your location, you may be able to re-download any iTunes Store purchases that are still available on the Store
Likewise, most digital purchases from Amazon (including auto-rip copies of purchased CDs) should be available from the Amazon Cloud and via the Amazon Music application - the same may be true of other commercial sources for digital downloads
Content imported from your CDs will have to imported again
The specific situation that you describe regarding the music imported from your friend's external HDD suggests that either the source is badly organized and/or originates from a source other than iTunes (other media players may use alternative tags for information like artist, title, album, etc. that are not wholly consistent with how iTunes handle these). Without details of the issues you're seeing it is difficult to suggest a remedy other than going through the media album-by-album, track-by-track, and correcting the inconsistencies.
In the absence of a backup or access to the original library data there is no option other than painstakingly recreating your library as described above. As you do so, you'll now realize how important creating and maintaining backups are - in my case I have at all times three separate duplicates of my library, in two different locations, where none is ever more than a week old compared to the content of my master library. -
Not able to export quicktime movie from Flash CS5 or CS6.
Hi! I am not able to export quicktime movie from Flash CS5 or CS6. When I export it the progress bar is showing and says Recording Flash content and nothing happens
I havent exported any videos in the past from Flash. The movie is around 45 seconds and the size is 470KB.
I tried both, the memory and the hard drive.
In the attached image you can see the settings and in the other image you can see the progress bar that remains without something to happen.
I dont mind what type of video to export it can be also .avi but again I have troubles there. It is very large and the animation is distorted.
The animation consist from two scenes. The first one can be exported without any problem but the second one cannot be exported. May be because it has some masks layers and guide layers? -
Ok, how do I target Air 2.5 from Flash CS5?
How do I target Air 2.5 from Flash CS5?
I'd kill to have the enhanced css support...
Thanks!
-TedYou can post this on Flash's forum. You should get a good answer from there.
As I understand, there should be an update in MAX. Not sure how the update will get released. -
How do I target Air 2.5 from Flash CS5?
Ok, how do I target Air 2.5 from Flash CS5?
I'd kill to have the enhanced css support right now...
Thanks!
-Tedok, so i found the answer to my own question, for the moment gor here for the extension to do 2.5 in cs5:
http://labs.adobe.com/technologies/flashpro_extensionforair/ -
Flash AIR app cannot load child swfs on publish to device
I have been struggling with this problem for WEEKS now and can't solve it. I have an flash AIR app (creative cloud, AIR 3.8) which is very simple: all it does is load external SWF movies on the click of a start button. It works FINE in test/PC but when I publish to device, the external swfs do not load.
Here is the code on the main timeline that calls the external swfs:
//start button
start_button_TRI_desmatosuchus.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_02_3,false,0,true);
import fl.display.ProLoader;
import flash.events.Event;
var fl_ProLoader_02:ProLoader;
var fl_ToLoad_02:Boolean = true;
function fl_ClickToLoadUnloadSWF_02_3(event:MouseEvent):void
if(fl_ToLoad_02)
fl_ProLoader_02 = new ProLoader();
fl_ProLoader_02.load(new URLRequest("dinofilms/triassic_desmatosuchus.swf"));
fl_ProLoader_02.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete_02 )
addChild(fl_ProLoader_02);
fl_ProLoader_02.x = 0;
fl_ProLoader_02.y = 144;
else
if (fl_ProLoader_02!=null) {
removeChild(fl_ProLoader_02);
fl_ProLoader_02.unloadAndStop();
fl_ProLoader_02 = null;
fl_ToLoad_02 = !fl_ToLoad_02;
function onComplete_02(e:Event):void {
e.currentTarget.content.addEventListener(Event.ENTER_FRAME,OEF_02);
function OEF_02(e:Event):void {
if (e.currentTarget.currentFrame==e.currentTarget.totalFrames) {
e.currentTarget.stop();
e.currentTarget.removeEventListener(Event.ENTER_FRAME,OEF_02);
removeChild(fl_ProLoader_02);
fl_ProLoader_02.unloadAndStop();
fl_ProLoader_02 = null;
I am calling about 30 different movies on 30 different frames, so that's why I am using tags like "proLoader_01" so I don't duplicate them. All the external swfs are of course listed in the included files too.
I would really appreciate the assistance, I am a reluctant coder!
Message was edited by: Fiona PassantinoOK, I replaced all the "ProLoader" instances with "Loader" and I am getting an error, below (see***)
//start button
start_button_TRI_coelophysis.addEventListener(MouseEvent.CLICK,
fl_ClickToLoadUnloadSWF_01_3,false,0,true);
import fl.display.Loader; **HERE, ERROR IS: 1172 fl.display:Loader could not be found**
import flash.events.Event;
var fl_Loader_01:Loader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad_01:Boolean = true;
function fl_ClickToLoadUnloadSWF_01_3(event:MouseEvent):void
if(fl_ToLoad_01)
fl_Loader_01 = new Loader();
fl_Loader_01.load(new URLRequest("dinofilms/triassic_coelophysis.swf"));
fl_Loader_01.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete_01)
addChild(fl_Loader_01);
fl_Loader_01.x = 0;
fl_Loader_01.y = 144;
else
if(fl_Loader_01!=null) {
removeChild(fl_Loader_01);
fl_Loader_01.unloadAndStop();
fl_Loader_01 = null;
fl_ToLoad_01 = !fl_ToLoad_01;
function onComplete_01(e:Event):void {
e.currentTarget.content.addEventListener(Event.ENTER_FRAME,OEF_01);
function OEF_01(e:Event):void {
if(e.currentTarget.currentFrame==e.currentTarget.totalFrames) {
e.currentTarget.stop();
e.currentTarget.removeEventListener(Event.ENTER_FRAME,OEF_01);
removeChild(fl_Loader_01);
fl_Loader_01.unloadAndStop();
fl_Loader_01 = null; -
How do I dynamically load a SWF that was compiled from an Fla with a linked external class file
I am dynamically loading external SWFs in a Main Fla in response to clicks on a menu.
The loading code is standard and works fine for all of the SWFs except one. When I try to load it I get the following error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
I am certain that the URL to the problem SWF is correct. The SWF itself doesn't load any other SWFs or images.
The problem SWF is linked to an external class file and compiled with it.
i.e. in the properties panel of the main timeline of the problem SWF's Fla I have entered the path to the external class.
1. there is no problem compiling this SWF with the class (it works fine by itself)
2. if I remove the external class from the properties panel and don't use it the resulting SWF imports without a problem into the Main Fla mentioned before
So the problem seems to be the fact that the external class is linked in the properties panel. Is this a path problem?
Would appreciate any suggestions,
Thanks!despite what you say, that loaded swf most likely is loading something and that's the cause of the error.
you could test that by putting the main swf's embedding html file in the same directory with problematic swf. if the problem is as explained above, you'll have no problem when the main html is in the same directory with the loaded swf. -
Any known issues with TLF in AIR 2 from Flash CS5?
Hi,
We're creating an AIR 2 application in Flash CS5. Virtually all text is TLF text.
It's a CPU and RAM hog.
Saving the file as CS4, opening it in Flash CS5 and then generating an AIR 2 file works great, although, of course, we've lost all the TLF and the text needs some serious re-formatting.
The development environment is Mac Snow Leopard, with latest OS and Flash updates.
Any thoughts are greatly appreciated.
Thanks,
KirkI've had similar oddities with Booting USB drives off several MBP's and am not sure there's a rational explanation of some of the oddities. (I have a twin cable and if one doesn't power it I stick the other plug in and it works 100% of the time)
FWIW This Mac's iSight shows 500/500 +when not in use+ (5,1) while the EyeTV Diversity and external Logitech camera also both show 500/500 - Bluetooth USB controller shows 500/0 even with 3 devices hanging off it ... -
Loaded external swfs with transitions
I need help getting my loaded swf files to play the "out" transition before the next movie loads. I have a main swf with 5 buttons (movie clips) that load external swf onto the stage.
package
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.MouseEvent;
import flash.events.*;
public class V2 extends MovieClip
private var sections_array:Array;
private var section_buttons_array:Array;
private var loader:Loader;
private var sectionHolder : MovieClip;
private var swf:String;
private var currentSection:int=0;
private var nextSection:int;
private var id:int=0;
private var homeLoc = "./swfs/home.swf";
public function V2()
init();
private function init():void
stop();
stage.frameRate=31;
preloader_mc.visible=false;
preloader_mc.fill_mc.width=0;
sectionHolder = new MovieClip();
sectionHolder.x = 37;
sectionHolder.y = 42;
addChild( sectionHolder );
sections_array = new Array('./swfs/section1.swf',
'./swfs/section2.swf',
'./swfs/section3.swf',
'./swfs/section4.swf',
'./swfs/section5.swf');
section_buttons_array = new Array(btn1,btn2,btn3,btn4,btn5);
addMenuListener();
addMenuEvents();
loadHome();
private function addMenuListener():void
for(var i:int=0;i < section_buttons_array.length;i++)
section_buttons_array[i].id=i;
section_buttons_array[i].addEventListener(MouseEvent.MOUSE_DOWN,loadSectionHand ler);
private function loadHome():void
swf=homeLoc;//sections_array[0];
var request:URLRequest=new URLRequest(swf);
loader=new Loader();
initListeners(loader.contentLoaderInfo);
loader.load(request);
id=0;
private function changeSection(m:MouseEvent):void
id=m.currentTarget.id+1;
loader.unload();
sectionHolder.removeChild(loader);
removeListeners(loader.contentLoaderInfo);
loadSection(m.target.parent.id+1);
private function loadSectionHandler(evt:MouseEvent)
id = evt.currentTarget.id;
loadSection(id);
private function loadSection(n:int):void
swf=sections_array[id];
var request:URLRequest=new URLRequest(swf);
initListeners(loader.contentLoaderInfo);
loader.load(request);
private function initListeners(dispatcher:IEventDispatcher):void
dispatcher.addEventListener(Event.OPEN,start);
dispatcher.addEventListener(ProgressEvent.PROGRESS,atLoading);
dispatcher.addEventListener(Event.COMPLETE,completed);
private function removeListeners(dispatcher:IEventDispatcher):void
dispatcher.removeEventListener(Event.OPEN,start);
dispatcher.removeEventListener(ProgressEvent.PROGRESS,atLoading);
dispatcher.removeEventListener(Event.COMPLETE,completed);
private function start(event:Event):void
preloader_mc.visible=true;
private function atLoading(event:ProgressEvent):void
var n:uint=(event.bytesLoaded/event.bytesTotal)*100;
preloader_mc.fill_mc.width=n;
private function completed(event:Event):void
sectionHolder.addChild(loader);
preloader_mc.visible=false;
private function stopAll():void
for(var i:int=0;i < section_buttons_array.length;i++)
section_buttons_array[i].stop();
sections_array[i].stop();
private function addMenuEvents():void
for(var i:int=0;i < section_buttons_array.length;i++)
section_buttons_array[i].mouseChildren=false;
section_buttons_array[i].buttonMode=true;
section_buttons_array[i].id=i;
section_buttons_array[i].isPressed=false;
section_buttons_array[i].addEventListener(MouseEvent.MOUSE_OVER,setOver);
section_buttons_array[i].addEventListener(MouseEvent.MOUSE_OUT,setOut);
section_buttons_array[i].addEventListener(MouseEvent.MOUSE_DOWN,setDown);
section_buttons_array[i].addEventListener(MouseEvent.MOUSE_UP,setUp);
private function setOver(evt:MouseEvent):void
if(evt.target.isPressed==false)
evt.target.gotoAndStop(2);
private function setOut(evt:MouseEvent):void
if(evt.target.isPressed==false)
evt.target.gotoAndStop(1);
private function setDown(evt:MouseEvent):void
nextSection=evt.target.id;
checkState(evt.target.id);
evt.target.gotoAndStop(3);
loadSection(1);
currentSection=evt.target.id;
private function setUp(evt:MouseEvent):void
if(evt.target.isPressed==false)
evt.target.gotoAndStop(1);
private function checkState(n:int):void
for(var i:int=0;i < section_buttons_array.length;i++)
if(i==n)
section_buttons_array[i].isPressed=true;
else
section_buttons_array[i].isPressed=false;
section_buttons_array[i].gotoAndStop(1);
private function removeSWF(e:Event):void
loader.unload();
removeEventListener("removeMe", removeSWF);
var request:URLRequest = new URLRequest(swf);
loader.load(request);
private function onClick(e:MouseEvent):void
targetID = e.currentTarget.id;
addEventListener("removeMe", removeSWF);
MovieClip(loader.content).play();
private function removeSWF(e:Event):void
loader.unload();
removeEventListener("removeMe", removeSWF);
The loaded swf has a stop() an intro animation and on the last frame have.
dispatchEvent(new Event("removeMe", true));your isse begins here ..
loadSection()
you use the same loader to not only load files but you are tyring to use it to target the movieClip you also want to play.
The issue is loader. The loader can only reference one load at a time.. otherwise you screw up your listeners and the ability to unload files properly.
You should load all files in Your current system as its own variable so that while one loads you can still control a movie.
So what type of end transitions do your files have?
What exactly with this seems like youre getting an issue.. looking at it looks alright aside from the fact that some methods are not used at all by your class
Maybe you are looking for
-
APEX_WEB_SERVICE.PARSE_XML
Ok. I have made a RESTFul web services call to the Google Maps API to calculate the distance between 2 post codes using apex_web_service.make_rest_request and I get the response I am after which is some XML like: <?xml version="1.0" encoding="UTF-8"?
-
Firefox 20-22 on Windows 7 x64 unresponsive after Hibernation (Suspend to Disk)
Since Firefox 20, Firefox keeps unresponsive after using Hibernation mode (not Stand-By, Not Power Save) on 2 of my Windows 7 x64 systems (most recent Java, Flash & Operating System updates). Even in Safe Mode. The problem is, that none of the elemen
-
I just upgraded to iTunes 11 and now I get a "itunes cannot connect with this ........ Could not allocate a resource. Happens with both ipad and iPhone. Any thoughts on how to resolve this issue?
-
Need Help Troubleshooting Copy Function
When I try to copy a page using the flatbed scanner, the printer will scan the page and act like it's going to perform the copy. However, after about 20 seconds, the printer spits out a blank page and on the touchscreen, it says "Printing canceled."
-
All my usb ports suddenly failed. Any easy fix?
I'm not able to go to the Apple Store for repair. Anyone encounter this? What was the solution? thanks Bud