Loader onComplete not firing
This is my script, very simple. But the event listener is not
firing. I'm obviously missing something but I can't see what. Can
one of you flash mavens please help me here? Thanks in advance.
var ldr:Loader = new Loader();
ldr.addEventListener(Event.COMPLETE, load_complete);
var urlReq:URLRequest = new URLRequest("images/image0.jpg");
ldr.load(urlReq);
function load_complete(e:Event) {
trace("load complete");
}
You need to add the listener to contentLoaderInfo - not
loader:
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,
load_complete);
Similar Messages
-
I have tried the work around for Flash 8 even though I have
the latest Flash Player on my machine. The onComplete is not firing
and hanging the progress bar at 100%. I have read on forums that an
echo or respons.write("") will clear the problem but it does not
seem to be working.
Thanks in advanceI mean Event.Complete, not onComplete but I assume you all
know that! -
Loader event not firing - Actionscript 3
Hi,
I have found that Event.COMPLETE doesn't get dispatched in IE
6 or 7 on a PC, but does in Firefox and the Flash authoring
environment.
I would like the swf to declare when it has completed
loading. The code is below. SImply put it into frame 1 of the main
timeline and publish it.
In Flash and Firefox it will say 'Initiated' and 'Completed'.
In IE it will just say 'Initiated'.
Could somebody give it a try - it's very confusing.
Thanks.
var debugText:TextField = new TextField()
addChild(debugText)
var onEvent = function (event:Event):void
trace(event.type)
debugText.text += event.type + "\r"
loaderInfo.addEventListener(Event.INIT, onEvent);
loaderInfo.addEventListener(Event.COMPLETE, onEvent);Thanks for checking it.
I've removed the Event.COMPLETE listener altogether now and
started using a timer to check if the loaderInfo.bytesLoaded ==
loaderInfo.bytesTotal, and if it does then it manually calls the
onComplete function.
Having just started porting work from AS2 to AS3 and hitting
a major issue like this at the first hurdle is not encouraging
though. -
af:serverListener not fired on a jspx page load
Hi,
I'm using JDeveloper 11g Update 1.
I would like to fire a serverListener on a jspx page load.
The javascript method that i'm using is fired while the server listener is not fired.
Here's the code.
<pre>
//In my jspx
<af:document title="Page Title" clientComponent="true">
<af:clientListener method="fireServerListener" type="load"/>
<af:clientAttribute name="serverListenerType" value="serverMethod"/>
<af:serverListener type="serverMethod" method="#{myBean.serverMethod}"/>
<f:facet name="metaContainer">
<trh:script source="js/lib.js"></trh:script>
</f:facet>
//In lib.js
function fireServerListener(event){
var source = event.getSource();
var immediate = this._immediate;
var params = {};
var srvLstnrType = source.getProperty("serverListenerType");
AdfCustomEvent.queue(source, srvLstnrType, params, immediate );
//In my bean
public void serverMethod(ClientEvent clientEvent) {
System.out.println("serverMethod() is called");
</pre>
Please, give any ideas how to resolve it.
Best Regards,
JavaDeVeLoperHi Frank,
I've tried what's suggested. I've placed the trh:script at the bottom of the page.
The server listener in this piece of code at the bottom is fired, but in my case the problem (to fire a server event on body load) still exists.
<pre>
<af:commandButton text="Button" partialSubmit="true" clientComponent="true">
<af:clientListener method="fireServerListener" type="action" />
<af:clientAttribute name="serverListenerType" value="serverMethod" />
<af:serverListener type="serverMethod"
method="#{myBean.serverMethod}"/>
</af:commandButton>
</pre>
Any suggestions :)
Best Regards,
JavaDeVeLoper -
Hello Dev's,
I am having a problem in only one project and I have even tried to recreate the project with no success but previous projects created years prier (made with previous versions of FB) are not experiencing this.
I am trying to place breakpoints on functions in deep rooted classes (a class that is loaded by a class by a class, its a smaller component from a greater project) which I know is firing as I see the results on the screen.
However the break point does not fire and remains a blue circle, indicating it won't fire. If I remove and re add the break point while the app is running, it will become checked but once I run the debugger the break point turns back into a blue dot.
If I put a break point in one of the first lines of the application class, like in it's constructor, it will trigger and then my deeper break points will fire. But if I don't make this out of the way break point (in the main class) the following break points are not firing.
Thoughts?
Flex Builder 4.5
SDK 4.5.1
Debugger 11.6.5.635 (in FireFox)I haven’t seen that before, but in theory would be possible if several SWFs are being loaded and you get a class collision and the breakpoint in the app changes the timing of the loaded SWFs.
-
Firefox not firing .add_endRequest function
I have a dropdown box inside the tabpanel in my asp.net web application. in that dropdown I have calling on onselectedindexchange event. After changing the values in the drop down box the function endrequesthandler function "Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);" firing successfully when browsing my site with IE. While browsing my site with Firefox the function endrequesthandler function "Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);" is not firing. Can anyone give your valuble suggestion for solving this problem? This one is very urgent for our project. Many thanks...
in my aspx page,<br />
<br />
<pre><nowiki><ajaxtoolkit:TabPanel ID="TbDailyMatches" runat="server" HeaderText="Daily Matches">
<ContentTemplate>
<asp.Label id="Label1" runat="server"></asp:label>
<asp:DropDownList ID="dropdown1" AutoPostBack="true" runat="server"
Height="25px" Width="150px" Style="left: 135px;
top: 34px;" OnSelectedIndexChanged="dropdown1_SelectedIndexChanged">
</asp:DropDownList>
</ContentTemplate></ajaxtoolkit:TabPanel>
</nowiki></pre>
in my codehind,
<pre><nowiki>protected void dropdown1_SelectedIndexChanged(object sender, EventArgs e)
label1.Text = "<b>Alert:</b> " + dropdown1.SelectedValue;
Load(dropdown1.SelectedValue);
</nowiki></pre>
my javascript
<pre><nowiki>function FormLoad() {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
alert('label1');
}</nowiki></pre>I guess we don't have a lot of .Net developers on this site.
Obviously your server-side .Net code has to be translated into corresponding client-side JavaScript in order to add event handlers to the page. And errors running that JavaScript should appear in the Error Console (Ctrl+Shift+j).
If the console doesn't provide any insight, can you provide a link to the page that has the problem? Then it would be possible to view the code that Firefox actually is (or is supposed to be) executing. -
Firefox not firing the IOErrorEvent
Firefox not firing the IOErrorEvent when load fails due to
unavailability of internet connection in URLLoader.
I am loading data in my application based on user actions. If
the user is disconnected and he makes a request for data load, the
IOErrorEvent tied to the URLLoader object is not being thrown in
firefox. The same thing works fine for IE where on IOErrorEvent I
am displaying appropriate message but in case of firefox nothing is
happening.
Any ideas about what is going on.
RahilI guess we don't have a lot of .Net developers on this site.
Obviously your server-side .Net code has to be translated into corresponding client-side JavaScript in order to add event handlers to the page. And errors running that JavaScript should appear in the Error Console (Ctrl+Shift+j).
If the console doesn't provide any insight, can you provide a link to the page that has the problem? Then it would be possible to view the code that Firefox actually is (or is supposed to be) executing. -
CS Extension, Script UI and events not firing in Photoshop CS5
Hi!
I'm a bit confused with two technologies dealing with SWF panels. There was a technique in the previous versions of Photoshop when SWF content has been loaded into a ScriptUI Window. Is it changed? Or does it still work together with CS Extension extensions?
I have a script that creates ScriptUI Window and then loads an SWF into it. It has a custom 'mousemove' event listener that helped to move this window around the screen. Now - in the new Photoshop CS5 (I tried 12.0.1 as well) - it seems like the 'mousemove' event is not fired for ScriptUI windows containing SWFs.
I'm not sure, maybe it has something to do with the new SWF treament in CS5?
If I'm wrong, then I'm sorry, if this question doesn't fall into this forum's area of expertise.
Thank you!10x,
You saved my ***!
It actually has to include both the PHSP "AND" the PHXS host names for it to work - this is stupid!
If I only use PHXS the extension manager is not able to install the extension, saying it cannot find a host that matches the manifest (even though my photoshop IS the extended variation, so in a sense it's more acurate manifest-wise), and if I only use the PHSP, it IS loaded but doesn't appear in the application!
AND THERE IS NO DOCUMENTATION ON THIS PHENOMENON ANYWHERE!
THIS IS BEYOND IRRESPONSIBLE!
Thank you very much david, but please, as you are an adobe employee, get this message to the right people, if you can.
I know the corporate agenda would probabely be the incentivise people to register to the 1500$ program to get the extension-builder, by keeping the alternative inconvenient, but this issue is beyond inconvenient, it's border-line cruelty! -
Many threads on application.onDisconnect not firing but seemingly no solution
I've dug some threads up and included links at the end of this post. Have some more work to do researching it but figured I'd get the ball rolling.
Essentially one can't depend on application.onDisconnect() firing at the close of a client's browser. It happens sometimes. But with some apps, it just doesn't happen at all. I've watched the FMS management console as I've repeatedly opened and closed a particular app I'm developing. Connections don't die with each browser close. The net result is a piling up of connections. My app has a "connected users" list in it. It gets packed with multiple connections from the same client.
Eventually, after 5-10 mins, the connections disappear on their own. Not good though. One of the functions in my app lets someone select a user in the list and send a direct chat. This feature isn't working because disconnections are not registering real time. Some of the people in the user list are not really there anymore.
I get the problem in both IE8 and FireFox 3.5.3 on FMS 3.52. Others have reported the problem in various browsers and FMS versions going way back. Problem's been around for some time.
This guy has the same problem and a nice description, although he experienced only in IE:
onDisconnect Errors in Internet Explorer: (http://www.flashnewz.com/ondisconnect-errors-in-internet-explorer/)
After reading the accounts at the links gathered below, I get the feeling it might not necessarily be an FMS problem alone, but rather some combo of browser, SWFObject implementation, and perhaps particular features used (or not used) in the client ActionScript. Nobody's seemed to nail down the precise combination though.
Pretty much a show stopper. Has anyone developed viable work arounds?
Thread: onDisconnect() IE7 problem: (http://fmsguru.com/forum/messages.cfm?threadid=EEC6D52A-BAB2-526D-5CD9FF490332B8D8)
onDisconnect Not Firing in IE6/7 With SWFObject 2: (http://www.flashcomguru.com/index.cfm/2008/8/7/swfobject-problem-ie-fms)
Do not call onDisconnect when closing browser: (http://www.wowzamedia.com/forums/showthread.php?t=5521)
BUG -Flash Media Interactive Server 3: (http://www.justskins.com/forums/bug-flash-media-interactive-server-3-a-141282.html)
onDisconnect Event in FMS 2.0: (http://forums.adobe.com/thread/98366)
Topic: Detecting ungraceful disconnects? (http://www.flashcomguru.com/forum/forum_posts.asp?TID=2848&PN=0&TPN=2)
Why Flash Media Server does not call application.onDisconnect handler: (http://stackoverflow.com/questions/359727/why-flash-media-server-does-not-call-application -ondisconnect-handler)////////////////////////////////////////////////////////////////////////////////////client side///////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////
var nc = new NetConnection()
nc.onStatus = function (o)
trace(o.code);
nc.connect("rtmp://YourAccount.rtmphost.com/AppDirectory");
nc.imHere = function(p_b)
trace("imHere");
return (true)
////////////////////////////////////////////////////////////////server side///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////
load("Delegate.asc");
application.onConnect = function(p_o)
this.acceptConnection(p_o);
p_o.clientIsBad= function()
trace ("is bad")
clearInterval(this.resultInt);
clearInterval(this.checkInt);
application.disconnect(this);
p_o.clientIsGood = function()
trace ("is good")
clearInterval(this.resultInt);
p_o.checkValid = function()
trace("watcha!");
clearInterval(this.resultInt)
this.resultInt = setInterval( p_o, "clientIsBad", 2000 );
this.call("imHere",{onResult:Delegate.create(p_o, this.clientIsGood),onStatus:Delegate.create()} );;
p_o.checkInt = setInterval( p_o, "checkValid", 120000 ); -
PlEASE HELP EASY QUESTION: unload event is not firing at all.
Hi, onUnload event is not firing in Safari browser. I tried with different ways to capture that event but i failed to capture that event. So please help me on this, give suggestions to capture that event. Or any other event is firing when window is closing. Actually, i need to execute when window is closing. But in Safari the window is closing without firing of any events.
Safari doesn't execute the unLoad action when closing windows, period!
It only executes it when loading another page.
I might be wrong but I think Safari doesn't allow you to close a window with Javascript at all. All close events are blocked.
Maybe a SWF file can do it somehow. But I'm not sure... -
WHEN-CUSTOM-ITEM-EVENT - not firing. Please Help
Hi Grant,
WHEN-CUSTOM-ITEM-EVENT - not firing. Please Help..
I need a help from you.
1) I have developed an form to browse the client machine and upload the file on server / table
2) Registered the form in Oracle Apps 11.5.10.
3) Currently i am able to open the File_Dialog and browse throught the clients machine
But when ever user selects any file and says Open, i am not able to retrieve the file name. wHEN-CUSTOM-ITEM-EVENT is not
firing. I am sure how we can invoke this CUSTOM-ITEM-EVENT.
To devlop the form i have referred PERWSIMG.fmb - of Oracle (Apps) HRMS which uploads the employee photo in the Database.
Hence i have used the same java code / Implementaion Class.
Please help...
Regards
SameerHi Francois,
You were right. I re-loaded the zip file and the original version works. Odd, as I don't remember ever modifying those files.
But my original issue still remains.
The only code I've added is this:
Color mycolor = this.getBackground() ;
setBackground(mycolor);to the CalendarFrame constructor. How could this be causing the trigger to not fire?
Could it be the way I created the bean? I copied all the java files to my project, attached the libraries, created a deployment profile. Everything compiles without errors or warnings, and the jar is created without issues. The java console doesn't give any errors either.
Thanks for all your help,
A
Edited by: Abigail Parmar on Mar 26, 2009 1:01 PM -
TweenEvent.MOTION_FINISH not firing
I have created a class which loads an image (using another
custom class), and provides a transition each time the image source
is changed. Here, when the swapImage() method is called, it should
set a new image source for the imageLoader object (which is simply
a wrapper for a Loader class), set a fade out, and then an event
listener for the end of the tween is supposed to fire off,
providing a fade back in and new image load. For some reason, no
matter what I do here, the TweenEvent is not firing off (the trace
action I put in confirms this, as it never traces). I've tried
moving addEventListener for the tween event to both the constructor
and the swapImage method, with no success. For some reason it's
like the TweenEvent is not registering across the class somehow.
I've done simliar things many times, and never encountered this
issue. Is it a scope issue? Any help would be appreciated..thanks!your TweenEvent is a tween class event, not a movieclip
event: add your listener to your tween. -
Just upgraded to OSX 10.6.1 running Safari 4.0.3 last week - everything was working BEFORE the upgrade - but now for some reason I have an issue where pages ARE loading including larger banners, text flash animations etc, but if the site contains small thumbnails they are not loading.
The icon in the web bar spins and spins for ages and then suddenly where the thumbnails should be I get the blue question make as if the links are broken - which there not as this is happening to well know sites such as youtube gettyimages and ebay and its just to the thumbnails?????
Take ebay for example, the homepage page loads in fine, and if I search for a product - the page with the listing all loads but not the thumbnail images, yet if I click a listing the full page loads without a problem?
Any advice, I have cleared the cookies and javascript database all to no avail?HI,
Try Safari Maintenance
Carolyn -
Upgraded to FF4 sites were slow loading or not loading at all - then I discovered it downloads if I keep moving the cursor. If I stop moving the cursor the downloading stops or slows to a crawl again. What do I do so no need to keep having to move cursor?THE DOWNLOADING ICON STOPS MOVING UNLESS I KEEP MOVING THE CURSOR AROUND.
Clear Cookies & Cache
* https://support.mozilla.com/en-US/kb/Template:clearCookiesCache
Clear the Network Cache
* https://support.mozilla.com/en-US/kb/How%20to%20clear%20the%20cache#w_clear-the-cache
Troubleshooting extensions and themes
* https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
Check and tell if its working. -
Key-nextrec not firing in forms 10g
I have a code in the above trigger, but it is not firing, I have it in the block property and no other place in the form
message('In key next rec----'); message(' ');
IF :SYSTEM.Last_Record = 'TRUE' Then
Null;
Else
next_record;
End If;when-new-record-instance runs when you navigate to the next record.
Key-Nxtrec (Nxtrec is the correct spelling) only runs when you press the key assigned to call that trigger. In my environment, it is the Shift+ Down-Arrow key, but it could be just Down-Arrow -- it all depends on what key sequence is assigned to Forms Function Number 67 in your Forms Resource file, FMRWEB.res (or fmrusw.res).
So if the trigger runs when you press the correct keyboard key, and you issue the message but do not call the Next_Record; built-in, focus will not navigate to the next record in your running form.
Maybe you are looking for
-
Error when downloading videos in iTunes
Been trying to download Gwen Stefani's "Cool" Video for the past hour. When it completely downloads, an error message pops up in iTunes that says "There was an error downloading your purchases music. An unknown error occured (0xFFFE7958)" Anyone else
-
My pictures wont open in camera raw how do i fix this??
i can't open my pictures in camera raw every time i try it says, Bridge requires that a qualifying product has been launched at least once to enable this feature..... anyone know what to do??
-
Privately Owned and Cascade Delete in DB
HI, What is the relationship between setting privately owned in Toplink vs creating a cascade delete in Oracle DB? If I've the cascade delete in DB then what is the advantage of setting the privately owned flag in toplink? Thanks
-
Hi I'm loading data from an XML file with html specific tags so I can put all the formatting of the text field in the XML file, my XML looks something like this: <?xml version="1.0" encoding="utf-8"?> <screen> <text> <english> <p>96% of CEOs believe
-
What is the code to embed a h.264 Quicktime file in a html page so it appears to be embedded like Flash video or like on the Apple page. I want the code to link to video files on my server. Thanks.