A way to load external files in applications WebWorks

Hi all

I am facing the following problem.

My application is able to play the animation sequences of 16 colors on a screen of matrix of LED 34 x 18.

I am working on a set of tools that make it relatively easy for people to create their own animations play in my application. I'd love to see what other people come up with.

But here's the problem: how they load these new animations in my application? On Palm WebOS, it is possible to load a file from any Web host on this platform, I can simply tell the user to put a file on their Web host and enter the URL in my application.

However, on the PlayBook every domain must be added explicitly permission in the file config.xml for the APP. Therefore, it is impossible for users to load their own Web host files in my application.

Before I spend more time perfecting these tools for end users (I already use the myself but right now they are a little gross) so I need to know if it will be possible for users to put the files they have created with my tools on their playbook and whether it will be possible to load a file into my application at a given time for example by offering a "Browse" button which exposes the local file system to select a file.

Is it possible (going to be)? If so, I also opened a repository for people to present animations created then possibly include in next updates of the application.

Let me know!

p.s. the app can be seen here.

In the entertainment section you can see the various animations that I created with my tool. They are stored in a JSON file.

You can whitelist ' *' to allow access from all domains.

I think that this limits the possibility for all areas of access to the api specific blackberry however.

I'm sure it's documented somewhere in the WebWorks getting started guides?

Tags: BlackBerry Developers

