Announcement

Collapse
No announcement yet.

AS3 - Setting up icons on a list item

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    I am going back to basis.

    I put an UILoader on stage with an image link, and nothing else. I click on publish.
    - When using Flash, it works
    - When using Scaleform player, it does not, no image and same error as above
    Why ?

    Leave a comment:


  • replied
    Okay, so here are my progresses :
    - The UILoader with a default setting and a image (img://package.name) works perfectly when used alone in Scaleform without CLIK
    - When used with CLIK, it breaks the whole frame, shutting down every CLIK component AND not showing up anymore

    Still no one ? :3

    Leave a comment:


  • replied
    I also noticed that simply putting an UILoader on my movie, then setting up its "source" property (img://package.image) does not seem to do anything.

    Please, how is this supposed to work ?

    Leave a comment:


  • started a topic AS3 - Setting up icons on a list item

    AS3 - Setting up icons on a list item

    Hi,

    I have read this tutorial there : http://forums.epicgames.com/threads/...4#post29304564
    But it appears that it is not up to date anymore. I tried something in AS3. Here is my AS class :

    Code:
    package com.scaleform.coreui
    {	
    	// Import
    	import scaleform.clik.controls.ListItemRenderer;
    	import flash.display.MovieClip;
    	import fl.containers.UILoader;
    	
    	// Class definition
    	public class DVListItem extends ListItemRenderer {
    		
    		/*--- Public attributes ---*/
    		public var imageLoader:UILoader;
    	
    		/*--- Constructor ---*/
    		public function DVListItem()
    		{
    			super();
    			trace("DVIcon ready");
    		}
    		
    		/*--- Set data to the item ---*/
    		public override function setData(data:Object):void 
    		{
    			this.data = data;
    			this.imageLoader.source = data ? data.iconimage : "";
    			trace("DVIcon set");
    		}
    	}
    }
    Now, the funny UScript code :

    Code:
    function UpdateServerList()
    {
    	local byte 			i;
    	local GFxObject 	TempObj;
    	local GFxObject 	DataProvider;
    
    	// Sending data to menu
    	DataProvider = ServerListMC.GetObject("dataProvider");
    	for (i = 0; i < ServerList.Length; i++)
    	{
    		TempObj = CreateObject("Object");
    		TempObj.SetString("label", ServerList[i]);
    		TempObj.SetString("iconimage", "img://IcoThumbs.Textures.TX_THUMBNAIL_Level01");
    		DataProvider.SetElementObject(i, TempObj);
    	}
    	ServerListMC.SetObject("dataProvider", DataProvider);
    	ServerListMC.SetFloat("rowCount", i);
    }
    Now, the fact is that this does not work. The list is behaving really good, the label is correct etc. There is just no image.
    I also get a lot of errors in the Scaleform Console, here is a pic :



    Any help would be appreciated ! I am not really familiar with AS.
    Should UILoader be a problem, is this thread here a solution : http://forums.epicgames.com/threads/...unreal-package ?
Working...
X