Check value once swf is loaded

There are 50 movies loaded sequentially. From Q1 thru Q29 I want to attach a particular title (mc) to the main movie and then for Q30 thru Q40 another and so on. The file is on an Learning Management Sytem so I'm using SCORM code.
A movie is loaded in a clip in the main movie. A bookmark is set.
_parent.saveBookmark("Q1");
_parent.test1();
The main move has this code on the first frame:
function saveBookmark(loc:String) {
   scorm.set("cmi.core.lesson_location", loc);
   scorm.save();
function getBookmark():String {
  return scorm.get("cmi.core.lesson_location");
var bookmark:String = getBookmark();
var mySubstring:Number = Number(bookmark.substr(1));
//There's a Q in my bookmark!
if(bookmark.indexOf("Q") !== -1 && bookmark !== undefined){
   //add the underscore after the Q to match filename
   bookmark = bookmark.split("Q").join("Q_");
   swfURL = bookmark +".swf";
   trace(swfURL);
function testi() {
    trace(mySubstring);
    trace("ahhh");
if (mySubstring <= 29 && isNaN(mySubstring) == true && bookmark !== undefined){
    attachMovie("title_foundational", "ttl_foundational", 1, {_x: 217, _y: 5});
startPreload(swfURL);
I'm lost.

Hi, I noticed at the top of your code, you have _parent.test1 and at the bottom of your code, you call function testi<------ not sure if this helps..!!
_parent.saveBookmark("Q1");
_parent.test1();
// The main move has this code on the first frame:
function saveBookmark(loc:String) {
scorm.set("cmi.core.lesson_location",loc);
scorm.save();
function getBookmark():String {
return scorm.get("cmi.core.lesson_location");
var bookmark:String = getBookmark();
var mySubstring:Number = Number(bookmark.substr(1));
//There's a Q in my bookmark!
if (bookmark.indexOf("Q") !== -1 && bookmark !== undefined) {
//add the underscore after the Q to match filename
bookmark = bookmark.split("Q").join("Q_");
swfURL = bookmark+".swf";
trace(swfURL);
function testi() {
trace(mySubstring);
trace("ahhh");
if (mySubstring<=29 && isNaN(mySubstring) == true && bookmark !== undefined) {
  attachMovie("title_foundational","ttl_foundational",1,{_x:217, _y:5});
startPreload(swfURL);

Similar Messages

  • Checking an external swf is loaded?

    Hi
    I'm loading an external .swf via typing the swf name into an input text field and hitting a submit button.
    The swf loads fine, but I'm trying to incorporate updating a status text field on a succesful load or if there is an error during loading.
    I can't find my mistake in the code - to me it should be making  load_status_txt display "ok", but the swf just loads with no status update.
    All the text fileds are fine, because if I code  load_status_txt.text = "hello" straight after addChild(loader); -  load_status_txt displays "hello"
    Can anyone see an obvious mistake below?
    Thanks so much again.
    Shaun
    loadSwfBut.addEventListener("mouseDown", sendData)
    function sendData(evt:Event){
        if(loadSwf.text !=""){
    var Xpos:Number = 0;
    var Ypos:Number = 100;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest(loadSwf.text);
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
            loader.addEventListener(Event.COMPLETE, dataOnLoad);
        } else load_status_txt.text = "All fields are mandatory"
    function dataOnLoad(evt:Event): void{
        load_status_txt.text = "ok";
    stop();

    use:
    loadSwfBut.addEventListener("mouseDown", sendData)
    function sendData(evt:Event){
        if(loadSwf.text !=""){
    var Xpos:Number = 0;
    var Ypos:Number = 100;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest(loadSwf.text);
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataOnLoad);
        } else load_status_txt.text = "All fields are mandatory"
    function dataOnLoad(evt:Event): void{
        load_status_txt.text = "ok";
    stop();

  • How to know if a certain SWF is loaded

    Hi all,
    I'd like to do if a certain SWF is loaded do some actions:
    I upload many swf at the same location and the user can navigate them with Next and Back buttons.
    one of the swf has some buttons.
    I'd like to check if that swf is loaded then do some action.
    how ?
    page.addChild(swfLoader);
    var ext:MovieClip;
    var ch1_btns:Array;
    swfLoader.contentLoaderInfo.addEventListener(Event  .COMPLETE, onCompleteLoad);
    function onCompleteLoad(e:Event):void
    ext = MovieClip(swfLoader.content);
    ch1_btns = new Array(ext.less1, ext.less2, ext.less3, ext.less4, ext.less5, ext.less6, ext.quiz);
    for(var k:Number = 0; k < ch1_btns.length; k++)
    ch1_btns[k].addEventListener(MouseEvent.CLICK, onChapter1Buttons);
    in the code above, I have created an array of the buttons in the first swf, so the array will be created when any SWF will be loaded.
    and the Error #1010: A term is undefined and has no properties. is out.
    How I can stick to a certain SWF.
    thanks in advance

    page.addChild(swfLoader);
    var ext:MovieClip;
    var ch1_btns:Array;
    swfLoader.contentLoaderInfo.addEventListener(Event  .COMPLETE, onCompleteLoad);
    function onCompleteLoad(e:Event):void
    ext = MovieClip(swfLoader.content);
    if(ext.less1){
    ch1_btns = new Array(ext.less1, ext.less2, ext.less3, ext.less4, ext.less5, ext.less6, ext.quiz);
    for(var k:Number = 0; k < ch1_btns.length; k++)
    ch1_btns[k].addEventListener(MouseEvent.CLICK, onChapter1Buttons);

  • How can I reference the main timeline on a swf once it was loaded into another?

    I have an swf with some custon animation functions using actionscript 3. I'm refering to the main timeline with Movieclip(root) and it works just fine.
    However, this swf is going to be loaded inside another (a custom player), and when that happends, everything stops working.
    I think it's because the Movieclip(root) is now referencing to the loader swf and not the loaded anymore, but I just can't find any information on how to fix that.

    This is basically what I´m doing here:
    I'm placing this code on frame 1, and calling the function textAnimate() whenever I need to insert some text.
    // This is a variable I created for tracking the timeline
    var base:MovieClip = MovieClip(root);
    function textAnimate(movieName:String, espera:Number):void {
              //var espera:Number = 1; //Waiting time
              var objeto:MovieClip = base[movieName]; //Variable to select the object
              var posFinal:Number = objeto.x; // Object position
              var posEnter:String = "-160"; // Animation start (relative)
              var posExit:String = "+160"; // Animation end (relative)
              // enter animation
              TweenMax.from(objeto, 1, {x:posEnter, alpha:0, blurFilter:{blurX:40}, ease:Back.easeOut});
              //call exitAnimation() after X seconds
              TweenMax.delayedCall(espera,exitAnimation);
              //exit animation
              function exitAnimation() {
                        TweenMax.to(objeto, 1, {x:posExit, alpha:0, blurFilter:{blurX:40}, ease:Back.easeIn});
    The swf works fine, but once it´s loaded into the player, nothing works anymore. Unfortunately, I don't have the code for the player, and can't change anything about it... :/

  • HOW can I make a .SWF default load after its first load?

    When you have the SAME parent API on every page of an (X)HTML website, can a .SWF tell itself to load from a default position when a website user navigates to different HTML pages?
    Here's my parent API as it stands:
    http://www.playingthepoet.com/
    HOW can you tell the .SWF to load from a default position once the .SWF has loaded a first time? AND from any page of the website, not just the Home page? This is an advanced .SWF networking issue. And I'm not sure if the best solution is a Javascript of if there's a direct AS3 programming solution.
    The blurs and fade-ins are a bunch of timer variables and timer event methods timer event listeners. I want that intro ONLY ONCE. And NOT every time a user changes HTML pages. Please help, and MANY thanks for your time!!
    NT

    Hi ,
    You can set a variable say "count" on stage composition ready -
    sym.setVariable("count" , 0);
    On stage click , you keep checking the value of this variable -
    if(sym.getVariable("count") == 5)
      sym.$("Symbol_2").show();
    //Here "Symbol_2" is the next button that you want to appear on screen(which is initially invisible) when the symbol_1 is clicked say 5 times.
    Now, on click of a button , you keep updating the variable count -
    var countnew = sym.getVariable("count");
    countnew = countnew+1;
    sym.setVariable("count" , countnew);
    Attaching the sample for reference.
    Thanks and Regards,
    Sudeshna Sarkar

  • Gallery tree swf not loading

    I am using the gallery_tree.fla provided in the Samples for
    Flash 8 Pro to build a small photo gallery, substituting the name
    of my xml file in this line of code in the action script:
    treeDP_xml.load("bbq_gallery_07.xml"); .
    I used the gallery_tree.xml, substituting my image filenames
    in the nodes. I placed the images, the .xml and the .swf in the
    same folder. The .swf will play if I open it on my local machine in
    a browser, but on the web server, it just continues to show the
    loader but no images or tree.
    My .xml and Actionscript is attached. Suggestions as to my
    problem?

    Seems odd it will only run once. Usually if a cache problem
    you get the same
    results even when you update the movie or server scripts.
    If it is
    http:// it is not local even if from the browser
    cache.
    Verify the html is validated.
    Check to see if this applies to all swfs. Create a simple
    hello world swf
    that connects to a JSP script that returns a simple value to
    Flash. If that
    seems to work, then the problem is in the JSP or
    Actionscripting coding.
    Check you can load the JSP script repeatedly using a direct
    call to it on
    the browser line using
    http://.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "srikanth_s_india" <[email protected]> wrote
    in message
    news:e6obld$lfb$[email protected]..
    > Thanks for the article link.
    >
    > I can't provide the URL as it is within our application
    which requires
    > logging
    > in. However, one more interesting thing about it is that
    it always works
    > for
    > the first time (in the browser/machine) but not from the
    next time.
    >
    > My doubt is whether it is because of the caching? When
    it loads for the
    > first
    > time, the HTML and SWF files load from our server and
    hence are allowed to
    > communicate with our JSP. However, when it loads the
    subsequent times, it
    > probably loads from the cache and hence considered as a
    local file and not
    > allowed to communicate with our JSP file which is on the
    Internet.
    >
    > Can anybody tell me how to enable a local SWF file to
    load SWF files from
    > the
    > Internet & access URLs from the Internet in Flash 8
    pluggin?
    >

  • I want to load external swf in movieclip and next external swf should load Automatically

    I want to load external swf in movieclip and next external swf should load Automatically when current swf is finished in AS3.
    How can we can check total frame and current frame of imported swf in a movie clip.
    any help will be appreciated
    regards,
    Jatin Dembla

    in as3 you use the loader class (not movieclips) to load external swfs.
    you can use an Event.COMPLETE event listener (applied to the loader's contentLoaderInfo property) to check when loading is complete and start the next swf loading.
    you can use the loader's content property (caste as a movieclip) to determine info (including totalFrames) about the loaded swf's main timelnie (once loading is initialized, for the totalFrames, or complete, for some other properties like height and width).
    var loader:Loader=new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadcompleteF);
    loader.load(new URLRequest("swf1.swf"));
    var loadedSWF:MovieClip;
    function loadcompleteF(e:Event):void{
    loadedSWF=MovieClip(loader.content);
    trace(loadedSWF.totalFrames);

  • The value returned from the load function is not of type numeric  errors after migration to Coldfusion 11

    I am currently testing our website with CF11. It is currently working with CF8 however after migrating it to a new server running CF11 I have encountered the following error.
    The value returned from the load function is not of type numeric.
    The error occurred in
    D:/Applications/CFusion/CustomTags/nec/com/objects/address.cfc: line 263
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/contact.cfc: line 331
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 510
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 1675
    Called from D:/website/NECPhase2/action.validate.cfm: line 54
    261 : <cfif isNumeric(get.idCountry)>
    262 : <cfset rc = this.objCountry.setID(get.idCountry)>
    263 : <cfset rc = this.objCountry.load()>
    264 : </cfif>
    265 : <cfset this.sPostcode = get.sPostcode>
    Have there been any changes between CF8 and CF11 that could  cause this error?
    Does anyone have ideas?

    This is the code in file object file country.cfc (nec.com.objects.country):
    <cfcomponent displayname="Country object" hint="This is a Country object, it allows you to access and set values in the Country.">
    <!---
    // Construct this object
    --->
    <cfset this.objFunctions = CreateObject( 'component', 'nec.com.system.functions' )>
    <cfscript>
      this.idCountryID = 0;
      this.sCountryName = "";
      this.sISOCode = "";
      this.sDHLCode = "";
      this.iErrorID = "";
    </cfscript>
    <!---
    // The following functions are the setters and getters. offering us a better way to get
    // at the contents of the object
    --->
    <!---
    // Getters
    --->
    <cffunction name="getID" displayname="Get ID" returntype="numeric" output="false" hint="This returns the ID of the current item.">
      <cfreturn this.idCountryID>
    </cffunction>
    <cffunction name="getsCountryName" displayname="Get sCountryName" returntype="string" output="false" hint="This gets the sCountryName value of this item.">
      <cfreturn this.sCountryName>
    </cffunction>
    <cffunction name="getsISOCode" displayname="Get sISOCode" returntype="string" output="false" hint="This gets the sISOCode value of this item.">
      <cfreturn this.sISOCode>
    </cffunction>
    <cffunction name="getsDHLCode" displayname="Get sDHLCode" returntype="string" output="false" hint="This gets the sDHLCode value of this item.">
      <cfreturn this.sDHLCode>
    </cffunction>
    <cffunction name="iError" displayname="Get iError" returntype="numeric" output="false" hint="This returns the iError of the current item.">
      <cfreturn this.iError>
    </cffunction>
    <!---
    // Setters
    --->
    <cffunction name="setID" displayname="Set ID" returntype="boolean" output="false" hint="This sets the ID value of this item.">
      <cfargument name="idCountryID" required="true" type="numeric" displayname="ID" hint="The ID to use.">
      <cfset this.idCountryID = arguments.idCountryID>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsCountryName" displayname="Set sCountryName" returntype="boolean" output="false" hint="This sets the sCountryName value of this item.">
      <cfargument name="sCountryName" required="true" type="string" displayname="sCountryName" hint="The sCountryName to use.">
      <cfset this.sCountryName = arguments.sCountryName>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsISOCode" displayname="Set sISOCode" returntype="boolean" output="false" hint="This sets the sISOCode value of this item.">
      <cfargument name="sISOCode" required="true" type="string" displayname="sISOCode" hint="The sISOCode to use.">
      <cfset this.sISOCode = arguments.sISOCode>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsDHLCode" displayname="Set sDHLCode" returntype="boolean" output="false" hint="This sets the sDHLCode value of this item.">
      <cfargument name="sDHLCode" required="true" type="string" displayname="sDHLCode" hint="The sDHLCode to use.">
      <cfset this.sDHLCode = arguments.sDHLCode>
      <cfreturn true>
    </cffunction>
    <!---
    // Clear, to empty out the contents of this object
    --->
    <cffunction name="clear" displayname="Clear items Details" returntype="boolean" output="false" hint="Clears out all of the items details.">
      <cfscript>
       this.sCountryName = "";
       this.sISOCode = "";
       this.sDHLCode = "";
       this.iErrorID = "";
      </cfscript>
      <cfreturn true>
    </cffunction>
    <!---
    // The following functions deal with the load, save and deleting of objects
    --->
    <!---
    // Load
    --->
    <cffunction name="load" displayname="Load items details" returntype="numeric" output="false" hint="This loads in all the information about an item.">
      <cfset rc = this.clear()>
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Check to see if it exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: checkID: '#this.idCountryID#' #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         if(isDefined("session.afr")){
          whichOne = "#session.afr.getsAFRNumber()#";
         } else {
          whichOne = "";
         iErrorID = objError.addError("A Country with that id doesn't exists.[#this.idCountryID#][#whichOne#]");
        </cfscript>
       <cfset this.iErrorID = iErrorID>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // If we got past all then then load in the details
      --->
      <cftry>
       <cfquery name="get" datasource="#sDatasource#">
        SELECT idCountryID, RTRIM(sCountryName) as sCountryName, RTRIM(sISOCode) as sISOCode, RTRIM(sDHLCode) as sDHLCode
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: get: #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfset this.idCountryID = get.idCountryID>
      <cfset this.sCountryName = get.sCountryName>
      <cfset this.sISOCode = get.sISOCode>
      <cfset this.sDHLCode = get.sDHLCode>
      <cfset this.iErrorID = "">
      <cfreturn true>
    </cffunction>
    <!---
    // Save
    --->
    <cffunction name="save" displayname="Save items Details" returntype="numeric" output="false" hint="Saves (to some source) the current details for the ID of the item.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("save: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <!---
      // If it doesn't exist, then add the record, otherwise update the record
      --->
      <cfif not checkID.recordCount>
       <cfreturn this.add()>
      <cfelse>
       <cfreturn this.update()>
      </cfif>
    </cffunction>
    <!---
    // Add
    --->
    <cffunction name="add" displayname="Add Country" returntype="numeric" output="false" hint="This adds a Country.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#'
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that name or ISO code already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <cftry>
       <cfquery name="add" datasource="#sDatasource#">
        SET nocount on
        INSERT INTO tblCountry(sCountryName, sISOCode, sDHLCode)
        VALUES('#this.objFunctions.scrubText(this.sCountryName)#','#this.objFunctions.scrubText(t his.sISOCode)#','#this.objFunctions.scrubText(this.sDHLCode)#')
        SELECT @@identity as autoID
        SET nocount off  
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: add: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn add.autoID>
    </cffunction>
    <!---
    // Update
    --->
    <cffunction name="update" displayname="Update Country" returntype="numeric" output="false" hint="This updates a Country record.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE (sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#')
        AND idCountryID <> #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("Another Country with that name already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Attempt to update the record to the datasource
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="update" datasource="#sDatasource#">
        UPDATE tblCountry
        SET sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#',
        sISOCode = '#this.objFunctions.scrubText(this.sISOCode)#',
        sDHLCode = '#this.objFunctions.scrubText(this.sDHLCode)#'
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: update: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID> 
    </cffunction>
    <!---
    // Delete
    --->
    <cffunction name="delete" displayname="Delete Country" returntype="numeric" output="false" hint="This deletes a Country record.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that id doesn't exists, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now check to see if there are any dependancies, if so we can't delete the item
      --->
      <cftry>
       <cfquery name="checkDependancies" datasource="#sDatasource#">
        SELECT idCountry
        FROM tblAddress
        WHERE idCountry = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkDependancies: idCountry: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkDependancies.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("That Country is being used by an address, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now attempt to remove the record.
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="delete" datasource="#sDatasource#">
        DELETE FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: delete: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID>
    </cffunction>
    </cfcomponent>

  • How to refresh a page in apex, once it is loaded

    Hi friends,
    I need to refresh the entire apex page automatically, once after the page is loaded. How to achieve this in apex.
    Whether need to use any DA for the auto-refresh. If so, can you kindly help me with that guys.
    Thanks
    Brgds,
    Mini

    Mini wrote:
    Hi Hari,
    Yes i have a apex page redirects from the ebs menu like you said. But for the refresh issue instead of modifying in the jsp i thought of bringing the automatic refresh for that apex page once it is loaded within apex.
    However these type of issues are sometimes get fixed by clearing browser cache or just by restarting your browser. Have you tried it?Yes i have tried, by clearing the browser cache and also by restarting the browser then too it still persist.
    Any DA action will be helpful for refreshing that page for 1sec once it is loaded. Since i dont want it to be loaded multiple times often once it is loaded.
    The refresh has to be only once if the page is loaded.
    or is it possible to Refresh the page based on the application page item through DA
    Thanks
    Brgds,
    MiniTechnically Yes, you can create a D.A. that will fire only once based on some apex page item or application item value. However this is NOT the correct solution.
    <li> When you see apex page (after clicking menu in EBS), do you see apex url in browser address bar? Can you post the URL here?
    <li> If you directly log-in to APEX (not via EBS), do you still face this issue?
    Regards,
    Hari

  • Start routine: only once per teh load but not once per data packet

    Hi,
    I would like to execute some code in start routine (in update rules) only once per the load but not once per the data packet.
    How can I implement this.
    Regards,

    I once had that same requirement, but in a datasource in R3. I'm not sure if the same solution would work in BW, though. I used a memory id to keep the variable value between packets:
    DATA: ... n_globalvar TYPE n ...
    then I added...
    IMPORT n_globalvar FROM MEMORY ID 'ZMEMID01'.
    ...at the start of the routine to retrieve to the variable the value from the memory id.
    At the end of the code, I exported the variable back to the same memory id...
    EXPORT n_globalvar to MEMORY ID 'ZMEMID01'.

  • New feature request: please show values once i sort the list in My Samples

    would like to see actual stats / values once i sort the list in My Samples, for e.g. it would be great to display the download count in the list once i sort by downloads or display the ratings once i sort by ratings, etc...
    This should be just like when i search by my name when on the samples home pg.
    hope to see this feature soon, thanks!

    I have been wanting a way to search only my threads. That would be a nice feature. I know that in the last 3,800 posts I have posted something along the line of "ZZZZ" but I can only find it by looking at most of the 3800 posts. This isn't good. I could
    narrow it down to 2000 by selecting Answered, but really I still need to search? And no don't limit my threads to any amount to make it load faster because the truth is it did not load any faster on any of the 12 machines I use.
    We are the generation of needing it all at our fingertips...Don't limit anything only facilitate us getting to the specifics we need at this second. You give someone a 1 cubic foot swimming pool and tell them that's enough cause it's all the space they can
    take up at one time anyway...Give us an ocean so we can swim in the part that is good for us but help us get there with some flippers (filters) on our own threads. And please don't tell us to use a general search on all threads...I tried to find 1 of my threads
    that way and after reading though 25 or so threads proceeded to skim the headers and after 200+ I gave up trying to find my thread because you can not unless you get really lucky.
    Thank you for your time!!!
    Chris Ward

  • How to check the default checked  value for radio button on jsp for struts

    Hello , I just want to check the default checked value in JSP for a radio button, how can i do that?
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>

    you can set the default value for property ( which you want to default selected when the form is first loaded) in reset method of the form.
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>
    In the above case you can write the code as follows in the perticular form of this jsp.
    public void reset(ActionMapping mapping, HttpServletRequest request) {
    super.reset(mapping, request);
         sale = "permanent";
    This will show the first check box default selected when the first time the page is loaded.

  • Bootcamp - Seems there is no Support for Windows 8.1 once it is loaded. Just got off the Microsoft Help line and they refused to help me because I was running Win 8.1 in Bootcamp. Where do I go for help?

    Bootcamp - Seems there is no Support from Microsoft  for Windows 8.1, once it is loaded.
    I Just got off the Microsoft Technical Help line (Australia ph132058) and they refused to help me because I am running Win 8.1 in Bootcamp.
    I have the latest Mac Book Pro Retina with a 1TB Solid State Hard drive running Win 8.1, beautiful machine, but its slower than my old MBP running windows 7 on a standard Drive.
    The niggiling problem is that it seems to hang up for seven or 8 seconds on menial tasks........ like generating a new Folder or Note etc. Otherwise it runs reasonably well but not blindingly fast....
    I wasn't aware Microsoft refused to help win 8.1 users on the Mac Platform........ shouldn't this Information be made more public...! Seems they are keen to drive potential Windows users away!!
    Any suggestions on where I should go for help on this (Windows/Bootcamp in General) would be much appreciated ? ........ don't mind paying a reasonable price if the service is good......
    I guess the wheel has turned and Microsoft are having a go at Apple again...?
    Many thanks ....... Martin V

    Thanks Turbostar.
    I was thinking along the same lines. I installed Win 8.0 Pro and upgraded to 8.1 ........ probably a bad move.
    I have bought a new 8.1 Licence but cant risk doing a complete reinstall until I have a back up machine ready. (My old MBP is getting a new hard drive) ......... so will give that a go in about a weeks time when the back up is in place. Cant risk having nothing!
    When you say "Clean Install" ..... do you mean everything ..... as in Reformat the Bootcamp sector and start from scratch.?
    I have a 2 TB LaCie Thunderbolt drive with my back up data on ..... is there a way to make the Reinstall process and large amount of Data transfer easy?
    The reinstall is something I need to read up on. I was hoping the solution might be some kind of Tune up on the SSHD.
    Good to hear you have a number of MBP's that are flying, I would be disappointed if the final quality wasnt a bit better.
    ..... do you have any tips on screen Res on the Retina ..... I am running Windows at 125% Zoom, but the Bluetooth, power, wireless, Date Icons etc are all still tiny ...... could really do with an alternative to the old "Advanced Appearance Settings"
    cheers ..... Martin V

  • GetURL not working when swf is loaded into another swf

    Ok, I need some help for something relatively simple which
    for some reason I've not been able to find any information on at
    all?
    Hopefully it will be something easy to fix.
    Essentially I have the following:
    my main movie "Home.swf"
    another movie "Sub.swf"
    I've loaded "Sub.swf" into "Home.swf" via an empty movieclip.
    Within "Sub.swf" I have some links which when clicked call
    getURL and open a HTML page in the browser.
    But for some reason the getURL isn't working and I believe
    its because the getURL is called from a loaded movie within
    "Home.swf".
    I've tried changing the actionscript to:
    _root.getURL('/mypage.html');
    _parent.getURL('/mypage.html');
    but neither (_root / _parent) seems to work?
    Need help here please.
    Many thanks.
    Kind regards,
    M.

    Hi kglad,
    Yes the button is definitely firing ok.
    In the "Sub.swf" movie, on the second frame of the timeline
    (the first frame is some preloader code) there is the following
    code:
    imgMC.mascara.onPress = function() {
    //trace('mc[activo] = ' + mc[activo]);
    switch(mc[activo])
    case _level0.imgMC.MC0:
    trace('0 - ' + mc[activo])
    break;
    case _level0.imgMC.MC1:
    trace('1 - ' + mc[activo])
    break;
    case _level0.imgMC.MC2:
    trace('2 - ' + mc[activo])
    break;
    case _level0.imgMC.MC3:
    trace('3 - ' + mc[activo])
    break;
    case _level0.imgMC.MC4:
    trace('4 - ' + mc[activo])
    break;
    case _level0.imgMC.MC5:
    trace('5 - ' + mc[activo])
    break;
    If I run this movie in Flash (ctrl-enter) then the trace
    works fine.
    But the trace stops working when I run the main "Home.swf"
    movie in Flash (ctrl-enter) when the "Sub.swf" is loaded into an
    empty movie clip.
    And when I change the trace for a getURL and test in a
    browser it still doesn't work?
    What do you reckon?
    Thanks.
    M.

  • 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?
    thanks

    Generally 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.

Maybe you are looking for

  • Help with display quality (LCD TV)

    I've hooked up my Mac mini to my Samsung 32" LCD TV via HDMI cable. The overall quality is just far from desireable and is taking away all of the fun from using this new mac. I set the resolution output to 720p, which is what the TV supports. So that

  • How to show open sales orders

    hello All I want to show a report of all sales orders that has been converted to invoices. (the sales order and invoice document numbers) Also, if they have been partially converted to invoices(so still open), it must show these sales orders as well.

  • Exported file to iCloud, how do I find it back?

    I have a sheet in Numbers which I exported as PDF. As destination I chose iCloud. I expected to find this PDF between my Numbers files in iCloud but it's not there. I can find the PDF by using CMD-space. But what would be the regular way to find this

  • Soundbooth... useless? Opinions please!

    After owning Premium Production CS3 for a year and a half, I finally finished a 30 minute short and decided to do some things in SB. I realized that from my CS2 days, that SB is a completely useless, family based for the masses, stripped down to nake

  • OWB mdl file not importing

    Hi All, I am getting the following error while importing the mdl file.All the mappings are imported except one mapping. I am using OWB 10.2.0.4.0 java.lang.NullPointerException      at oracle.wh.service.impl.mapping.component.entity.EntityKey.loadKey