本文整理汇总了PHP中SWFMovie::addExport方法的典型用法代码示例。如果您正苦于以下问题:PHP SWFMovie::addExport方法的具体用法?PHP SWFMovie::addExport怎么用?PHP SWFMovie::addExport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SWFMovie
的用法示例。
在下文中一共展示了SWFMovie::addExport方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SWFMovie
#!/usr/bin/php -c.
<?php
$m = new SWFMovie();
$s = new SWFShape();
$s->setLine(1, 255, 0, 0, 255);
$s->setRightFill(255, 255, 0, 255);
$s->drawLine(100, 0);
$s->drawLine(0, 40);
$s->drawLineTo(0, 0);
$b = new SWFButton();
$br1 = $b->addCharacter($s, SWFBUTTON_HIT | SWFBUTTON_UP | SWFBUTTON_OVER | SWFBUTTON_DOWN);
$br2 = $b->addCharacter($s, SWFBUTTON_OVER | SWFBUTTON_DOWN);
$br2->rotate(10);
$br2->move(20, 0);
$br3 = $b->addCharacter($s, SWFBUTTON_DOWN);
$br3->rotate(20);
$br3->move(40, 0);
$d = $m->add($b);
$d->moveTo(50, 100);
$m->addExport($b, "ButtonExport");
$m->writeExports();
$m->nextFrame;
$m->save("test02.swf");
?>
示例2: SWFBitmap
$my_key_label->add($my_key_label_header);
$key_spr = $my_key_label->add($key_label);
$key_spr->moveTo(5, 7);
$my_key_label->nextFrame();
$my_key_label_sprite = $entire_key->add($my_key_label);
$my_key_label_sprite->setName('my_key_label');
$display_eqp_icons = true;
if ($display_eqp_icons) {
$ind_path = $path . "/htdocs/resources/img/style-1.1/images/";
if ($status_symbol == 'yes') {
$ex_clip = new SWFBitmap(fopen($ind_path . "icon_warning_sml.jpg", "r"));
$check_clip = new SWFBitmap(fopen($ind_path . "icon_warning_sml.jpg", "r"));
$equals_clip = new SWFBitmap(fopen($ind_path . "icon_warning_sml.jpg", "r"));
}
$empty_sprite = new SWFSprite();
$m->addExport($empty_sprite, 'container');
$main_actionscript = "\n\nvar greyscale = 225;\nvar j=1;\nvar gf = new flash.filters.GlowFilter(0xFFCC00, 10, 5, 5, 2, 1, false, false);\nvar selection;\n\nbackground.useHandCursor = false;\n\nbackground.onPress=function(){\n\tselection.selected=false;\n\tselection.filters=null;\n\tselection=null;\n};\n//onMouseDown=function() {\n//\tgetUrl('about:blank','config', 'GET');\n//};\nonMouseUp=function() {\n\tstopDrag();\n};\n\nfunction argbtohex(a, r, g, b)\n{\n\treturn (a<<24 | r<<16 | g<<8 | b);\n}\n\n// ICON CLASS\nfunction createIcon() {\n\tvar equipment_type_symbol = this.equipment_type_symbol;\n\tObject.registerClass('container', createNewFixture);\n\thandle = attachMovie('container',equipment_type_symbol, getNextHighestDepth());\n\n\tkey_icon = entire_key.attachMovie('container',equipment_type_symbol,getNextHighestDepth(),\n\t\t{_x:0,_y:this._y,equipment_type_id:this.equipment_type_id,equipment_type_image_id:this.equipment_type_image_id});\n\tkey_icon.my_bitmap = new flash.display.BitmapData(this._width,this._height,true,0x00000000);\n\tkey_icon.attachBitmap(key_icon.my_bitmap, 1);\n\tkey_icon.my_bitmap.draw(this);\n\n\tfor(i=_root.j;i>=0;--i) {\n\t\tvar rgb = _root.greyscale-i;\n\t\tvar my_color = _root.argbtohex(255,rgb,rgb,rgb);\n\t\tkey_icon.my_bitmap.threshold(key_icon.my_bitmap,key_icon.my_bitmap.rectangle,key_icon.my_bitmap.rectangle.topLeft,'>=',my_color,0x00000000,my_color,true);\n\t}\n};\ncreateIcon.prototype = new MovieClip();\n\n// NEW FIXTURE CLASS\nfunction createNewFixture() {};\ncreateNewFixture.prototype = new MovieClip();\n\ncreateNewFixture.prototype.onPress=function() {\n\tthis.createEmptyMovieClip('newone', getNextHighestDepth());\n\tthis.newone.attachBitmap(this.my_bitmap,2,auto,false);\n\tthis.newone.startDrag(lock);\n};\ncreateNewFixture.prototype.onRelease=createNewFixture.prototype.onReleaseOutside=function() {\n\tlocation_id={$my_address_id};\n\tequipment_type_id=this.equipment_type_id;\n\tsubmit='Submit';\n type='new';\n\tx_position = _root._xmouse;\n\ty_position = _root._ymouse;\n\tgetURL('index.php?nid=ifp-equipment-edit-submit&location_id={$my_address_id}', '', 'POST');\n};\ncreateNewFixture.prototype.onRollOver=function() {\n\t//var dconf = new LoadVars();\n\t//dconf.location_equipment_id=100;\n\t//dconf.equipment_type_id=this.equipment_type_id;\n\t//dconf.equipment_type_image_id=this.equipment_type_image_id;\n\t//dconf.send('/acc/link/types/display_config/&body=true','config', 'POST');\n\t//dconf = null;\n};\n\n\n// INVENTORY CLASS\nfunction positionFixture() {\n\tthis.createEmptyMovieClip('symbol', this.getNextHighestDepth());\n\tthis.symbol.cacheAsBitmap = false;\n\tthis.symbol.createEmptyMovieClip('bitmap', this.getNextHighestDepth());\n\tthis.symbol.bitmap.attachBitmap(this.bitmap,2,auto,true);\n\tthis.symbol.bitmap._x=-this.symbol.bitmap._width/2;\n\tthis.symbol.bitmap._y=-this.symbol.bitmap._height/2;\n\tthis.symbol._rotation=this.symbol_rotation;\n\tthis.onPress=function() {\n\t\t// If clicked by not selected, select.\n\t\tif(this.selected!=true) {\n\t\t\tthis.startDrag(lock);\n\t\t\tselection.selected = null;\n\t\t\tselection.filters = [];\n\t\t\tthis.filters = [gf];\n\t\t\tthis.selected=true;\n\t\t\tselection=this;\n\t\t} else {\n\t\t\tvar my_corrFactor = 0;\n\t\t\tif (this._xmouse < 0){\n\t\t\t\tmy_corrFactor = 180;\n\t\t\t}\n\t\t\tvar counterbalance = (57.29578*(Math.atan(this._ymouse/this._xmouse)))+my_corrFactor;\n\t\t\tthis.onMouseMove=function() {\n\t\t\t\tdegreeAngle = (57.29578*(Math.atan(this._ymouse/this._xmouse)))-counterbalance;\n\t\t\t\tcorrFactor = 0;\n\t\t\t\tif (this._xmouse < 0){\n\t\t\t\t\tcorrFactor = 180;\n\t\t\t\t}\n\t\t\t\tthis.symbol._rotation = 15*int(degreeAngle/15)+corrFactor+this.symbol_rotation;\n\t\t\t};\n\t\t}\n\t};\n\tthis.onRelease=this.onReleaseOutside=function() {\n\t\tthis.onMouseMove = null;\n\t\tif(x_position!=this._x || y_position!=this._y || my_rotation!=this.symbol._rotation) {\n\t\t\tvar update_position = new LoadVars();\n\t\t\tupdate_position.location_equipment_id=this.my_leid;\n\t\t\tupdate_position.x_position = this._x - {$x_shift};\n\t\t\tupdate_position.y_position = this._y;\n\t\t\tupdate_position.rotation_angle = this.symbol._rotation;\n\t\t\tupdate_position.sendAndLoad('index.php?nid=ifp-location-equipment-position-edit',update_position,'POST');\n\t\t\tupdate_position = null;\n\t\t\tthis.symbol_rotation=this.symbol._rotation;\n\t\t}\n var myjavascript = 'javascript:show_img('+this.my_eid+','+this.etid+');';\n getURL(myjavascript);\n\n // display_config\n var my_dconf = new LoadVars();\n my_dconf.location_equipment_id=this.my_leid;\n my_dconf.equipment_id=this.my_eid;\n my_dconf.location_address_id={$my_address_id};\n my_dconf.equipment_type_id=this.etid;\n my_dconf.equipment_type_image_id=this.equipment_type_image_id;\n //my_dconf.send('index.php?nid=ifp-location-space-plan-key-update','config', 'POST');\n my_dconf = null;\n\t};\n};\n\n\npositionFixture.prototype = new MovieClip();\n\n\n\n\nentire_key.my_key_label.onPress=function(){\n\t_root.entire_key.startDrag(lock);\n};\nentire_key.my_key_label.onRelease=entire_key.my_key_label.onReleaseOutside=function(){\n\tvar update_key = new LoadVars();\n\tupdate_key.key_x_position = _root.entire_key._x;\n\tupdate_key.key_y_position = _root.entire_key._y;\n\tupdate_key.location_space_plan_id = '{$location_space_plan_id}';\n\tupdate_key.location_id = '{$my_address_id}';\n\tupdate_key.sendAndLoad('index.php?nid=ifp-location-space-plan-key-update',update_key,'POST');\n};\nentire_key.cacheAsBitmap = true;\n";
$symbol_pointers['filename'] = Nexista_Path::get('//equipment_types_get_all/equipment_types_get_all/file_pointer', 'flow');
$symbol_pointers['name'] = Nexista_Path::get('//equipment_types_get_all/name', 'flow');
$symbol_pointers['equipment_type_image_id'] = Nexista_Path::get('//equipment_types_get_all/equipment_type_icon_id', 'flow');
$symbol_pointers['equipment_type_id'] = Nexista_Path::get('//equipment_types_get_all/equipment_type_id', 'flow');
$number_of_symbols = count($symbol_pointers['filename']);
if ($number_of_symbols > 0) {
for ($i = 0; $i < $number_of_symbols; $i++) {
$filename = $symbol_pointers['filename'][$i];
if (!empty($filename)) {
$name = $symbol_pointers['name'][$i];
$id = $symbol_pointers['equipment_type_id'][$i];
$equipment_type_image_id = $symbol_pointers['equipment_type_image_id'][$i];
//$mfile = $path."/usr/".$account_id."/merchandising/" . $filename;
$mfile = $filename;