Similar Questions

  • Loading external files in Oracle - error (double quotes on the columns)

    I managed to successfully load some external files (Excel) in my Oracle database, but when I questioned the table, I see that some of the columns have quotation marks on them. No idea how to fix this problem?

    OPTIONALLY ENCLOSED BY quotes in your syntax to remove.
    http://www.morganslibrary.org/reference/externaltab.html

  • load an external file with urlloader doesn't work in AIR

    Had some problems with the loading of an external xml file with urloader. Read somewhere to use

    file.applicationDirectory.resolvePath('examplefileURL.xml');

    -What is the normal way to load external xml files or indeed all files as SWFs etc... and what about mobile is that the only way?

    not exactly.

    1 applicationDirectory is a static property of the File class.

    2. you probably don't want to use applicationDirectory and

    3. you must use the file system class to load files from local file system:

    var file:File = File.applicationStorageDirectory.resolvePath ('examplefileURL.xml');

    var fs:FileSystem = new FileSystem();

    ISA Open (file, FileMode.READ);

    var XML = XML (fs.readUTFBytes (fs.bytesAvailable));

    ISA Close();

    trace (XML. ToXmlString());

  • Loading external images

    Can someone tell me if there is a way to load external images into a SWF file. The size of the file becomes large enough, and I'm trying reduced.
    Thank you

    http://www.Kirupa.com/developer/FlashCS3/loading_image_as3_pg2.htm

  • Help... way of loading of packages

    Hi all
    have u ever faced this problem?

    I wrote a SWF what bunch of loading external files (swf that contains the audio file) as below:

    function soundSetup() {}
    for (i = 1; i < = numItem; i ++) {}
    for (j = 1; j < = subelement; j ++) {}
    var obj = eval("core.set_"+i+"._"+j);
    Str = "1_2_" + i + j + ".swf";
    loadMovie (str, obj.clip);
    kernel. LP.core_btn.onRelease = function() {}
    };
    obj.core_btn.onRelease = function() {}
    itemOnRelease (this);
    };
    }
    }
    }

    It works completely fine as a stand-alone file, it also works fine when I play it in Dreamweaver,
    but when I test it on all of the html code, I can't hear the sound more, the code is just as usual:
    < object classid = "" clsid 27CDB6E-AE6D-11cf - 96B 8-444553540000 "codebase =" " http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6, 0,29,0 ' width ="500"height ="410">"
    "< param name ="movie"value ="... / swf/1_2/tones.1.2.swf ">"
    < param name = "quality" value = "high" >
    "" < embed src = "... / swf/1_2/tones.1.2.swf"quality = "high" pluginspage =" http://www.macromedia.com/go/getflashplayer ' type =" application/x-shockwave-flash"width ="500"height ="410"> < / embed > < / object >

    Anyone know why?
    Thank you very much...

    the default path when loading objects in flash starts from the same folder as the html file that loads the SWF in _level0. You're talking about files are not in this folder and that is why you are having trouble. There are a number of remedies, including specifying the folder to use when you load your SWF files containing sounds or drop SWFs that contain sounds in the same folder as the html file that is used to load your file swf in _level0.

  • Load external images in symbol or rectangle

    Hello

    Is a way to load external images into a symbol or a rectangle?

    Just google this topic and all the results I found looks like no work aboard animate 2014.1.1

    something like $(this.lookupSelector("target")).attr("src","folder/myimg.jpg");

    Loading jquery im - 2.1.1.min.js

    Thank you.

    Ok. If you have a container div, then it's easy. png or jpg or svg extension

    SYM. $('containerDivName') .css ({'background-image': 'url ("images/imageName.png")', 'background-repeat': 'no-repeat'});

  • Load the file vidlist.xml with ActionScript

    Hello world

    I'm following lessons on ActionScript 3.0 11 (classroom in a book) and I use Flash CS4 professional; I have successfully copied and participated from the CD in my PC lessons. I'm to the point where she describes the process of loading external files dynamically using the xml list. I followed to a tee, however when I came along to test, it loads the list but the next video. Please note that the first video is of the components Inspector.

    Can anyone shed some light on this?

    Thank you

    softkens

    Hello Kglad,

    I found the problem, it is this statement: var nextVid:String = "... /Video/"+vidList_XML.vid[Count].file;

    It should be: var nextVid:String = vidList_XML.vid [count] mpfprojectdir\dev10\src\csharp\projectbase.file; It works fine now. Thank you.

  • How to get external file´s size without loading it?

    Hi guys, I m here for you once again ask for your help. I m trying to build a ' file load external class "which allows to calculate the percentage of files loaded while it loads a file per hour. But I want to use it without building a loading queue system. I just want to know the method all my external files size (just the number of bytes) without charge. Is there a way?

    There is no way for a web-based application information on the file without loading.

    You may be able to get information about the file when you use a projector or air without loading application.

    you create a projector or the application of air?

  • Loading external swf into an Air application

    Hi all

    I have build an Adobe Air app for desktop PC and have problems to load an external swf. Whenever I try to load, I get:

    SecurityError: Error #2070: security sandbox violation... cannot access stage owned by app... blah blah

    The file is loading is in a local directory, but I understand its in an another "sandbox" that represents a security risk.


    Is there a way to get around this?


    Any help would be appreciated


    Thank you very much


    Matt

    That's why I added these comments on domain of the swf file.  for locally loaded SWF files, 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 e-mail of swf file trying to load is stored locally, so I guess that this error is logical. However if I comment on this line, I get the same error "cannot access stage owned by app"?

    See below for the 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 void assetPreview() {}

    addEventListener(Event.ADDED_TO_STAGE, initialise);

    }

    public void 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 void viewPreview(e:Event):void

    {

    addChild (mainSWF);

    mainSWF.addChild (loader);

    }

    }

    }

  • Loading external SWF files: make things simple... Still need to help here =)

    Hi all! First of all, sorry for my English... I'm Brazilian and English is not my mother tongue.

    This is my first post , supposed to be my first post and I'm learning AS3. Didn't know this forum, but now I hope to have time to visit it a lot for help and be helped! =)

    Well, I am trying to import external files to my main flash with buttons file. Yes, this is a newbie question, but I'm learning... I click the button 1 and content 1 is loaded, click on the button 2 and content 2 is loaded and so on. So, I got two ways to do:

    edit: The code below works fine now...

    montreal.addEventListener (MouseEvent.MOUSE_UP, loadCity);
    dublin.addEventListener (MouseEvent.MOUSE_UP, loadCity);
    sydney.addEventListener (MouseEvent.MOUSE_UP, loadCity);
    ...

    var box: MovieClip = new MovieClip();
    addChild (box);
    Box.x = 20;
    Box.y = 20;

    function loadCity (event: MouseEvent): void {}
    currentCity var = event.target.name;
    remove all the children from the box
    While (box.numChildren > 0) {box.removeChildAt (0) ;}}
    var swfRequest:URLRequest = new URLRequest (currentCity + ".swf");
    var swfLoader:Loader = new Loader();
    swfLoader.load (swfRequest);
    box.addChild (swfLoader) ;}

    The problem with this first selection, is that whenever I click on a button, it repeats the content of the 'box'... instead, the loaded content is stacked on the last of them, and I know not how to clean it... The user Andrei toured with the statement "all" so that the code above works, but I don't know how to use tween with him...

    So here's the second option:

    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;

    Montreal .buttonMode = true;
    dublin.buttonMode = true;
    sydney.buttonMode = true;
    rio.buttonMode = true;
    paris.buttonMode = true;
    london.buttonMode = true;
    home.buttonMode = true;

    var box: MovieClip = new MovieClip();
    addChild (box);
    Box.x = 20;
    Box.y = 20;

    var cityLoader:Loader = new Loader();
    var cityURL:URLRequest = new URLRequest ("montreal.swf"); I use it to show a city when the site is open
    cityLoader.load (cityURL);
    box.addChild (cityLoader);

    * Here I add headphones to button, each calling its own function as:

    montreal.addEventListener (MouseEvent.CLICK, loadMontreal);

    function cityTweens (): void {}
    var cityIn:Tween = new Tween (box, "y", Strong.easeOut,-350, 20, 1, true) ;}

    function loadMontreal(event:MouseEvent):void {}
    var cityURL:URLRequest = new URLRequest ("montreal.swf");
    cityLoader.load (cityURL);
    cityTweens() ;}

    function loadDublin(event:MouseEvent):void {}
    var cityURL:URLRequest = new URLRequest ("dublin.swf");
    cityLoader.load (cityURL);
    cityTweens() ;}

    function loadSydney(event:MouseEvent):void {}
    var cityURL:URLRequest = new URLRequest ("sydney.swf");
    cityLoader.load (cityURL);
    cityTweens() ;}

    function loadRio(event:MouseEvent):void {}
    var cityURL:URLRequest = new URLRequest ("rio.swf");
    cityLoader.load (cityURL);
    cityTweens() ;}

    function loadParis(event:MouseEvent):void {}
    var cityURL:URLRequest = new URLRequest ("paris.swf");
    cityLoader.load (cityURL);
    cityTweens() ;}

    function loadLondon(event:MouseEvent):void {}
    var cityURL:URLRequest = new URLRequest ("london.swf");


    cityLoader.load (cityURL);
    cityTweens() ;}

    function loadHome(event:MouseEvent):void {}
    var cityURL:URLRequest = new URLRequest ("home.swf");
    cityLoader.load (cityURL);
    cityTweens() ;}


    Well well, the second option "" works, but I have some problems with interpolation of... I have to wait the Tween to complete before you click another button or the interpolation will be bug... I know not how to disable buttons until the Tween is finished .

    Now, I used to have a Tween for each function, but now I got inside a function and just call it inside each function. Simple for you but I thought WOW, when I had the idea and put it into practice! But I repeat myself again a lot of code here with the "cityLoader.load (cityURL); but when I try to put it inside the function "cityTweens", it will just open the city of Montreal, maybe because I'm the appellant as soon as the site opens...

    I'm pretty sure I can make simple things, like mixing the idea of the first code (currentCity + ".swf") so I do not need to call a function for each button. I don't know how... ...

    Could someone help me? Also, I will be VERY happy if you give me a tip as good practices that I'm not following.
    Thanks in advance!

    Post edited by: newToAS3

    Adjustments to the code that deal with it below. This is not a complete code - make full changes yourself.

    import flash.events.EventDispatcher;
    // hold all the buttons in an array
    var buttons:Array = [montreal, dublin, sydney, rio, paris, london, home];
    // add listeners
    addListeners();
    // function that adds listeners
    function addListeners() {
         for (var k:String in buttons) {
              EventDispatcher(buttons[k]).addEventListener(MouseEvent.CLICK, loadSWF);
         }
    }
    // removes event listeners
    function removeListeners() {
         for (var k:String in buttons) {
              EventDispatcher(buttons[k]).removeEventListener(MouseEvent.CLICK, loadSWF);
         }
    }
    
    function loadSWF(e:MouseEvent):void {
         // remove listeners
         removeListeners();
         // the rest of code goes here
    }
    
    function tweenFinished(e:TweenEvent):void {
         // add listeners back
         addListeners();
         // make Tween instance eligible for arbage collection
         e.target.removeEventListener(TweenEvent.MOTION_FINISH, tweenFinished);
         // now you can remove tweened object from the box
         box.removeChild(e.target.obj);
         e.target.obj = null;
    }
    
  • Loading external SWF files: make things simple...

    Hi all! This is my first post and I'm learning AS3 =)

    I didn't know this forum, but now I hope to have time to come hear a lot, to help and be helped!

    Well, I am trying to import external files to my main flash with buttons file. Yes, this is a newbie question, but I'm learning... I click the button 1 and content 1 is loaded, click on the button 2 and content 2 is loaded and so on. So, I got two ways to do:

    * various buttons with the listeners to run the function 'loadCity '.

    var box: MovieClip = new MovieClip();
    addChild (box);
    Box.x = 20;
    Box.y = 20;

    function loadCity (Event: MouseEvent): void {}
    var currentCity = Event.target.name;
    var swfRequest:URLRequest = new URLRequest (currentCity + ".swf");
    var swfLoader:Loader = new Loader();
    swfLoader.load (swfRequest);
    box.addChild (swfLoader); }

    The problem with this first selection is that the content of the box is not renewed with each click, but he stacked one on the other, so I can't use it.

    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;

    var box: MovieClip = new MovieClip();
    addChild (box);
    Box.x = 20;
    Box.y = 20;

    var cityLoader:Loader = new Loader();
    var cityURL:URLRequest = new URLRequest ("montreal.swf");
    cityLoader.load (cityURL);
    box.addChild (cityLoader);

    * various buttons with listeners to run its own functions, such as 'montreal.addEventListener (MouseEvent.CLICK, loadMontreal)';

    var box: MovieClip = new MovieClip();
    addChild (box);
    Box.x = 20;
    Box.y = 20;

    function loadCity (Event: MouseEvent): void {}
    var currentCity = Event.target.name;
    var swfRequest:URLRequest = new URLRequest (currentCity + ".swf");
    var swfLoader:Loader = new Loader();
    swfLoader.load (swfRequest);
    box.addChild (swfLoader); }

    The problem with this first selection is that the content of the box is not renewed with each click, but he stacked one on the other, so I can't use it.

    You can remove all the children from the box before placing another object inside:

    function loadCity (event:MouseEvent):void {
         var currentCity = event.target.name;
         // remove all the children of the box
         while (box.numChildren > 0) {
              box.removeChildAt(0);
         }
         var swfRequest:URLRequest = new URLRequest(currentCity + ".swf");
         var swfLoader:Loader = new Loader();
         swfLoader.load(swfRequest);
         box.addChild(swfLoader);
    }
    

    I see that you intend to use tween - in this case code above you does not have transitions gracefully...

  • Load external wav files

    I'm currently import mp3 files using the loadSound feature. Problem is, because of some problems of mp3 encoding that I can't use this format due to problems of loop, so I turn to .wav files that work very well. The thing is, if I try to import wav files using the loadSound function it does not work... do not play the wavs.

    Is there a way I can load external wav files in flash?

    You can load a wav, but you can't seem to play by using loadSound().

  • Hi, I deleted my acrobat application on my mobile by mistake and therefore lost all of my files... Is there a way to retrieve pdf files... I didn't save any to my laptop?

    Hi, I deleted my acrobat application on my mobile by mistake and therefore lost all of my files... Is there a way to retrieve pdf files... I didn't save any to my laptop? Re

    Hijosephinek95123236,

    PDF files are not saved in the application. They must be in the local memory of the mobile device or if they are stored on the cloud of document, then they will be available under the cloud of document tab.

    Please reinstall the Acrobat Reader application on your mobile device to access the document.

    To transfer the PDF files from mobile device on laptop: -.

    If the files are saved on the cloud of document, then you can access the file on your laptop using this link https://cloud.acrobat.com/folder/7efb457b-c1b5-4d6b-89d1-96b1ede2a167 , the files can be downloaded from here.

    Otherwise, if the files are on the local memory of the mobile device, then you can send the file or transfer them using a data cable.

    Kind regards
    Nicos

  • Problem with loading external swf files

    Hello

    I am currently working on a project which is an interactive and dynamic elemtry school presentation to the Denmark. I finished my project and it works perfectly, but only locally on my computer.

    The final draft should be implemented on the site and public work. I tried to implement the project on the site and unfortunately, it does not work as expected.

    When all the files where transferred to the ftp server, only a single files are responding and appear correctly.

    Interactivity of the project is based on a structure of Action script, which is based on the smooth transition between swf files (load another swf file after the action is triggered by clicking on a button) do any work.

    After days of trying to figure out the solution, I'm totally lost. One thing is to publish the project so that all action script will work and answer between swf files, and the other thing is to make it user-friendly for the Android and apple products.

    The presentation is quite heavy because of its loading external swf content files, which are images and movies.

    I really hope you can help me with my problem. I will gladly share the files and codes if it would help solve the problem.

    Best regards

    Agata

    It could be a problem of location of file from loading.  When you place a swf file in an HTML base for targeting anything that the SWF load becomes the folder of the html page.  You may need to adjust the target so that the target of swf files, load it as if it were in the same folder as the html page.

  • How to load external swf files into the AIR

    I try this code its working at the computer, but when I publish this .apk or .ipa file, my external swf file does not open

    (I included my external file as well)

    places_btn.addEventListener (MouseEvent.MOUSE_DOWN, newvid);

    function newvid(event:MouseEvent) {}

    trace ("you clicked me");

    var loadit = new Loader();

    addChild (loadit);

    loadit. Load (new URLRequest ("scene02.swf"));

    }

    01.jpg

    Add this in your newid function:

    You forgot to put the beginning of your original function:

    var loadit = new Loader();

    addChild (loadit);

    var _lc:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    loadit. Load (new URLRequest ("scene02.swf"), _lc);

Maybe you are looking for

  • Your Mac has been blocked

    Someone has got this and how do I make Apple aware of this problem? I received a pop up on Google Maps with the following message. I suspect its malware but don't know what to do. The word is not the number. Does anyone know how I can send it to Appl

  • String table in full

    Sorry to ask a such simple question here. I get a string of numbers such as 11.812. I want to convert this string 11.812 in full. Currently, I tried to use a decimal string to the number, but all I get is 11. I need clarification 11.812. Please help

  • HP LaserJet Pro P1606DN compatible w / Airport Express?

    I'm going to buy a new Mac Pro and would like to be able to print wireless to a laser printer. I like the HP LaserJet Pro P1606DN, but this isn't a printer wireless, itself. I understand after talking with a representative from Apple that a printer n

  • HP pavilion s5-1414

    Anyone know the proper way to remove a hard drive of this unit?  I want it slave on another computer, but I don't have a way out. Thank you very much PS. Oh and youtube was of no help James

  • HP Pavilion Slimline computer Office S5610F - drivers Windows XP

    Hello HP Forum, My father recently bought a HP Pavilion Slimline S5610F desktop, refurbished and wants that I format and install Windows XP. I was wondering if this is possible? In the past, I have sought answers from this forum and have always made