Triggers bettween the Widjet and the Client

Psychopath
by Psychopath · 6 posts
14 years ago in Flash
Posted 14 years ago · Author
Hi, I have made some flash Widjets, but I've seen some widgest (made by Deliverance) wich excange trigers bettween the Client and the Widjet
Like the auto bubble chair or the real time clock

It will be very usefull to make animated items: the trigger should be emitied by the widjet, and the Object, detecting the trigger would play the animation, you know what I mean ?

If you find the answer to this question, I will post a tutorial how to make a widjet derivable by editing the assets.
Posted 14 years ago
Interesting..please post more..
Posted 14 years ago · Author
In fact I can say it to you; to make a widjet derivable use an URLrequest, the file found in the CFL assets are like Files in a local folder (CFL is a compression encrypted format)
you must use the "path" variable
Code
package {
   // ----- I M P O R T   I M V U
   import com.imvu.widget.*;
   import flash.geom.*;
   import com.imvu.events.*;
   import flash.display.*;
   import flash.events.*;
   import flash.net.navigateToURL;
   import flash.net.*;
   


   public class LinkWidjet extends ClientWidget {


      
      private var photo:Loader;
      public var myurl:String="banner.png";
      


      public function initWidget():void {

         
         this.widgetName="Link to my prodduct page";
         this.content_oc.buttonMode=true;
         setPhoto(myurl);
         infosTexte.addEventListener(Event.COMPLETE,whenLoadtxtComplete);
         
         function setPhoto(myurl:String):void {
            photo=new Loader  ;
            photo.load(new URLRequest(path + myurl));
            photo.contentLoaderInfo.addEventListener(Event.COMPLETE,auComplet);
            
         }
               

      }
      
      public function auComplet(evt:Event):void {
         this.content_oc.addChild(photo);

      }
   }

}
[/code]
Posted 14 years ago
Interesting Discovery..maybe someone can do something with this..
~Rain..
Posted 14 years ago
DAMN, those sure are a lot of imports, lol.

Nevertheless, good work!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT