Code: Select all
Error: The SystemManager preloader_initProgressHandler was called when the currentFrame was at 2 Please add this swf to bug 129782.
at mx.managers::SystemManager/::preloader_initProgressHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/::timerHandler()
at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
at flash.utils::Timer/flash.utils:Timer::tick()
My AS3 code is:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();" usePreloader="false">
<mx:Script>
<![CDATA[
import flash.external.ExternalInterface;
private function onSend(evento:Event):void
{
ExternalInterface.call("enviaMensagem","FLEX 2 enviando string");
}
private function init():void
{
ExternalInterface.addCallback("envioRetorno",envioRetorno);
}
private function envioRetorno(mensagem:String):void
{
this.resposta_box.text = mensagem;
}
]]>
</mx:Script>
<mx:Button x="10" y="150" label="Enviar mensagem" width="250" id="bt_enviar" click="onSend(event)" />
<mx:TextArea x="10" y="10" width="373" height="132" id="resposta_box" />
</mx:Application>
and my C# 2005 code is:
Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
private f_in_box__lib.f_in_box__control f_in_box__control1;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
f_in_box__control1.PutMovieFromStream(this.GetType().Assembly.GetManifestResourceStream("WindowsApplication1.Resources.teste.swf"));
f_in_box__control1.FlashMethod_Play();
}
private void f_in_box__control1_KeyUp(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Escape:
Application.Exit();
break;
}
}
private void ButtonCallActionScriptFunction_Click(object sender, EventArgs e)
{
String Response = f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"envioRetorno\"><arguments><string>Enviando do .NET para o FLEX 2</string></arguments></invoke>");
System.Windows.Forms.MessageBox.Show("Tipo de retorno: '" + Response + "'");
}
private void f_in_box__control1_OnFlashCall(object sender, string request)
{
MessageBox.Show(request);
}
}
}
What's this error??? I'm confusing!