Load FLV in SWF URL query string

I would like to load any flv that I have on the server in a a SWF, with a value of the URLS or FlashVars. What I don't know how to do, is get the actionscript Setup to read the value and put it in something like this:

NS. Play (myVideoName);

instead of the usual way:

NS. Play ("somevideo.flv");

So far, I have the following code:

var nc:NetConnection = new NetConnection();
NC. Connect (null);

var ns:NetStream = new NetStream (nc);

theVideo.attachedVideo (ns);

NS. Play (?);

Thanks to anyone in advance.

Any name you give the variable (in the URL string or FlashVars) is available at the root of your movie as soon as it initializes. So, if your URL looks like this:

http://www.MyURL.com/mySWF.swf?myVideoName=myVid.FLV

Then you should be able to access that variable in the way you suggest... ns.play (myVideoName)... as soon as the scenario main loads... you can place this code in an onLoad function just to make sure.

Hope that helps!

Tags: Adobe Animate

Similar Questions

  • retrieve the value of the URL query string parameter

    It seems like it should be simple, but for some reason that I can't figure out how to get the value of a variable in a URL query string.

    If it is in my address bar: http://www.whyu.com/whyplayer.html?chosenCLIP=movie

    and I want just the value of 'chosenCLIP' to use in my loaded SWF file, how can I do it in AS3?

    I think that the easiest way is to use SWFObject.

    In your HTML code:

    var flashvars = {};
    If (swfobject.getQueryParamValue ("chosenCLIP")) {}
    flashvars.clip = swfobject.getQueryParamValue ("chosenCLIP");
    }
    swfobject.embedSWF ("myMovie.swf", "myContent", "550", "400", "9.0.0"",","flashvars");

    And the clip variable will be available as a FlashVar to your movie:

    Var loaderInfo.parameters.clip = Clip;

  • PHP & amp; in a url query string variables

    I've been scratching my head for a few days now. What I'm trying to do seems so easy, but it does not work. Maybe someone can spot my problem in the code.

    What I do is enter a mysql blob unique multiple "pages" field by inserting a snippet of code into the field. This part works fine. The url of the page in question with an article of the sample is
    http://208.106.143.80/articles/articles.php?IDQ=141 & cat = 4 & PG = 1

    The url contains the article id, category, and page number. At the bottom of the page is pagination which reloads the page with another "page" of the article. The code that is:

    $totalpages = $total;
    If ($totalpages > 1) {}
    echo "< style p ='text-align: right;" > < strong > Page: < facilities > ";". "
    If ($i > 1) {}
    echo "< a href =" "." $_SERVER ['PHP_SELF']. » ? PG =". ($i - 1). "" "> < < < /A > Prev ';
    }
    for ($x = 1; $x < = $totalpages; $x ++) {}
    If ($x == $i) {}
    echo "< strong > [". "]" $x."] < facilities > ';
    }
    else {}
    echo "< strong > < a href =" "." $_SERVER ['PHP_SELF']. » ? PG = "." $x.' "> '." " $x.' < /a > < / strong > ';
    }
    }
    If ($i < $total) {}
    echo "< a href =" "." $_SERVER ['PHP_SELF']. » ? PG = "." $k.' "> then > > < /a > < /p >"; "
    }
    }

    Basically everything that I do is to launch the new query string pg = $x to the end of the url of the current page and reload the current page. And that's the problem. Even if the links on the page look right in the browser, it just continues loading the same 'page' over and over again. I can go in the url in the browser and manually change from page 1 to page 2, etc. and that works as it should.

    Ideas of someone smarter than me?

    What I'm missing here.

    Thank you all. I messed around with the script a bit more, and despite the fact that I thought that I had already tried to add the missing values of urlstring, this time when I did, it worked as it was supposed to. History of the problem.

  • URL query string

    Well so I have seen a lot of sites even this site have url that contains something that looks like this

    http://Google.com/search?=IG=HL blah blah blah

    can someone point me in the market to follow to do this properly, so I am sending you the law given through the query string just something very simple like lets say I wanted to do a say hello to page to someone

    <form name ="myform" method="post">
    <table>
    <tr><td>Name:</td><td><input type="text" name="name" /></td></tr>
    <tr><td>Age:</td><td><input type="text" name="age" /></td></tr>
    <tr><td colspan="2"><input type="submit" name="submit" value="submit" /></td></tr>
    </table>
    </form>
    
    <cfif isdefined("form.submit")and form.age neq '' and  form.name neq''>
         <cfif form.age gt 35>
              <cfoutput>#form.name# you are #form.age# years Old!!</cfoutput>
         <cfelse>
              <cfoutput>#form.name# you are #form.age# years young</cfoutput>
         </cfif>
    </cfif>
    
    

    Say rather than haivng the direct entry page of these data, I want to go to another page for the query link would look something like this

    <a href="http://index.cfm/?greet=old"></a>
    
    

    Or am I not barking to the top of the tree on the right?

    To display the url variables, you bookmark a page that has them, and then call the bookmark or click on a link that includes a query string in the url.

  • Pass the URL query string variable to Captivate?

    I created a Flash button for my total Captivate, it uses PHP to update a CSV file with the user name and the id of course.

    The user name is from a URL string. If it was just a Flash file, I could pass the page HTML using FlashVar values. My flash button is not exposed until the last slide in the room of Captivate. How can I get this value so that my Flash button can pass it?

    If the value passed to the FlashVar to the Captivate swf, is a local variable that can be called from the Flash button? I know I did not adequately explain this right, but maybe someone can decipher this enough to get the gist.

    Hello

    Just write a javascript in html function that returns the user name.

    Call this function in your flash movie using the external interface call

    Hope this helps

    Delighted Kishore.

  • Loading image when using URL query

    I asked for help, for anyone who might be able to * cough * JRab * cough *.

    .... I want to show a small gif of loading when my app is in the middle of sending a URLrequest, so it seems that my application is something, while demand happens... because when the application load it takes a few seconds to get there and also to update the content displayed...

    Any help?

    Hey tensioncore,.

    the ActivityIndicator like all preloaded, including the image he. If you want a custom image, you will need to do the setSkin() method. but I didn't yet. Here's a sample code to test the feature. There is no need of an IF ELSE statement. the corresponding code is nice and clean, and definitely in my top 5 list QNX api hah

    ActivityTest.as:

    package
    {
        import flash.display.Bitmap;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.ErrorEvent;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
    
        import qnx.ui.buttons.LabelButton;
        import qnx.ui.display.Image;
        import qnx.ui.progress.ActivityIndicator;
    
        [SWF(width="1024",height="600",backgroundColor="#e8e8e8",frameRate="30")]
        public class ActivityTest extends Sprite
        {
            private var _loader:Loader;
            private var _urlRequest:URLRequest;
            private var _image:Image;
    
            private var _btn:LabelButton;
    
            private var _activityIndicator:ActivityIndicator;
    
            public function ActivityTest()
            {
                super();
    
                // support autoOrients
                stage.align = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
    
                /**
                 * Set up the image placeholder
                 */
    
                _image = new Image();
                _image.setPosition(10,10);
    
                addChild(_image);
    
                /**
                 * Set up the activity indicator
                 * Make sure to do setSize so it gets created
                 */
    
                _activityIndicator = new ActivityIndicator();
                _activityIndicator.setSize(100,100);
                _activityIndicator.setPosition((stage.stageWidth / 2) - (_activityIndicator.width / 2), (stage.stageHeight / 2) - (_activityIndicator.height / 2));
    
                /**
                 * Sample loader getting google's homepage image
                 */
    
                _loader = new Loader();
                _urlRequest = new URLRequest("http://www.google.com/images/logos/ps_logo2.png");
    
                _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
                _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
    
                /**
                 * Button that starts things
                 */
    
                _btn = new LabelButton();
    
                _btn.label = "Load Image";
                _btn.setSize(150,52);
                _btn.setPosition(10,150);
    
                addChild(_btn);
    
                _btn.addEventListener(MouseEvent.CLICK, onClick);
    
            }
    
            private function onClick(e:MouseEvent):void
            {
                /**
                 * Start the animation and show the indicator on screen
                 */
                _activityIndicator.animate(true);
    
                addChild(_activityIndicator);
    
                /**
                 * Begin the image loading
                 */
    
                _loader.load(_urlRequest);
    
                _btn.enabled = false;
            }
    
            private function onComplete(e:Event):void
            {
                /**
                 * Stop the animation after image loaded successfully
                 * and get rid of it
                 */
                _activityIndicator.animate(false);
    
                removeChild(_activityIndicator);
    
                /**
                 * set the image to the downloaded image
                 */
    
                var bitmap:Bitmap = Bitmap(LoaderInfo(e.target).content);
    
                _image.setImage(bitmap);
            }
    
            private function onError(e:ErrorEvent):void
            {
                /**
                 * If there was an error. stop the indicator
                 */
                _activityIndicator.animate(false);
    
                removeChild(_activityIndicator);
    
                trace("error: " + e);
            }
        }
    }
    

    There are comments throughout. Basically, this application downloads googles image when you click on load image. and then when its downloading, it displays the activity indicator and get rid of it, when it finishes / generates an error.

    hope that a few things cleared up. Good luck!

  • How can I get the url query string data to a site created with the Muse? It is not module_url works in Muse.

    In my Muse created site (i.e. musesite.com), the url to the site link will be something like, www.musesite.com/homepage.html?userid=123 and I want to capture the value of username. There is documentation on the use of module_url, but documentation is vague and it's not really show in use in the Muse Awards Business Catalyst. Is there an easy way to retrieve the values of url string that does not script require extensive coding?

    Muse is strictly HTML and CSS and a little Javascript. To use URL parameters as you learn on would need a kind side Server advanced such as PHP which is out of the reach of Muse. Essentially of Muse is not the right tool, you use to achieve this.

    This works for you in Joomla because as Wordpress and they are written in PHP.

  • Query string of the URL - easy!

    It should be an easy question, but I'm deleting. I try to get the URL query string used to access my application. The Application object has a url, but it does not contain the query string. It must be stored somewhere as a URLVariables were opposed, but where? I searched the docs for URLVariables, but developers guide only talks about how configure them on a URL, not how to get from the current URL.

    in your project in the Navigator view folder...

    Look inside the html-template folder...

    This is the model that flex builder uses to generate the html file

  • Error #2101: The string passed to URLVariables.Decode must be a URL-encoded query string residues

    : Error #2101: the string passed to URLVariables.Decode must be a query string URL-encoded containing name/value pairs. to Error$ /throwError () to flash.net::URLVariables/decode() to flash.net::URLVariables() to::URLLoader/onComplete() _ flash.net stop(); var DepartVars:URLVariables = new URLVariables(); var DepartURL:URLRequest = new URLRequest ("scripts/www.mywebsite.com/depart.php"); DepartURL.method = URLRequestMethod.POST; DepartURL.data = DepartVars; var DepartLoader:URLLoader = new URLLoader; DepartLoader.dataFormat = pouvez; DepartLoader.addEventListener (Event.COMPLETE, completeDepart); depart_btn.addEventListener (MouseEvent.CLICK, DepartUser); Function to execute when you press the start function DepartUser (event: MouseEvent): void {/ / Ready variables here for shipment to PHP DepartVars.post_code = 'Start';}         Send the data to the PHP DepartLoader.load (DepartURL);         welcome_txt. Text = "processing of application...". Good journey. " } / / Close function DepartUser / / / / / function for when the PHP talk back to Flash function completedepart(event:Event):void {if (event.target.data.replyMsg == 'success') {var refreshPage:URLRequest = new URLRequest("javascript:NewWindow=window.location.reload();)} NewWindow.focus (); ("void (0);");             navigateToURL (refreshPage, "_self");         } / / CompleteDepart close function / / / / / View Code for the res button var viewRes:URLRequest = new URLRequest ("view_res.php"); viewRES_btn.addEventListener (MouseEvent.CLICK, viewResClick); function viewResClick(event:MouseEvent):void {navigateToURL (viewRes, "_self") ;} / / / / / / / / Code for the edit profile button var editRes:URLRequest = new URLRequest ("edit_res.php");} editRES_btn.addEventListener (MouseEvent.CLICK, editResClick); function editResClick(event:MouseEvent):void {navigateToURL (editRes, "_self") ;}}}

    you need a function named completeDepart to handle the return of you php script.  for example:

    function completeDepart(e:Event):void {}

    trace (e.Target.Data);

    }

  • Dissect of Eloqua own AdWords Landing Page and URL with query string parameters, please!

    I presume that for AdWords landing pages are one of the most common types in use. I'm at a new company and try to create an approach that uses the latest methods. HAFS is gradually, and a large part of the information contained in the Topliners is old (2011) as these popular posts

    What is the best way to track Google adwords through Sales Force?
    How to capture Sources referring to forms and Landing Pages using query strings

    and the references using javascript to analyze the parameters in the screens that is 2009 and is not exactly what Eloqua uses today.

    I started to look at what Eloqua uses in its own marketing efforts and saw the potentially useful parts and parts that are confusing. I thought it would be useful if someone could dissect the code of the landing page and explain how each part of the code is. I'm OK with short descriptions and references to other articles or messages to explain the different parts that have not changed.

    Here's a page url to use. I added 'x' before each additional parameter then click top ruin the campaign stats.

    http://demand.Eloqua.com/LP=3461?elqoffer=xGartnerMQ & GoogleCampaign = xEloqua & SLS = xPPC_Google_Eloqua_2012 & gclid = xCKGFzcHyh7YCFQThQgod7lMAyg

    Here are some specific questions that I hope can be answered:

    • What you rely on Google to deliver you in their reports vs. what you capture discrete parameters: elqoffer, GoogleCampaign and sls
    • You use the gclid itself? How?
    • Is there a new better method for parsing of URLS and using hidden fields settings?
    • How do you use Eloqua cookies at the same time to send the form of Adwords?
    • You dynamically change the landing page?

    Thank you!

    Hi Mike,.

    I'm on the Ops of Eloqua Marketing team and can shed light on some of your questions.  I hope this helps!

    • What you rely on Google to deliver you in their reports vs. what you capture discrete parameters: elqoffer, GoogleCampaign and sls

    • elqoffer - we use elqoffer to indicate that the offer is valid for adword.  The value we deliver is used for many things.  Of course, we use it for reporting purposes, but we also set up our steps to use this value in a hidden field to redirect to the appropriate page supply once the form and also send the appropriate autoresponder of form processing.  We set up a dropdown list (aka select list) cards offer URL values (for the page of the offer) and another list of choices cards offer values to email ID (for the answering machine).
    • elqchannel - we also usually include a query string for the elqchannel who tells us the General source of the Contact (e.g. Google, Bing, etc.).
    • SLS - is essentially the Source of lead (sls = source of specific lead).  We use it to fill a hidden fields that reach "lead Source - Original" and 'Lead Source - the most recent'.  For us, the source of the specific lead is a very granular (and non-General, such as 'research') but includes a lot of information based on a strict naming convention.
    • That's what we use Eloqua to adwords, but we also use an SEO company to help us optimize our search spend.  To do this, they provide their own tracking code we put on the landing page initial as well as the page of the offer (ie. confirmation page).  To get the code on our LP, we use the cloud "Static content" component that allows you to place any custom code you want in the body of the HTML code.  Unfortunately, I don't have details on what exactly is captured with this code, or how it is used.
  • You use the gclid itself? How?
    • I don't know the answer to this one.  It's someone else on our team that works closely with an SEO company, so I think they know.
  • Is there a new better method for parsing of URLS and using hidden fields settings?
    • YES!  You may have noticed, we have some Javascript on our landing page that does a few things.  First of all, he did a Web data search in Eloqua to see if you are a known visitor and if so, we can pre-fill the form with information we already know the visitor.  The other thing is the JS is populate our hidden fields with the values of query string.  We started to do this before I had a cloud component that eliminates the need for JS custom.  You can use Form Population App to do all that for you.
  • How do you use Eloqua cookies at the same time to send the form of Adwords?
    • I'm not 100% sure I know what you're asking here, but my answer to the previous question can also respond to this one.  Data search Web first checks the Eloqua cookie to retrieve your email address, and then it uses this email address to search for your Contact field values and pre-fill the form.
  • You dynamically change the landing page?
    • We're not changing dynamically the landing page.  Usually, a visitor to click through to an Eloqua email or visit a page PURL.  Dynamically present the offer page based on the value of the query string for "elqoffer."  Looking for an application Cloud released in the coming days that will allow you to place the dynamic content on this initial landing page based on your cookie.
  • The way we structure our campaigns is based on the balance between reporting requirements while maintaining their operational efficiency.  For example, we do want to create a new campaign for each offer that we have.  That would quickly overwhelm our team.  For 2013, we have created 3 campaigns:

    1 research

    2. 3rd party Emails

    3 display ads

    Each of these campaigns have only 1 formula on it (one for research, one for email and display ads).  Each offer has its own landing page (see screenshot below).  The campaign of the report combined with the data of the form layout give us the requirements we need to understand what is working and what is not.

    TIP: If you have custom data objects, you can also consider creating one that seizes all shipments form for each of your forms in 1 place.  This way, you need only 1 set of data instead of individual export for each form of export.

    Example of a search campaign:

  • How to use several query string in a URL?

    Can someone help me with the use of more than a query string in a URL?  I would like to pass on the details of the campaignID (for the CLR) and industry (redirect after form submission) with a click of an email to a landing page.

    Thank you very much

    Alan,

    There are two posts really great on this topic that should help you get there quite easily.

    First, take a look at the position of glreichertof EE12. EE12 - Do-It - Thomson Reuters - Super power of blind forms

    Then visit chorenfto post on the blind forms. Eloqua10: trigger multiple actions with a click-through email (via 'send blind form')

    I have these two positions of reference whenever I need an update on query strings and always answers my questions.

    Good luck.

    Krista

  • You can control a URL in eloqua to add to the query string?

    If I insert a URL in an email, I can't stop eloqua to add additional query string parameters in eloqua.

    I want to make this happen because the URL doesn't seem to work if we add an extra parameter using the query string.

    I had a similar problem recently, and even turn off the tracking doesn't seem to help.  I finally decided to use a shortened URL (bit.ly) and it worked for me.

  • loading an external swf that loads an object from url

    I am trying to load an external swf which in turn automatically load an object. I want the external swf will only be loaded once the object is loaded in it. for now, it loads the external SWF first, then the external swf file loads the object specified in a URL...

    exactly.  you will need a preloader that checks if your external swf finished loading its dependent objects.

  • Several loaded FLV files

    Ok

    In my main script, I have a few buttons. When you click on a button you are diverted to the an image tag in the main timeline.

    When the timeline stops to say frame 2 that a flv is loaded into a clip of blank film on the main stage.  If you click on the button 2, same thing. In total I have so about four FLV this room when a button is pressed. If I go to by clicking my buttons to test the sweetness of my flv, after that about three clicks of navigation between my flvs frames/load my film main set becomes slower.

    Each FLV is about 5 MB.

    The following code gets start when I click on my button and taking me to this image. My question is, if I jump between FLV with each click of a button is the FLV file that always plays first play and causing the main movie together to slow down? Is there a better way to handle this? What I need to unload the film play when I click? I'm trying to see if there is a better way to have a smooth streaming of my flv. The flv file which becomes able to simply start looping when it's done and servers background 'mobile '.

    is there something else can I implement in my code that will keep my smooth game flv load? Thank you

    This is the code in the main timeline, which is responsible for my external swf that will load the FLV file

    var myLoader:Loader = new Loader();
    addChild (myLoader);
    var url: URLRequest = new URLRequest ("theexternal.swf");
    myLoader.load (url);

    This is the code that is in the external SWF file that will launch the FLV file.

    Fl.video import. *;

    function onFLVComplete(event:VideoEvent):void {}
    Event.Target.Play ();
    }

    swl.addEventListener (VideoEvent.COMPLETE, onFLVComplete);

    After some trial and error, I have the winning code and the solution. My action script resided inside the physical video I created that was charge my external swf. I decided to try to work around it and put the code on the main timeline of the main SWF and it worked! Thank you for assiting me everyone.

    var myrequest2:URLRequest = new URLRequest ("external.swf")

    var myloader2:Loader = new Loader();
    myloader2. Load (myrequest2);
    stage.addChild (myloader2);
    myloader.unloadAndStop ();

  • query string Flash and html

    Hello

    The problem page is located at http://gauravchandra.info/gpi/mediaCentre.html

    I use the flash query string to pass a value into a variable so that the flash file is loaded in a particular frame.

    If you see the object or embed element, I wrote ' Body_image.swf? section = flame "in the film source. What makes my flash movie play from a labeled frame - flame. But it works only in internet explore and that too only on the local computer. When I upload to the server, it starts from the first frame each time. In internet explore, it works on the premises, and it does not work even on local in firefox.

    What I am doing wrong? Please help because it's urgent.

    Gerard

    Solved. Put in a preloader. He took care of her.

    Gerard

Maybe you are looking for