Question: I'm very sorry for asking such a beginner question, but I just learned the basics of JS without and do not completely understand the new ES6-features.

I just want to use [rangy](https://github.com/timdown/rangy) within my project and initialize the rangy object within `<script></script>`-Tags in my html-file (Blade-template) with the following method

```
rangy.init();

```

The rangy-library consists of six files, all of whom I included into my footer.

Chrome console tells me that rangy is undefined. What do I need to do? 
I tried thousands of syntactical variants of `import` but the console tells me `unexpected token import` 

I tried compiling the files down to one file with Laravel mix (mix.babel, mix.js, mix.scripts), nothing worked.
I'm pretty sure I just need to grasp the concept of how to work with ES6-Modules but not tutorial really helped. Maybe one of you can help me to figure out how to use rangy in this particular case?

Thanks in advance!

Answer: 
Use the behavior manager to run other applications from within your main app.
<http://doc.aldebaran.com/2-5/naoqi/core/albehaviormanager.html>

E.g.

```
self.behaviorManager = self.session.service("ALBehaviorManager")
self.behaviorManager.runBehavior("System/animations/Stand/Reactions/SeeSomething_1")

```

So you might want to call runBehavior("usr/run\_dialog\_dev") when a human is detected.
> 
> Is there a way my robot to be able to use the defined phrases in the basic speech and the phrases defined in my application simultaneously?
> 
> 
> 

If you want to add your sentences to the basic speech, you can use [collaborative dialogs](http://doc.aldebaran.com/2-5/naoqi/interaction/dialog/aldialog.html?highlight=collaborative%20dialog#collaborative-dialog-vs-applications) and even start your app on demand with the command `^switchFocus(my-app/my-behavior)`. All topics (from all apps) that are defined as "collaborative dialogs" will be loaded when the "basic speech" starts. Be careful that only the topic is started, not the app it comes from!

> 
> Is there a way my application to call this basic speech without quiting my application
> 
> 
> 

You can use `ALDialog.runDialog` ([doc here](http://doc.aldebaran.com/2-5/naoqi/interaction/dialog/aldialog-api.html#ALDialogProxy::runDialog)) but you need to think how to go back and forth between your application topic and the basic general topics. 

Example: when Pepper wants to present different products, what happens after you ask "What time is it?", the robot answers and is now off-topic, but then what? you will need to find a way to drive the user back into topic!

> 
> Is there a way to run multiple application I have created in parallel?
> 
> 
> 

`runBehavior` will do the trick yes, but be careful that the concurrent behaviors won't make the robot do two things at the same time (movements for example). A better architecture would be to have a collaborative dialog that switches focus to the right application to answer, then goes back to the general basic speech.