Clicky

Does anyone have a code example of how to pass flash variables from asp.net using javascript

asked 07/06/2011 12:17

dba_damion's gravatar image

dba_damion ♦♦


7 Answers:
When you genereting HTML / Flash object you can pass any variables to flex using flashvars

http://www.permadi.com/tutorial/flashVars/
link

answered

dgofman's gravatar image

dgofman

I am new to flash . I need to call a function in flash from flashcontrol , and pass the url to the flashcontrol. I want to call the doPlay function and pass the URL using vb.net



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="254"
             backgroundColor="white"
        creationComplete="init();"      
      >
      <mx:Script>
        <![CDATA[
                  import mx.core.*;
                  import flash.external.*;
                  
                  var music:Sound;
                  var musicChannel:SoundChannel;
            private function init():void {
             
                //add javascript interface
               
                        ExternalInterface.addCallback("doPlay", doPlay);
                        ExternalInterface.addCallback("doStop", doStop);
                        
                        music = new Sound();                      
            }
                  public function doStop():void{
                        if (musicChannel != null)
                              musicChannel.stop();
                  }
                  public function doPlay(url:String):void{
                        if (musicChannel != null){
                              musicChannel.stop();                              
                        }
                              

                        music = new Sound(new URLRequest(url));
                        musicChannel = music.play();      
                                    
                  }
           
        ]]>
    </mx:Script>


</mx:Application>
link

answered 2011-07-06 at 10:01:02

dba_damion's gravatar image

dba_damion

Can you show me in this example
link

answered 2011-07-10 at 21:34:28

dba_damion's gravatar image

dba_damion

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

link

answered 2011-07-11 at 10:36:07

cyberwebservice's gravatar image

cyberwebservice

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

Asked: 07/06/2011 12:17

Seen: 316 times

Last updated: 12/16/2011 05:15