Skip to content

Commit

Permalink
TestVersion for Webinar
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Blase authored and Marvin Blase committed Aug 27, 2010
1 parent dfcd9aa commit fc3ecb1
Show file tree
Hide file tree
Showing 18 changed files with 201 additions and 69 deletions.
Expand Up @@ -4,15 +4,15 @@
<stringAttribute key="ARGUMENTS" value=""/>
<booleanAttribute key="KILL_PREVIUOS_VIEWER" value="false"/>
<stringAttribute key="LAUNCHER_DEPENDENCIES" value="[Self]"/>
<stringAttribute key="MAIN_CLASS" value="src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/ApplicationContext.as"/>
<stringAttribute key="OUTPUT" value="bin/ApplicationContext.swf"/>
<stringAttribute key="MAIN_CLASS" value="src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/views/ItemView.as"/>
<stringAttribute key="OUTPUT" value="bin/ItemView.swf"/>
<booleanAttribute key="PASS_CP" value="true"/>
<booleanAttribute key="PASS_MAIN_CLASS" value="true"/>
<booleanAttribute key="PASS_RSLS" value="false"/>
<booleanAttribute key="PASS_SWCS" value="true"/>
<stringAttribute key="PROJECT_NAME" value="WeLoveFDT-Robotlegs-Webinar-APP-08-27-2010--Berlin"/>
<booleanAttribute key="START_SWF_ENABLED" value="true"/>
<stringAttribute key="START_SWF_LOCATION" value="bin/ApplicationContext.swf"/>
<stringAttribute key="START_SWF_LOCATION" value="bin/ItemView.swf"/>
<stringAttribute key="START_SWF_WITH" value="External SWF Viewer"/>
<booleanAttribute key="USE_PROJECT_COMPILER_ARGUMENTS" value="true"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
Expand Down
29 changes: 29 additions & 0 deletions .settings/launch/WeLoveFDT_Robotleg.launch
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="com.powerflasher.fdt.ui.MxmlcGroup">
<stringAttribute key="APP_ARGUMENTS" value=""/>
<stringAttribute key="ARGUMENTS" value="-static-link-runtime-shared-libraries=true&#10;-target-player={playerVersion}&#10;-library-path+=&quot;{flexSDK}/frameworks/locale/en_US&quot;&#10;-keep-as3-metadata+=Inject"/>
<booleanAttribute key="KILL_PREVIUOS_VIEWER" value="false"/>
<stringAttribute key="LAUNCHER_DEPENDENCIES" value="[Self]"/>
<stringAttribute key="MAIN_CLASS" value="src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/WeLoveFDT_Robotlegs.as"/>
<stringAttribute key="OUTPUT" value="bin/WeLoveFDT_Robotlegs.swf"/>
<booleanAttribute key="PASS_CP" value="true"/>
<booleanAttribute key="PASS_MAIN_CLASS" value="true"/>
<booleanAttribute key="PASS_RSLS" value="false"/>
<booleanAttribute key="PASS_SWCS" value="true"/>
<intAttribute key="PLAYER_HEIGHT" value="640"/>
<intAttribute key="PLAYER_WIDTH" value="800"/>
<stringAttribute key="POST_COMPILE_ANT" value=""/>
<stringAttribute key="PRE_COMPILE_ANT" value=""/>
<stringAttribute key="PROJECT_NAME" value="WeLoveFDT-Robotlegs-Webinar-APP-08-27-2010--Berlin"/>
<stringAttribute key="PUBLISHER_ID" value=""/>
<booleanAttribute key="START_SWF_ENABLED" value="true"/>
<stringAttribute key="START_SWF_LOCATION" value="bin/WeLoveFDT_Robotlegs.swf"/>
<stringAttribute key="START_SWF_WITH" value="External SWF Viewer"/>
<booleanAttribute key="USE_PROJECT_COMPILER_ARGUMENTS" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/WeLoveFDT-Robotlegs-Webinar-APP-08-27-2010--Berlin"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
</launchConfiguration>
Binary file added bin/ItemView.swf
Binary file not shown.
Binary file added bin/MainContainerMediator.swf
Binary file not shown.
Binary file added bin/RSSServiceCommand.swf
Binary file not shown.
Binary file modified bin/WeLoveFDT_Robotlegs.swf
Binary file not shown.
@@ -1,13 +1,18 @@
package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin {
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.ApplicationContext;
import flash.display.Sprite;

/**
* @author Marvin
*/
[SWF(width="800", height="640", backgroundColor="#000000", frameRate="40")]
public class WeLoveFDT_Robotlegs extends Sprite {

public function WeLoveFDT_Robotlegs() {
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

trace("++++++++++++++++++++++++++++++");
trace("WeLoveFDT_Robotlegs");
trace("++++++++++++++++++++++++++++++");
Expand Down
Expand Up @@ -2,10 +2,12 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs {
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands.InitialCommand;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands.RSSServiceCommand;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.events.RSSSerivceEvent;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.interfaces.IRSSItem;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.RSSModel;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.vos.RSSDataItem;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.services.RSSService;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.MainContainer;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.MainContainerMediator;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.ItemView;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.ItemViewMediator;

import org.robotlegs.base.ContextEvent;
import org.robotlegs.mvcs.Context;
Expand All @@ -29,10 +31,14 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs {
commandMap.mapEvent(ContextEvent.STARTUP_COMPLETE, InitialCommand, ContextEvent);
commandMap.mapEvent(RSSSerivceEvent.LOAD_COMPLETE, RSSServiceCommand, RSSSerivceEvent);

mediatorMap.mapView(MainContainer, MainContainerMediator);
mediatorMap.mapView(ItemView, ItemViewMediator);

injector.mapSingleton(RSSService);
injector.mapClass(IRSSItem, RSSDataItem);
injector.mapSingleton(RSSModel);
injector.mapSingleton(ItemView);

contextView.addChild(new ItemView());

super.startup();
}
Expand Down
Expand Up @@ -7,15 +7,11 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {
* @author Francis Varga
*/
public class InitialCommand extends Command {

[Inject]
public var service : RSSService;
public var service:RSSService;

override public function execute() : void {

service.loadRSS("http://welovefdt.com/feed.xml");

}

}
}
@@ -1,6 +1,8 @@
package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.MainContainer;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.events.RSSSerivceEvent;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.RSSModel;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.vos.RSSDataItem;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.MainContainer;

import org.robotlegs.mvcs.Command;

Expand All @@ -11,6 +13,9 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {

[Inject]
public var event : RSSSerivceEvent;

[Inject]
public var model:RSSModel;

override public function execute() : void {

Expand All @@ -19,20 +24,24 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {

_parseRSSXML(event.resultData);

var mainContainer : MainContainer = new MainContainer();
contextView.addChild(mainContainer);


dispatch(new RSSSerivceEvent(RSSSerivceEvent.RSS_PARSED));

}

private function _parseRSSXML(xmlObj : Object):void
{
trace("_parseRSSXML()");

var xmlList : XMLList = new XMLList();
xmlList = new XML(xmlObj)["item"];

xmlList = new XML(xmlObj)["channel"]["item"];
for (var i:int = 0; i < xmlList.length(); i++) {
var rssItem:RSSDataItem = new RSSDataItem();
var rssData:Object = xmlList[i];
rssData.id = i;
rssItem.dataProvider = rssData;
model.addItem(rssItem);
}
}
}
}
Expand Up @@ -20,6 +20,7 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.components {
}

public function create() : void {

}

public function destroy() : void {
Expand Down
Expand Up @@ -3,12 +3,6 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.interfaces {
* @author Francis Varga
*/
public interface IRSSItem {
function set id(value : uint):void
function set title(value : String):void
function set description(value : String):void
function set link(value : String):void
function set pubDate(value : String):void
function set author(value : String):void
function get id():uint
function get title():String
function get description():String
Expand Down
Expand Up @@ -14,5 +14,14 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models {
{
items.push(item);
}

public function get length():uint {
return items.length;
}

public function getItemAt(index : uint):IRSSItem
{
return items[index];
}
}
}
@@ -0,0 +1,50 @@
package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.vos {
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.interfaces.IRSSItem;

/**
* @author Marvin
*/
public class RSSDataItem implements IRSSItem {


private var _dataProvider : Object = new Object();

public function set dataProvider(value:Object):void {
_dataProvider = value;
}

public function get id() : uint {
// TODO: Auto-generated method stub
return _dataProvider.id;
}

public function get title() : String {
// TODO: Auto-generated method stub
return _dataProvider.title;
}

public function get description() : String {
// TODO: Auto-generated method stub
return _dataProvider.description;
}

public function get link() : String {
// TODO: Auto-generated method stub
return _dataProvider.link;
}

public function get pubDate() : String {
// TODO: Auto-generated method stub
return _dataProvider.pubDate;
}

public function get author() : String {
// TODO: Auto-generated method stub
return _dataProvider.author;
}




}
}
Expand Up @@ -20,7 +20,8 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.services {
}

private function onComplete(event : Event) : void {
var newEvent : RSSSerivceEvent = new RSSSerivceEvent(RSSSerivceEvent.LOAD_COMPLETE);
trace('event: ' + (event));
var newEvent:RSSSerivceEvent = new RSSSerivceEvent(RSSSerivceEvent.LOAD_COMPLETE);
newEvent.resultData = event.target["data"];
dispatch(newEvent);
}
Expand Down

0 comments on commit fc3ecb1

Please sign in to comment.