Loading external Swf into a specific area in Fla file

I'm sure this question has been asked a trillion time. But truth be told there's no good tutorial for this out there!
I am trying to load an external swf slide show into my fla file. I want to be able to load into a specific place on the stage.
I have this code for preloader that loads in an external swf, but it covers the entire swf. Is there any way of changing this slightly to allow it to be loaded in one spot?
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("Fuggles Brasserie Restaurant4.swf"));
function loop(e:ProgressEvent):void
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString() +"%";
function done(e:Event):void
removeChildAt(0);
percent = null;
addChild(l);
Cheers
t

If the loaded object fills the stage, then I have to wonder why you need to locate it anywhere specific.  Or is it possible you are just unloading the rest of the visuals when you use that removeChildAt(0) command such that the loaded object is the only thing  remaining.  In any case, you can assign x and y properties to the Loader ( I do it in the done function, but locating the Loader can be done anytime after it is instantiated)...
function done(e:Event):void
     removeChildAt(0);
     percent = null;
     l.x = someX;
     l.y = someY;
     addChild(l);

Similar Messages

  • Load external swf into a specific _level

    Hi there,
    I am loading an external swf into the mc 'image' using:
    image.loadMovieNum("portfolio/100_design/1.swf", 1);
    Every time a new image loads, I want it to load the level above, ie:
    image.loadMovieNum("portfolio/100_design/1.swf", 2);
    Is there a way this can be done dynamically. For example, "current level + 1"
    Many thanks

    is the first frame of your loaded swf's empty?  if yes, then no problem using _levels.
    if not, do you mind a momentary flash when your next swf loads and before its _alpha is assigned 0 and then faded-in?  if you don't mind, then no problem using _levels.
    if you do mind that momentary flash, then using _levels will be more complex than using empty target movieclips.  is there some good reason to use _levels instead of target movieclips?

  • Loading external swf into Fla. not working

    I have created a Flash page that loads an external swf into
    it when you click a button. The swf loads but the actionscript
    assigned to the swf which scrolls images across does not work. When
    i open the swf in a browser window with the direct link to it the
    scroll works but inside the fla file the swf loads but the scroll
    buttons are not working at all. Would this be something in the
    actionscripting in the swf or fla file. Any advice would be greatly
    appreciated, thank you.

    var imageRequest:URLRequest = new URLRequest("my_gallery.swf");
    var imageLoader:Loader = new Loader();
    imageLoader.load(imageRequest);
    addChild(imageLoader);
    is as3 code.  that won't work in your as2 project.
    here's the equivalent in as2:
    this.createEmptyMovieClip("targetMC",this.getNextHighestDepth());
    targetMC.loadMovie("my_gallery.swf");

  • Error 2044 when loading external swf into my site

    Ok what i have is a site made from 1 flash file where i am loading external swf files for my picture galleries. now what is happening is in Flash, dreamweaver and when i test the site, everything is working perfectly, the problem is coming when i go into internet explorer go to the site and click on the flash button to go to the picture gallery, that is when it is giving me a Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
    does anyone know why this is happening and a possible way to fix it? thanks

    See if the following link helps at all...
    http://www.gotoandlearnforum.com/viewtopic.php?f=29&t=20453

  • [ISSUE] Load external .swf into an AIR for iOS app

    I want to load an external .swf which is included theme objects of the application. The loader class finishes loading but after this when I try to get objects in the swf I get this error.
    Device is iPad v.2 iOS v5.1.
    ReferenceError: Error #1065: Variable MenuHome is not defined.
        at adaptive.controls.thememanager::ApplyTheme/applyStyle()[D:\ConsumerProductInterface\Consu merProductBusiness\src\adaptive\controls\thememanager\ApplyTheme.as:41]
        at adaptive.controls.thememanager::ApplyTheme/apply()[D:\ConsumerProductInterface\ConsumerPr oductBusiness\src\adaptive\controls\thememanager\ApplyTheme.as:54]
        at adaptive.controls.thememanager::ThemeManagerSystem/checkIfAllLoaded()[D:\ConsumerProductI nterface\ConsumerProductBusiness\src\adaptive\controls\thememanager\ThemeManagerSystem.as: 139]
        at adaptive.controls.thememanager::ThemeManagerSystem/backgroundImageLoadHandler()[D:\Consum erProductInterface\ConsumerProductBusiness\src\adaptive\controls\thememanager\ThemeManager System.as:119]
        at adaptive.controls.thememanager::ThemeManagerSystem/backgroundImageLoadHandler()
        at flash.events::EventDispatcher/dispatchEvent()
        at adaptive.controls.thememanager::ThemeManagerImageLoader/loadImageCompleteHandler()[D:\Con sumerProductInterface\ConsumerProductBusiness\src\adaptive\controls\thememanager\ThemeMana gerImageLoader.as:60]
        at adaptive.controls.thememanager::ThemeManagerImageLoader/loadImageCompleteHandler()
        at flash.events::EventDispatcher/dispatchEvent()
        at adaptive.controls.imageloader::ImageLoader/imageCompleteHandler()[D:\ConsumerProductInter face\ConsumerProductControls\src\adaptive\controls\imageloader\ImageLoader.as:32]
        at adaptive.controls.imageloader::ImageLoader/imageCompleteHandler()
    Steps are:
    1- Create a .fla file and one object in it (like below):
    2- In Flash Builder 4.6
    Load the external swf:
                    var swfLoader:Loader = new Loader();
                    var url:URLRequest = new URLRequest("themes/DefaultTheme/DefaultTheme.swf");
                    var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                    swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
                    swfLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                    swfLoader.load(url, loaderContext);
            private function completeHandler(event:Event):void
                var evt:LoadThemeSWFEvent = new LoadThemeSWFEvent(LoadThemeSWFEvent.COMPLETE);
                if (AdaptiveHelper.getInstance().platform == PlatformType.DESKTOP)
                    evt.swfLoader = SWFLoader(event.currentTarget);
                else
                    evt.loader = Loader(event.currentTarget.loader)
                dispatchEvent(evt);
              // load is OK
            private function ioErrorHandler(event:IOErrorEvent):void
    After load is complete I tried to get the object from the swf file and use it as a skin class of a button.
    cssSelector.setStyle(property, Class(content.loaderInfo.applicationDomain.getDefinition("MainMenu")));
    I am stuck here. Any ideas what the problem is?
    My Best,
    Suat

    Hi Suat,
    Can you send me a sample application  @[email protected] with which I can reproduce your problem and can look into the issue?
    Thanks,
    Nimisha

  • Trouble loading external .SWF into my main page with preloaders

    Dear All,
    I am working on my first Flash project with AS3.
    The structure of the flash site is pretty simple. I have a
    stage 1165px wide x 710px height
    Inside my Stage I have an horizontal bar with a menu followed
    by a container right under.
    **** My goal
    is that whenever I click on one of the button on the menu, that the
    related external .SWF loads into
    the container with a preloading bar and %. *****
    I already did all my .SWF files and it is pretty frustrating
    at this point to be stuck at this point of development.
    Please help.
    -Alex

    Visit gotoandlearn.com. There is a video tutorial there
    regarding preloading that should answer most, if not all, of your
    wonderings.

  • Load external swf into existing mc

    I think this is very old question,
    in as2 you can just add a external swf inside a mc.  like this -  loadMovie ("example.swf", "_root.mc");  and that's it.
    how do i do that in as3? this following doesn't work..
    var newLoader:Loader = new Loader();
    function loadMc(evt:MouseEvent) {
        var request:URLRequest = new URLRequest("example.swf");
        newLoader.load(request);
        addChild(mc.newLoader);
    can I go remove mc first, and then add the swf as mc again?
    removeChild(mc);
    addChild(mc);

    Hi, moccamaximum,
    thank  you, going to test-fail-test for a while with this.
    meanwhile Im gonna ask ahead another thing
    Hi kglad, you gave me the source file for jpegTest yesterday, I tested it work like charm,
    now you have these,
    import JPEGEncoder;
    var bmpd:BitmapData=new BitmapData(mc.width,mc.height);
    bmpd.draw(mc);
    var jpegEnc:JPEGEncoder =  new JPEGEncoder(75);
    var jpegDat:ByteArray = jpegEnc.encode(bmpd);
    then in function localSave it send jpegDat to php for generating the jpeg.
    I want to pack these into calling function, so after example.swf loaded into mc, can call the function so the jpegDat will have the data of example.swf and generate the jpeg from it? 
    jpgDatGenerate('mc');
    function jpgDatGenerate (target) {
    var bmpd:BitmapData=new BitmapData(target.width,target.height);
    bmpd.draw(target);
    var jpegEnc:JPEGEncoder =  new JPEGEncoder(75);
    var jpegDat:ByteArray = jpegEnc.encode(bmpd);
    obviously something wrong, it gives me something about jpegDat not defined at localSave
    what have I missed?

  • Loading external swf into Air App

    Hi All,
    I'm building an Adobe Air App for desktop and am having problems loading an external swf. Every time i try to load i get:
    SecurityError: Error #2070: Security sandbox violation........ cannot access Stage owned by app....blah blah
    The file that is being loaded is in a local directory, but as i understand its in a different 'sandbox' which is a security risk.
    Is there any way around this?!
    Any help would be much appreciated
    Many Thanks
    Matt

    that's why i added those comments about the swf's domain.  for locally loaded swfs, use:
    SFMltd wrote:
    Hi Kglad, Thanks for the Example.
    if i run my class with securityDomain = SecurityDomain.currentDomain; then it throws this error: SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property.
    The swf file im trying to load is stored locally so i guess this error makes sense. However if i comment out that line i get the same "cannot access Stage owned by app" error?
    See below for class:
    package  {
      import flash.display.MovieClip;
      import flash.filesystem.File;
      import flash.events.Event;
      import flash.net.FileReference;
      import flash.events.MouseEvent;
      import flash.display.Loader;
      import flash.net.URLRequest;
      import flash.system.LoaderContext;
      import flash.system.ApplicationDomain;
      import flash.system.SecurityDomain;
      public class assetPreview extends MovieClip {
      private var loader:Loader;
      private var mainSWF:MovieClip = new MovieClip();
      public function assetPreview() {
      addEventListener(Event.ADDED_TO_STAGE, initialise);
      public function initialise(e:Event):void
      removeEventListener(Event.ADDED_TO_STAGE, initialise);
      var allowSWF:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);
    // allowSWF.securityDomain = SecurityDomain.currentDomain;
      loader = new Loader();
      loader.load( new URLRequest(settingsXML.pathToSWF),allowSWF);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE, viewPreview);
      public function viewPreview(e:Event):void
      addChild(mainSWF);
      mainSWF.addChild(loader);

  • Loading external SWFs into current ApplicationDomain

    Hi everyone,
    I've refactored a whole project, splitting the main FLA file into 1 main FLA file and 10+ asset FLA files.
    Each asset FLA file main stage is empty and has no Document Class associated. Instead, each asset file's library contains a MovieClip linked to an .as class.
    The loader is first added to the stage, then is told to start to downloading the 10 asset SWF files.
    When the download is completed, my application starts instancing the class coming from the asset files.
    Now, the problem is the following : when I try to access a stage instance from a downloaded clip (for example, a textfield that has been drag&dropped and named via the Flash IDE) , I encounter the #1009 error, saying the stage instance is null...
    Anyone has a clue?
    I can provide an simplified version of my problem inside a .zip/rar file if asked.
    Thanks

    It's now OK.
    The problem is solved by calling addChild on each swf downloaded by the loader... It seems that calling removeChild afterwards doesn't corrupt any thing, so the solution, withouht being brillant, is pretty clean.

  • Loading external SWF into a FLA (help!!!)

    Hello,
    I'm building a website in AS2.  I have created a xml driven flash image gallery and am trying to get this into my website.  I'm totally new to flash.  
    In the website I'm building, I have a gallery button on the main page with this code:
    over3_btn.onRelease = function(){
        play();
        target="gallery";
    Which I understand that when you click it, it brings you to the gallery keyframe and play it's contents.  Then I found this code:
    var imageRequest:URLRequest = new URLRequest("my_gallery.swf");
    var imageLoader:Loader = new Loader();
    imageLoader.load(imageRequest);
    addChild(imageLoader);
    Which I pasted into the gallery keyframe, hoping that it will call up the gallery, however, this didn't work.
    Please help.  I've search far and wide and couldn't find anything that would work.
    Here is my the code to my gallery.  Maybe I'm coding it incorrectly?
    var myGalleryXML = new XML();
    myGalleryXML.ignoreWhite = true;
    myGalleryXML.load("gallery.xml");
    myGalleryXML.onLoad = function() {
    _root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
    _root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
    _root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
    _root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
    _root.myImages = myGalleryXML.firstChild.childNodes;
    _root.myImagesTotal = myImages.length;
    _root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
    _root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
    _root.full_x = myGalleryXML.firstChild.attributes.full_x;
    _root.full_y = myGalleryXML.firstChild.attributes.full_y;
    callThumbs();
    createMask();
    scrolling();
    function callThumbs() {
    _root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
    container_mc._x = _root.gallery_x;
    container_mc._y = _root.gallery_y;
    var clipLoader = new MovieClipLoader();
    var preloader = new Object();
    clipLoader.addListener(preloader);
    for (i=0; i<_root.myImagesTotal; i++) {
    thumbURL = myImages[i].attributes.thumb_url;
    myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth() );
    myThumb_mc._x = _root.thumb_width*i;
    clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
    preloader.onLoadStart = function(target) {
    target.createTextField("my_txt",target.getNextHighestDepth(),0,0,100,20);
    target.my_txt.selectable = false;
    preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
    target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
    preloader.onLoadComplete=function(target){
    target.my_txt.removeTextField();
    target.onRelease=function(){
    callFullImage(this._name);
    function callFullImage(myNumber) {
    myURL = myImages[myNumber].attributes.full_url;
    myTitle = myImages[myNumber].attributes.title;
    _root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
    fullImage_mc._x = _root.full_x;
    fullImage_mc._y = _root.full_y;
    var fullClipLoader = new MovieClipLoader();
    var fullPreloader = new Object();
    fullClipLoader.addListener(fullPreloader);
    fullPreloader.onLoadStart = function(target) {
    target.createTextField("my_txt",target.getNextHighestDepth(),0,0,200,20);
    target.my_txt.selectable = false;
    fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
    target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
    fullPreloader.onLoadComplete = function(target) {
    target.my_txt.text = myTitle;
    fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
    function createMask() {
    _root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
    mask_mc._x = _root.gallery_x;
    mask_mc._y = _root.gallery_y;
    mask_mc.beginFill(0x000000,100);
    mask_mc.lineTo(_root.gallery_width,0);
    mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
    mask_mc.lineTo(0,_root.gallery_height);
    mask_mc.lineTo(0,0);
    container_mc.setMask(mask_mc);
    function scrolling() {
    _root.onEnterFrame = function() {
    container_mc._x += Math.cos(((mask_mc._xmouse)/mask_mc._width)*Math.PI)*15;
    if (container_mc._x>mask_mc._x) {
    container_mc._x = mask_mc._x;
    if (container_mc._x<(mask_mc._x-(container_mc._width-mask_mc._width))) {
    container_mc._x = mask_mc._x-(container_mc._width-mask_mc._width);
    Would really really appreciate any help I can get.  Thuy

    var imageRequest:URLRequest = new URLRequest("my_gallery.swf");
    var imageLoader:Loader = new Loader();
    imageLoader.load(imageRequest);
    addChild(imageLoader);
    is as3 code.  that won't work in your as2 project.
    here's the equivalent in as2:
    this.createEmptyMovieClip("targetMC",this.getNextHighestDepth());
    targetMC.loadMovie("my_gallery.swf");

  • Loading external swf  not complete

    Hi, I'm trying to load external swf (with more than one frame and actionscript 3 on every frame - I used there "timeline" coding) from my main swf.
    code for loading external swf into main swf:
    var loader01:Loader;
    function openGame1(evt:Event):void
    loader01 = new Loader();
    var requestSWF01:URLRequest = new URLRequest("game01.swf");
    loader01.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, processHandler);
    loader01.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
    loader01.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
    loader01.load(requestSWF01);
    addChild(loader01);
    function processHandler(evt:ProgressEvent):void
    var loaded:Number=evt.target.bytesLoaded;
    var total:Number=evt.target.bytesTotal;
    var stav:Number=loaded/total;
    loaded_txt.text=(Math.round(stav*100))+" %";
    function initHandler(evt:Event):void{
    loaded_txt.text="";
    function errorHandler(evt:IOErrorEvent):void
         trace ("Error: " + evt.text);
    I found out that this works only for loading swf, which has only one frame (and all actionscript on that frame)... It seems that if there are more frames, than it will not load complete swf (hmm maybe it is caused, because not all objects on frames are export in first frame). Preloading starts but after for example 20 % the event.INIT is fired and the external swf starts to play (and crashes..).
    You can see this here http://bvyborcik.xf.cz/  If you click on the blue building on the left with blinking text "Start hry" you will see what happens - preloading is not completed and after clicking on first floor btn, the swf crashes...
    Please is there a solution for this kind of problem?  Any help or pointing is welcome.
    regards Boris

    just curious, is the file you want to load the swf into set up exactly the same way with the same stage size, fps, and layers?

  • Loading external swf / resizing

    Hi,
    I'm loading external swf into my main project for sub sections to keep size down.  My main project is 1280 x 700px in size.
    In those sub-section I have some content with a scroller.
    When I load the swf and check the size its ok. But as soon as the scrollbars is initialized scroll bar is initialized the size of the external includes the text that goes off-stage for the sroller.
    I can resize it propotionaly when after its loader because i have the correct values. But if the user resizes his browser I get the wrong values and my resize code doesnt work because it's height is now incorrect.
    So is there a way to not include the off-stage elements to count as the height ?

    either hard-code that loaded swf's stage size or use code to determine that size in a frame before any off-stage content is added.

  • Help with loading External SWFs

    Hi:
    I need to load external swfs into a mc. They will play in
    sequence, as soon as one ends, the next one will start. When
    running it blows by the first external swf (start.swf) and the rest
    of the external swfs will not continue to load and play after the
    objectives.swf. Could someone take a look at my code and tell me
    what I’m doing wrong?
    I’ve created controls that will allow me to play, pause
    and stop the external swfs while they’re playing (however,
    these buttons do not seem to have any effect on the external swf
    when it is playing). I think it is a scope issue, but I am not
    sure.
    Also, there’s a combo box at the bottom, which allows
    the user to jump to any external swf (it actually jumps to certain
    labels on the main timeline) at any time. The combo box appears to
    work OK.
    The FLA is located at:
    www.digitalhorizonstudios.com/exstream/newplayer.fla
    By the way, this presentation is a fullscreen .exe file when
    in use, not a swf played in an html file.
    Thanks SO MUCH for any help on this one.

    Please try this line of script:
    var myLoader:Loader = new Loader(); //create the varaible for the loader
    var myURL:URLRequest = new URLRequest("A.swf");// create the variable for the swf to be loaded
    myLoader.load(myURL)
    addChild(myLoader);

  • Loading an external .swf into an empty container

    I'm loading an external .swf into an empty container.
    Everything seems to work fine except when the .swf is loaded both
    seems to be running extremely sluggish. The button rollovers are
    slow, the page transitions..everything. I can't figure out why it
    is doing this. Both .fla's have the same frame rate. Is there some
    known reason why this might happen?

    well, we've tried that and it is actually a little bit worse.
    Normally i test everything in a browser window anyway. I'm thinking
    it might be a naming issue of some variable or something that is
    the same for both fla's....not sure yet though.

  • How can I load an external SWF into a movie clip that's inside other movie clip?

    Hi.
    I creating my first flash (actionscript 3.0) website but I'm
    stuck with a visual effect I want to create.
    I have a window on my website called contentWindow. Every
    time you click a button this window is supposed to leave the stage,
    load the requested content and return to the stage.
    The sliding window is a movie clip with 83 frames, 21 to
    enter the stage, 21 to leave the stage again, 20 for nothing (its
    just to simulate the loading time) and 21 to return to the stage.
    Now my goal is, when the user clicks on a navigation button,
    the window exits the stage, loads an external SWF with the content,
    and then returns to the stage.
    I've the "window" movie clip with an instance name of
    "contentWindow". Inside there is another movie clip with an
    instance name of "contentLoader". The content that the user
    requested should appear inside the "contentLoader".
    Now, when the contentWindow leaves the stage, I get this
    error message:
    quote:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at rwd_fla::MainTimeline/trigger()
    If I switch
    "contentWindow.contentLoader.addChild(navLoader);" for
    "contentWindow.addChild(navLoader);" it works fine, but the
    external SWF doesn't move with the window.
    How can I load an external SWF into a movie clip that's
    inside other movie clip?

    Hi,
    Recently, I have been putting together a flash presentation.
    And I am just wondering if the following might help you, in your
    communication with the said swf file:
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    onComplete);
    function onComplete(event:Event):void
    event.target.content.thinggy_mc.y -= 100;
    Not the best example, but this allows you to target a mc
    within an external swf file. I think if you look up this code, you
    will have an answer ;)
    Kind Regards,
    Boxing Boom

Maybe you are looking for

  • Error using DBMS_METADATA package

    Hi All, I have the following query and trying to get the DDLs for the foreign Key constraint on tables SELECT   TO_CHAR (DBMS_METADATA.get_ddl ('CONSTRAINT', constraint_name))            || ';'     FROM   all_constraints    WHERE   status = 'ENABLED'

  • How do I open a pdf sent to me in email in iBooks

    I received a link to a PDF document in an e-mail. It gose to trm.brassring.com. When I see it on the scrren, at the very top of the page it flashe  open in i-books, very quickly and then hide. I touch that part of the scrren again, quickly and touch

  • CrystalActiveXReportViewer  inconsistent doesn't display text

    Hi   I have designed report using CrystalActiveXReportViewer in VBA. This report display data in "Cross Tab" format. Currently for one user this report doesn't display column header and row header in Cross Tab, but display all other data in cross tab

  • Ultiboard part wizard doesn't show any copper layers during part creation

    Ultiboard part wizard doesn't show any copper layers during part creation. I have to check the box to activate Copper Top in the part editor, once the part is made in order to see what I've made. I suspect there is a connection between this issue and

  • Order probability in quotation

    Hello, Has anyone worked with Probability in % of a quotation leading into a sales order? On the item category (AGN for example) you can predefine a percentage for order probability. The help text reads: "When you enter a value, the sales probability